X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fgain_meter.h;h=88105ce846afdd99ede76101053e4523c93d52b3;hb=aa60114843f4990ef93ba83974501495ddda358b;hp=597cb06cb387753f7d12a921e0e3aa8fdbb24cd0;hpb=796ded66a38f9f333a084b22e91be18c5348dd3e;p=ardour.git diff --git a/gtk2_ardour/gain_meter.h b/gtk2_ardour/gain_meter.h index 597cb06cb3..88105ce846 100644 --- a/gtk2_ardour/gain_meter.h +++ b/gtk2_ardour/gain_meter.h @@ -22,6 +22,7 @@ #define __ardour_gtk_gain_meter_h__ #include +#include #include #include @@ -31,11 +32,11 @@ #include #include - #include -#include #include +#include +#include #include "enums.h" @@ -48,7 +49,6 @@ namespace ARDOUR { namespace Gtkmm2ext { class FastMeter; class BarController; - class Pix; } namespace Gtk { class Menu; @@ -57,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 (); @@ -74,33 +74,57 @@ class GainMeter : public Gtk::VBox void set_fader_name (const char * name); private: - ARDOUR::IO& _io; + + friend class MixerStrip; + 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; - Gtk::Button gain_unit_button; - Gtk::Label gain_unit_label; + Gtkmm2ext::FocusEntry gain_display; + Gtk::Entry peak_display; Gtk::HBox gain_display_box; Gtk::HBox fader_box; Gtk::DrawingArea meter_metric_area; - Gtk::Button meter_point_button; - Gtk::Label meter_point_label; - Gtk::Table top_table; + + sigc::connection gain_watching; + + Gtk::Button gain_automation_style_button; + Gtk::ToggleButton gain_automation_state_button; + + Gtk::Menu gain_astate_menu; + Gtk::Menu gain_astyle_menu; + + gint gain_automation_style_button_event (GdkEventButton *); + gint gain_automation_state_button_event (GdkEventButton *); + gint pan_automation_style_button_event (GdkEventButton *); + gint pan_automation_state_button_event (GdkEventButton *); + + void gain_automation_state_changed(); + void gain_automation_style_changed(); + + std::string astate_string (ARDOUR::AutoState); + std::string short_astate_string (ARDOUR::AutoState); + std::string _astate_string (ARDOUR::AutoState, bool); + + std::string astyle_string (ARDOUR::AutoStyle); + std::string short_astyle_string (ARDOUR::AutoStyle); + std::string _astyle_string (ARDOUR::AutoStyle, bool); + Width _width; + static std::map > metric_pixmaps; + static Glib::RefPtr render_metrics (Gtk::Widget&); + 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; @@ -118,7 +142,7 @@ class GainMeter : public Gtk::VBox vector meters; float max_peak; - + Gtk::VBox* fader_vbox; Gtk::HBox hbox; Gtk::HBox meter_packer; @@ -126,7 +150,6 @@ class GainMeter : public Gtk::VBox void gain_changed (void *); void meter_point_clicked (); - void meter_changed (void *); void gain_unit_changed (); void hide_all_meters (); @@ -134,7 +157,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*); @@ -149,7 +173,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*); @@ -157,7 +181,8 @@ class GainMeter : public Gtk::VBox static sigc::signal ResetAllPeakDisplays; static sigc::signal ResetGroupPeakDisplays; - static Gtkmm2ext::Pix* slider_pix; + static Glib::RefPtr slider; + static Glib::RefPtr rail; static int setup_slider_pix (); };