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