mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-23 23:17:46 +01:00
Remove some unnecessary Session dependency
This commit is contained in:
parent
b58c22c1be
commit
e17d20054a
11 changed files with 16 additions and 18 deletions
|
|
@ -28,10 +28,9 @@ using namespace ARDOUR;
|
||||||
using namespace ArdourSurface;
|
using namespace ArdourSurface;
|
||||||
using namespace ArdourCanvas;
|
using namespace ArdourCanvas;
|
||||||
|
|
||||||
Push2Layout::Push2Layout (Push2& p, Session& s, std::string const & name)
|
Push2Layout::Push2Layout (Push2& p, std::string const & name)
|
||||||
: Container (p.canvas())
|
: Container (p.canvas())
|
||||||
, p2 (p)
|
, p2 (p)
|
||||||
, session (s)
|
|
||||||
, _name (name)
|
, _name (name)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,10 +27,6 @@
|
||||||
|
|
||||||
#include "canvas/container.h"
|
#include "canvas/container.h"
|
||||||
|
|
||||||
namespace ARDOUR {
|
|
||||||
class Session;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace ArdourSurface {
|
namespace ArdourSurface {
|
||||||
|
|
||||||
class Push2;
|
class Push2;
|
||||||
|
|
@ -38,7 +34,7 @@ class Push2;
|
||||||
class Push2Layout : public sigc::trackable, public ArdourCanvas::Container
|
class Push2Layout : public sigc::trackable, public ArdourCanvas::Container
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Push2Layout (Push2& p, ARDOUR::Session& s, std::string const & name);
|
Push2Layout (Push2& p, std::string const & name);
|
||||||
virtual ~Push2Layout ();
|
virtual ~Push2Layout ();
|
||||||
|
|
||||||
int display_width () const;
|
int display_width () const;
|
||||||
|
|
@ -67,7 +63,6 @@ class Push2Layout : public sigc::trackable, public ArdourCanvas::Container
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Push2& p2;
|
Push2& p2;
|
||||||
ARDOUR::Session& session;
|
|
||||||
std::string _name;
|
std::string _name;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,8 @@ using namespace Gtkmm2ext;
|
||||||
using namespace ArdourCanvas;
|
using namespace ArdourCanvas;
|
||||||
|
|
||||||
MixLayout::MixLayout (Push2& p, Session & s, std::string const & name)
|
MixLayout::MixLayout (Push2& p, Session & s, std::string const & name)
|
||||||
: Push2Layout (p, s, name)
|
: Push2Layout (p, name)
|
||||||
|
, session (s)
|
||||||
, bank_start (0)
|
, bank_start (0)
|
||||||
, vpot_mode (Volume)
|
, vpot_mode (Volume)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,7 @@ class MixLayout : public Push2Layout
|
||||||
void update_meters ();
|
void update_meters ();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
ARDOUR::Session& session;
|
||||||
ArdourCanvas::Rectangle* bg;
|
ArdourCanvas::Rectangle* bg;
|
||||||
ArdourCanvas::Line* upper_line;
|
ArdourCanvas::Line* upper_line;
|
||||||
std::vector<ArdourCanvas::Text*> upper_text;
|
std::vector<ArdourCanvas::Text*> upper_text;
|
||||||
|
|
|
||||||
|
|
@ -114,9 +114,9 @@ Push2::Push2 (ARDOUR::Session& s)
|
||||||
|
|
||||||
_canvas = new Push2Canvas (*this, 960, 160);
|
_canvas = new Push2Canvas (*this, 960, 160);
|
||||||
mix_layout = new MixLayout (*this, *_session, "globalmix");
|
mix_layout = new MixLayout (*this, *_session, "globalmix");
|
||||||
scale_layout = new ScaleLayout (*this, *_session, "scale");
|
scale_layout = new ScaleLayout (*this, "scale");
|
||||||
track_mix_layout = new TrackMixLayout (*this, *_session, "trackmix");
|
track_mix_layout = new TrackMixLayout (*this, *_session, "trackmix");
|
||||||
splash_layout = new SplashLayout (*this, *_session, "splash");
|
splash_layout = new SplashLayout (*this, "splash");
|
||||||
|
|
||||||
run_event_loop ();
|
run_event_loop ();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,8 +43,8 @@ using namespace ArdourCanvas;
|
||||||
|
|
||||||
static double unselected_root_alpha = 0.5;
|
static double unselected_root_alpha = 0.5;
|
||||||
|
|
||||||
ScaleLayout::ScaleLayout (Push2& p, Session & s, std::string const & name)
|
ScaleLayout::ScaleLayout (Push2& p, std::string const & name)
|
||||||
: Push2Layout (p, s, name)
|
: Push2Layout (p, name)
|
||||||
, last_vpot (-1)
|
, last_vpot (-1)
|
||||||
, vpot_delta_cnt (0)
|
, vpot_delta_cnt (0)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ namespace ArdourSurface {
|
||||||
class ScaleLayout : public Push2Layout
|
class ScaleLayout : public Push2Layout
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ScaleLayout (Push2& p, ARDOUR::Session&, std::string const &);
|
ScaleLayout (Push2& p, std::string const &);
|
||||||
~ScaleLayout ();
|
~ScaleLayout ();
|
||||||
|
|
||||||
void render (ArdourCanvas::Rect const &, Cairo::RefPtr<Cairo::Context>) const;
|
void render (ArdourCanvas::Rect const &, Cairo::RefPtr<Cairo::Context>) const;
|
||||||
|
|
|
||||||
|
|
@ -40,8 +40,8 @@ using namespace std;
|
||||||
using namespace ArdourSurface;
|
using namespace ArdourSurface;
|
||||||
using namespace ArdourCanvas;
|
using namespace ArdourCanvas;
|
||||||
|
|
||||||
SplashLayout::SplashLayout (Push2& p, Session& s, std::string const & name)
|
SplashLayout::SplashLayout (Push2& p, std::string const & name)
|
||||||
: Push2Layout (p, s, name)
|
: Push2Layout (p, name)
|
||||||
{
|
{
|
||||||
std::string splash_file;
|
std::string splash_file;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ namespace ArdourSurface {
|
||||||
class SplashLayout : public Push2Layout
|
class SplashLayout : public Push2Layout
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SplashLayout (Push2& p, ARDOUR::Session&, std::string const &);
|
SplashLayout (Push2& p, std::string const &);
|
||||||
~SplashLayout ();
|
~SplashLayout ();
|
||||||
|
|
||||||
void render (ArdourCanvas::Rect const &, Cairo::RefPtr<Cairo::Context>) const;
|
void render (ArdourCanvas::Rect const &, Cairo::RefPtr<Cairo::Context>) const;
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,8 @@ using namespace ArdourSurface;
|
||||||
using namespace ArdourCanvas;
|
using namespace ArdourCanvas;
|
||||||
|
|
||||||
TrackMixLayout::TrackMixLayout (Push2& p, Session & s, std::string const & name)
|
TrackMixLayout::TrackMixLayout (Push2& p, Session & s, std::string const & name)
|
||||||
: Push2Layout (p, s, name)
|
: Push2Layout (p, name)
|
||||||
|
, session (s)
|
||||||
{
|
{
|
||||||
Pango::FontDescription fd ("Sans 10");
|
Pango::FontDescription fd ("Sans 10");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,7 @@ class TrackMixLayout : public Push2Layout
|
||||||
boost::shared_ptr<ARDOUR::Stripable> current_stripable() const { return stripable; }
|
boost::shared_ptr<ARDOUR::Stripable> current_stripable() const { return stripable; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
ARDOUR::Session& session;
|
||||||
boost::shared_ptr<ARDOUR::Stripable> stripable;
|
boost::shared_ptr<ARDOUR::Stripable> stripable;
|
||||||
PBD::ScopedConnectionList stripable_connections;
|
PBD::ScopedConnectionList stripable_connections;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue