forward port of 7539 from 2.x
[ardour.git] / gtk2_ardour / mixer_strip.h
index ac68b505ef2b752af591f00645297fee5b6921a9..bbebbcaf15e0791a6b77604dde42cb64bc64f97b 100644 (file)
@@ -79,8 +79,8 @@ class RouteGroupMenu;
 class MixerStrip : public RouteUI, public Gtk::EventBox
 {
   public:
-       MixerStrip (Mixer_UI&, ARDOUR::Session&, boost::shared_ptr<ARDOUR::Route>, bool in_mixer = true);
-       MixerStrip (Mixer_UI&, ARDOUR::Session&, bool in_mixer = true);
+       MixerStrip (Mixer_UI&, ARDOUR::Session*, boost::shared_ptr<ARDOUR::Route>, bool in_mixer = true);
+       MixerStrip (Mixer_UI&, ARDOUR::Session*, bool in_mixer = true);
        ~MixerStrip ();
 
        void set_width_enum (Width, void* owner);
@@ -97,10 +97,16 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
        ARDOUR::RouteGroup* route_group() const;
        void set_route (boost::shared_ptr<ARDOUR::Route>);
        void set_button_names ();
+       void show_send (boost::shared_ptr<ARDOUR::Send>);
+
+       bool mixer_owned () const {
+               return _mixer_owned;
+       }
 
        sigc::signal<void>      WidthChanged;
 
        static sigc::signal<void,boost::shared_ptr<ARDOUR::Route> > SwitchIO;
+       static PBD::Signal1<void,MixerStrip*> CatchDeletion;
 
   protected:
        friend class Mixer_UI;
@@ -146,6 +152,8 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
        Gtk::ToggleButton _mono_button;
 
        Gtk::Table button_table;
+        Gtk::Table solo_led_table;
+        Gtk::HBox  solo_led_box;
        Gtk::Table middle_button_table;
        Gtk::Table bottom_button_table;
 
@@ -154,7 +162,7 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
        Gtk::Button                  meter_point_button;
        Gtk::Label                   meter_point_label;
 
-       void meter_changed (void *);
+       void meter_changed ();
 
        Gtk::Button diskstream_button;
        Gtk::Label  diskstream_label;
@@ -164,7 +172,7 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
        Gtk::Button output_button;
        Gtk::Label  output_label;
 
-       sigc::connection newplug_connection;
+       std::string longest_label;
 
        gint    mark_update_safe ();
        guint32 mode_switch_in_progress;
@@ -187,10 +195,12 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
        gint input_press (GdkEventButton *);
        gint output_press (GdkEventButton *);
 
-       Gtk::Menu  input_menu;
+       Gtk::Menu input_menu;
+       std::list<boost::shared_ptr<ARDOUR::Bundle> > input_menu_bundles;
        void maybe_add_bundle_to_input_menu (boost::shared_ptr<ARDOUR::Bundle>, ARDOUR::BundleList const &);
 
        Gtk::Menu output_menu;
+       std::list<boost::shared_ptr<ARDOUR::Bundle> > output_menu_bundles;
        void maybe_add_bundle_to_output_menu (boost::shared_ptr<ARDOUR::Bundle>, ARDOUR::BundleList const &);
 
        void bundle_input_toggled (boost::shared_ptr<ARDOUR::Bundle>);
@@ -211,8 +221,8 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
        void input_changed (ARDOUR::IOChange, void *);
        void output_changed (ARDOUR::IOChange, void *);
 
-       sigc::connection panstate_connection;
-       sigc::connection panstyle_connection;
+       PBD::ScopedConnection panstate_connection;
+       PBD::ScopedConnection panstyle_connection;
        void connect_to_pan ();
 
        void update_diskstream_display ();
@@ -223,7 +233,7 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
 
        Gtk::Menu* route_ops_menu;
        void build_route_ops_menu ();
-       gint name_button_button_press (GdkEventButton*);
+       gboolean name_button_button_press (GdkEventButton*);
        void list_route_operations ();
 
        gint comment_key_release_handler (GdkEventKey*);
@@ -233,7 +243,7 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
 
        void set_route_group (ARDOUR::RouteGroup *);
        bool select_route_group (GdkEventButton *);
-       void route_group_changed (void *);
+       void route_group_changed ();
 
        IOSelectorWindow *input_selector;
        IOSelectorWindow *output_selector;
@@ -261,6 +271,11 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
        boost::shared_ptr<ARDOUR::Delivery> _current_delivery;
        void revert_to_default_display ();
 
+       void drop_send ();
+       PBD::ScopedConnection send_gone_connection;
+
+       void reset_strip_style ();
+
        static int scrollbar_height;
 
        void update_io_button (boost::shared_ptr<ARDOUR::Route> route, Width width, bool input_button);