Catch keyboard events on notes.
[ardour.git] / gtk2_ardour / gain_meter.h
index 8d80e3678144b0c93a24a5f4348c0ce8a20e8a56..3839221e7368fec67fb23e026c1523490c45d974 100644 (file)
@@ -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__
 #include <gtkmm/button.h>
 #include <gtkmm/table.h>
 #include <gtkmm/drawingarea.h>
+#include <gdkmm/colormap.h>
 
 #include <ardour/types.h>
 
 #include <gtkmm2ext/click_box.h>
+#include <gtkmm2ext/focus_entry.h>
 #include <gtkmm2ext/slider_controller.h>
 
 #include "enums.h"
@@ -69,6 +70,8 @@ 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);
 
@@ -79,11 +82,12 @@ class GainMeter : public Gtk::VBox
        ARDOUR::Session& _session;
 
        bool ignore_toggle;
+       bool next_release_selects;
 
        Gtkmm2ext::VSliderController *gain_slider;
        Gtk::Adjustment              gain_adjustment;
-       Gtk::Entry                   gain_display;
-       Gtk::Entry                   peak_display;
+       Gtkmm2ext::FocusEntry        gain_display;
+       Gtk::Button                  peak_display;
        Gtk::HBox                    gain_display_box;
        Gtk::HBox                    fader_box;
        Gtk::DrawingArea             meter_metric_area;
@@ -120,7 +124,8 @@ class GainMeter : public Gtk::VBox
        gint meter_metrics_expose (GdkEventExpose *);
 
        void show_gain ();
-       void gain_entered ();
+       void gain_activated ();
+       bool gain_focused (GdkEventFocus*);
 
        struct MeterInfo {
            Gtkmm2ext::FastMeter *meter;
@@ -144,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 ();
@@ -181,6 +186,9 @@ class GainMeter : public Gtk::VBox
        static Glib::RefPtr<Gdk::Pixbuf> slider;
        static Glib::RefPtr<Gdk::Pixbuf> rail;
        static int setup_slider_pix ();
+
+       void on_theme_changed ();
+       bool style_changed;
 };
 
 #endif /* __ardour_gtk_gain_meter_h__ */