MIDI/Controllables for monitor section, and related fixes
[ardour.git] / gtk2_ardour / monitor_section.h
index 87b619e7d0f379d705f7f1be69c0488cd0a6dbf7..da20857aead13c7506ac05492e0d441e1ee4def5 100644 (file)
@@ -38,27 +38,39 @@ class MonitorSection : public RouteUI
         MonitorSection (ARDOUR::Session*);
         ~MonitorSection ();
 
-        Gtk::Widget& pack_widget () const;
-        void fast_update ();
+        void set_session (ARDOUR::Session*);
         static void setup_knob_images ();
 
+        Gtkmm2ext::TearOff& tearoff() const { return *_tearoff; }
+
   private:
         Gtk::VBox vpacker;
         Gtk::HBox hpacker;
         Gtk::Table main_table;
         Gtk::VBox upper_packer;
         Gtk::VBox lower_packer;
-        Gtk::VBox table_knob_packer;
-        Gtk::HBox knob_packer;
-        LevelMeter meter;
         Gtkmm2ext::TearOff* _tearoff;
 
+        struct ChannelButtonSet { 
+            BindableToggleButton cut;
+            BindableToggleButton dim;
+            BindableToggleButton solo;
+            BindableToggleButton invert;
+
+            ChannelButtonSet ();
+        };
+
+        typedef std::vector<ChannelButtonSet*> ChannelButtons;
+        ChannelButtons _channel_buttons;
+
         Gtk::Adjustment   gain_adjustment;
         VolumeController* gain_control;
         Gtk::Adjustment   dim_adjustment;
         VolumeController* dim_control;
         Gtk::Adjustment   solo_boost_adjustment;
         VolumeController* solo_boost_control;
+        Gtk::Adjustment   solo_cut_adjustment;
+        VolumeController* solo_cut_control;
 
         void populate_buttons ();
        void set_button_names ();
@@ -104,6 +116,12 @@ class MonitorSection : public RouteUI
 
         void solo_blink (bool);
         bool cancel_solo (GdkEventButton*);
-
-        bool tearoff_key_press_event (GdkEventKey*);
+        void solo_cut_changed ();
+        void update_solo_model ();
+        void parameter_changed (std::string);
+
+        PBD::ScopedConnection config_connection;
+        PBD::ScopedConnectionList control_connections;
+        
+        void assign_controllables ();
 };