X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fgain_meter.h;h=3839221e7368fec67fb23e026c1523490c45d974;hb=991fab113fc37836a7e8cefaad209241d239ae4b;hp=0ed09ee383b661831115d3796a749d79e1370ebe;hpb=50a3102b9b533d7f8786d220f8df67421b9227c8;p=ardour.git diff --git a/gtk2_ardour/gain_meter.h b/gtk2_ardour/gain_meter.h index 0ed09ee383..3839221e73 100644 --- a/gtk2_ardour/gain_meter.h +++ b/gtk2_ardour/gain_meter.h @@ -15,7 +15,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id$ */ #ifndef __ardour_gtk_gain_meter_h__ @@ -31,10 +30,12 @@ #include #include #include +#include #include #include +#include #include #include "enums.h" @@ -56,7 +57,7 @@ namespace Gtk { class GainMeter : public Gtk::VBox { public: - GainMeter (ARDOUR::IO&, ARDOUR::Session&); + GainMeter (boost::shared_ptr, ARDOUR::Session&); ~GainMeter (); void update_gain_sensitive (); @@ -69,24 +70,24 @@ class GainMeter : public Gtk::VBox void set_width (Width); void setup_meters (); + int get_gm_width (); + void set_meter_strip_name (const char * name); void set_fader_name (const char * name); private: friend class MixerStrip; - ARDOUR::IO& _io; + boost::shared_ptr _io; ARDOUR::Session& _session; bool ignore_toggle; + bool next_release_selects; Gtkmm2ext::VSliderController *gain_slider; Gtk::Adjustment gain_adjustment; - Gtk::Frame gain_display_frame; - Gtkmm2ext::ClickBox gain_display; - Gtk::Frame peak_display_frame; - Gtk::EventBox peak_display; - Gtk::Label peak_display_label; + Gtkmm2ext::FocusEntry gain_display; + Gtk::Button peak_display; Gtk::HBox gain_display_box; Gtk::HBox fader_box; Gtk::DrawingArea meter_metric_area; @@ -122,9 +123,10 @@ class GainMeter : public Gtk::VBox gint meter_metrics_expose (GdkEventExpose *); - static void _gain_printer (char buf[32], Gtk::Adjustment&, void *); - void gain_printer (char buf[32], Gtk::Adjustment&); - + void show_gain (); + void gain_activated (); + bool gain_focused (GdkEventFocus*); + struct MeterInfo { Gtkmm2ext::FastMeter *meter; gint16 width; @@ -147,7 +149,7 @@ class GainMeter : public Gtk::VBox Gtk::HBox meter_packer; void gain_adjusted (); - void gain_changed (void *); + void gain_changed (); void meter_point_clicked (); void gain_unit_changed (); @@ -157,7 +159,8 @@ class GainMeter : public Gtk::VBox gint meter_button_press (GdkEventButton*, uint32_t); gint meter_button_release (GdkEventButton*, uint32_t); - gint peak_button_release (GdkEventButton*); + bool peak_button_release (GdkEventButton*); + bool gain_key_press (GdkEventKey*); Gtk::Menu* meter_menu; void popup_meter_menu (GdkEventButton*); @@ -172,7 +175,7 @@ class GainMeter : public Gtk::VBox bool wait_for_release; ARDOUR::MeterPoint old_meter_point; - void meter_hold_changed(); + void parameter_changed (const char*); void reset_peak_display (); void reset_group_peak_display (ARDOUR::RouteGroup*); @@ -183,6 +186,9 @@ class GainMeter : public Gtk::VBox static Glib::RefPtr slider; static Glib::RefPtr rail; static int setup_slider_pix (); + + void on_theme_changed (); + bool style_changed; }; #endif /* __ardour_gtk_gain_meter_h__ */