OSC: Changed gainVCA to gainfader as VCA is already used.
[ardour.git] / gtk2_ardour / gain_meter.h
index 8286cbeb954893b8cd6abc73ca36e58277433439..7cf3410241b28556a338ee730392af1b0f0b013c 100644 (file)
@@ -49,6 +49,7 @@
 
 namespace ARDOUR {
        class IO;
+       class GainControl;
        class Session;
        class Route;
        class RouteGroup;
@@ -58,7 +59,6 @@ namespace ARDOUR {
 }
 namespace Gtkmm2ext {
        class FastMeter;
-       class BarController;
 }
 namespace Gtk {
        class Menu;
@@ -72,18 +72,19 @@ class GainMeterBase : virtual public sigc::trackable, ARDOUR::SessionHandlePtr
 
        virtual void set_controls (boost::shared_ptr<ARDOUR::Route> route,
                                   boost::shared_ptr<ARDOUR::PeakMeter> meter,
-                                  boost::shared_ptr<ARDOUR::Amp> amp);
+                                  boost::shared_ptr<ARDOUR::Amp> amp,
+                                  boost::shared_ptr<ARDOUR::GainControl> control);
 
        void update_gain_sensitive ();
        void update_meters ();
 
+       const ARDOUR::ChanCount meter_channels () const;
+
        void effective_gain_display ();
        void set_width (Width, int len=0);
        void set_meter_strip_name (const char * name);
        void set_fader_name (const char * name);
 
-       void set_flat_buttons ();
-
        virtual void setup_meters (int len=0);
        virtual void set_type (ARDOUR::MeterType);
 
@@ -101,9 +102,11 @@ class GainMeterBase : virtual public sigc::trackable, ARDOUR::SessionHandlePtr
 
        friend class MixerStrip;
        friend class MeterStrip;
+       friend class RouteTimeAxisView;
        boost::shared_ptr<ARDOUR::Route> _route;
        boost::shared_ptr<ARDOUR::PeakMeter> _meter;
        boost::shared_ptr<ARDOUR::Amp> _amp;
+       boost::shared_ptr<ARDOUR::GainControl> _control;
        std::vector<sigc::connection> connections;
        PBD::ScopedConnectionList model_connections;
 
@@ -113,7 +116,8 @@ class GainMeterBase : virtual public sigc::trackable, ARDOUR::SessionHandlePtr
        Gtkmm2ext::SliderController *gain_slider;
        Gtk::Adjustment              gain_adjustment;
        Gtkmm2ext::FocusEntry        gain_display;
-       Gtk::Button                  peak_display;
+       Gtkmm2ext::FocusEntry        peak_display;
+//     Gtk::Button                  peak_display;
        Gtk::DrawingArea             meter_metric_area;
        Gtk::DrawingArea             meter_ticks1_area;
        Gtk::DrawingArea             meter_ticks2_area;
@@ -169,8 +173,8 @@ class GainMeterBase : virtual public sigc::trackable, ARDOUR::SessionHandlePtr
        Gtk::Menu* meter_menu;
        void popup_meter_menu (GdkEventButton*);
 
-       bool gain_slider_button_press (GdkEventButton *);
-       bool gain_slider_button_release (GdkEventButton *);
+       void amp_stop_touch ();
+       void amp_start_touch ();
 
        void set_route_group_meter_point (ARDOUR::Route&, ARDOUR::MeterPoint);
        void set_meter_point (ARDOUR::Route&, ARDOUR::MeterPoint);
@@ -205,7 +209,8 @@ class GainMeter : public GainMeterBase, public Gtk::VBox
 
        virtual void set_controls (boost::shared_ptr<ARDOUR::Route> route,
                                   boost::shared_ptr<ARDOUR::PeakMeter> meter,
-                                  boost::shared_ptr<ARDOUR::Amp> amp);
+                                  boost::shared_ptr<ARDOUR::Amp> amp,
+                                  boost::shared_ptr<ARDOUR::GainControl> control);
 
        int get_gm_width ();
        void setup_meters (int len=0);
@@ -218,6 +223,7 @@ class GainMeter : public GainMeterBase, public Gtk::VBox
        gint meter_metrics_expose (GdkEventExpose *);
        gint meter_ticks1_expose (GdkEventExpose *);
        gint meter_ticks2_expose (GdkEventExpose *);
+       void on_style_changed (const Glib::RefPtr<Gtk::Style>&);
 
   private: