X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Froute_ui.h;h=ea860419860883ad8496b2c713fb647571654de1;hb=02f714b8c9052e5ada0431df0be00f684294739d;hp=990bcd99edc4913bf8db562032c5b7b5c124dd55;hpb=a20f41ab39cc034740ccd564c1057d8737d763d5;p=ardour.git diff --git a/gtk2_ardour/route_ui.h b/gtk2_ardour/route_ui.h index 990bcd99ed..ea86041986 100644 --- a/gtk2_ardour/route_ui.h +++ b/gtk2_ardour/route_ui.h @@ -26,13 +26,10 @@ #include #include #include +#include #include "axis_view.h" -namespace Gtkmm2ext { - class BindableToggleButton; -} - namespace ARDOUR { class AudioTrack; } @@ -43,21 +40,30 @@ namespace Gtk { class Widget; } +class BindableToggleButton; + class RouteUI : public virtual AxisView { public: - RouteUI(ARDOUR::Route&, ARDOUR::Session&, const char*, const char*, const char*); + RouteUI(boost::shared_ptr, ARDOUR::Session&, const char*, const char*, const char*); virtual ~RouteUI(); + bool is_track() const; bool is_audio_track() const; - ARDOUR::DiskStream* get_diskstream() const; - ARDOUR::Route& route() const { return _route; } + boost::shared_ptr route() const { return _route; } + + // FIXME: make these return shared_ptr + ARDOUR::Track* track() const; ARDOUR::AudioTrack* audio_track() const; + + boost::shared_ptr get_diskstream() const; string name() const; - - ARDOUR::Route& _route; + + // protected: XXX sigh this should be here + + boost::shared_ptr _route; void set_color (const Gdk::Color & c); bool choose_color (); @@ -65,9 +71,9 @@ class RouteUI : public virtual AxisView bool ignore_toggle; bool wait_for_release; - Gtkmm2ext::BindableToggleButton * mute_button; - Gtkmm2ext::BindableToggleButton * solo_button; - Gtkmm2ext::BindableToggleButton * rec_enable_button; + BindableToggleButton* mute_button; + BindableToggleButton* solo_button; + BindableToggleButton* rec_enable_button; virtual string solo_button_name () const { return "SoloButton"; } virtual string safe_solo_button_name () const { return "SafeSoloButton"; } @@ -81,15 +87,16 @@ class RouteUI : public virtual AxisView XMLNode* get_child_xml_node (const string & childname); - gint mute_press(GdkEventButton*); - gint mute_release(GdkEventButton*); - gint solo_press(GdkEventButton*); - gint solo_release(GdkEventButton*); - gint rec_enable_press(GdkEventButton*); + bool mute_press(GdkEventButton*); + bool mute_release(GdkEventButton*); + bool solo_press(GdkEventButton*); + bool solo_release(GdkEventButton*); + bool rec_enable_press(GdkEventButton*); void solo_changed(void*); void mute_changed(void*); - void route_rec_enable_changed(void*); + virtual void redirects_changed (void *) {} + void route_rec_enable_changed(); void session_rec_enable_changed(); void build_solo_menu (void); @@ -108,15 +115,15 @@ class RouteUI : public virtual AxisView void build_mute_menu(void); void init_mute_menu(ARDOUR::mute_type, Gtk::CheckMenuItem*); - void set_mix_group_solo(ARDOUR::Route&, bool); - void set_mix_group_mute(ARDOUR::Route&, bool); - void set_mix_group_rec_enable(ARDOUR::Route&, bool); + void set_mix_group_solo(boost::shared_ptr, bool); + void set_mix_group_mute(boost::shared_ptr, bool); + void set_mix_group_rec_enable(boost::shared_ptr, bool); int set_color_from_route (); sigc::connection blink_connection; - void rec_enable_button_blink (bool onoff, ARDOUR::DiskStream *, Gtk::Widget *w); + void rec_enable_button_blink (bool onoff, ARDOUR::AudioDiskstream *, Gtk::Widget *w); void remove_this_route (); static gint idle_remove_this_route (RouteUI *); @@ -130,6 +137,10 @@ class RouteUI : public virtual AxisView void toggle_route_active (); virtual void route_active_changed (); + Gtk::CheckMenuItem *polarity_menu_item; + void toggle_polarity (); + virtual void polarity_changed (); + void disconnect_input (); void disconnect_output ();