Make send automation work (#4734).
[ardour.git] / gtk2_ardour / monitor_section.h
index 6ea9d3b5717e41dee88ee736b2a9c008b03f0479..f7848a3f01261f384efa3e9b61eca03d33f2ce05 100644 (file)
 
 #include "gtkmm2ext/bindable_button.h"
 
+#include "ardour_button.h"
 #include "axis_view.h"
 #include "level_meter.h"
 #include "route_ui.h"
 
 namespace Gtkmm2ext {
         class TearOff;
+        class MotionFeedback;
 }
 
 class VolumeController;
@@ -38,30 +40,46 @@ 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; }
+
+       std::string state_id() const;
+
   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::VBox knob_packer;
-        LevelMeter meter;
         Gtkmm2ext::TearOff* _tearoff;
 
-        Gtk::Adjustment   gain_adjustment;
+       Gtk::HBox  channel_table_packer;
+       Gtk::HBox  table_hpacker;
+        Gtk::Table channel_table;
+        Gtk::Table channel_table_header;
+       Gtk::ScrolledWindow channel_table_scroller;
+       Gtk::Viewport channel_table_viewport;
+       Glib::RefPtr<Gtk::SizeGroup> channel_size_group;
+
+        struct ChannelButtonSet {
+            ArdourButton cut;
+            ArdourButton dim;
+            ArdourButton solo;
+            ArdourButton invert;
+
+            ChannelButtonSet ();
+        };
+
+        typedef std::vector<ChannelButtonSet*> ChannelButtons;
+        ChannelButtons _channel_buttons;
+
         VolumeController* gain_control;
-        Gtk::Adjustment   dim_adjustment;
         VolumeController* dim_control;
-        Gtk::Adjustment   solo_boost_adjustment;
         VolumeController* solo_boost_control;
+        VolumeController* solo_cut_control;
 
         void populate_buttons ();
-       void set_button_names ();
         void map_state ();
 
         boost::shared_ptr<ARDOUR::MonitorProcessor> _monitor;
@@ -80,19 +98,45 @@ class MonitorSection : public RouteUI
         void dim_all ();
         void cut_all ();
         void mono ();
+        void toggle_exclusive_solo ();
+       void set_button_names () {}
+        void toggle_mute_overrides_solo ();
         void dim_level_changed ();
         void solo_boost_changed ();
         void gain_value_changed ();
 
-        bool nonlinear_gain_printer (Gtk::SpinButton*);
-        bool linear_gain_printer (Gtk::SpinButton*);
-
-        Gtk::RadioButtonGroup solo_model_group;
-        Gtk::RadioButton solo_in_place_button;
-        Gtk::RadioButton afl_button;
-        Gtk::RadioButton pfl_button;
+        ArdourButton solo_in_place_button;
+        ArdourButton afl_button;
+        ArdourButton pfl_button;
         Gtk::HBox        solo_model_box;
 
-        BindableToggleButton cut_all_button;
-        BindableToggleButton dim_all_button;
+        void solo_use_in_place ();
+        void solo_use_afl ();
+        void solo_use_pfl ();
+
+        ArdourButton cut_all_button;
+        ArdourButton dim_all_button;
+        ArdourButton mono_button;
+        ArdourButton rude_solo_button;
+        ArdourButton rude_iso_button;
+        ArdourButton rude_audition_button;
+        ArdourButton exclusive_solo_button;
+        ArdourButton solo_mute_override_button;
+
+        void do_blink (bool);
+        void solo_blink (bool);
+        void audition_blink (bool);
+        bool cancel_solo (GdkEventButton*);
+        bool cancel_isolate (GdkEventButton*);
+        bool cancel_audition (GdkEventButton*);
+        void update_solo_model ();
+        void parameter_changed (std::string);
+        void isolated_changed ();
+
+        PBD::ScopedConnection config_connection;
+        PBD::ScopedConnectionList control_connections;
+
+       bool _inhibit_solo_model_update;
+       
+        void assign_controllables ();
 };