summaryrefslogtreecommitdiff
path: root/gtk2_ardour/ardour_button.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-11-07 19:14:31 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-11-07 19:14:31 +0000
commitcccc71e011180f610afb2791988933e8c16bf938 (patch)
treee206d409025fc684900d313e3def98eec9bbffbf /gtk2_ardour/ardour_button.h
parentb21819b9ee5820533a7a51252f124555aab459f6 (diff)
add hovering/show click functionality to ArdourButton
git-svn-id: svn://localhost/ardour2/branches/3.0@10478 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/ardour_button.h')
-rw-r--r--gtk2_ardour/ardour_button.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/gtk2_ardour/ardour_button.h b/gtk2_ardour/ardour_button.h
index f13a36835e..e1f5f80bd4 100644
--- a/gtk2_ardour/ardour_button.h
+++ b/gtk2_ardour/ardour_button.h
@@ -39,7 +39,7 @@ class ArdourButton : public CairoWidget
Text = 0x4,
Indicator = 0x8,
};
-
+
static Element default_elements;
static Element led_default_elements;
static Element just_led_default_elements;
@@ -48,6 +48,15 @@ class ArdourButton : public CairoWidget
ArdourButton (const std::string&, Element e = default_elements);
virtual ~ArdourButton ();
+ enum Tweaks {
+ ShowClick = 0x1,
+ ShowHover = 0x2,
+ NoModel = 0x4,
+ };
+
+ Tweaks tweaks() const { return _tweaks; }
+ void set_tweaks (Tweaks);
+
void set_active_state (Gtkmm2ext::ActiveState);
void set_visual_state (Gtkmm2ext::VisualState);
@@ -81,6 +90,8 @@ class ArdourButton : public CairoWidget
void on_size_request (Gtk::Requisition* req);
void on_size_allocate (Gtk::Allocation&);
void on_style_changed (const Glib::RefPtr<Gtk::Style>&);
+ bool on_enter_notify_event (GdkEventCrossing*);
+ bool on_leave_notify_event (GdkEventCrossing*);
void controllable_changed ();
PBD::ScopedConnection watch_connection;
@@ -90,6 +101,7 @@ class ArdourButton : public CairoWidget
Glib::RefPtr<Gdk::Pixbuf> _pixbuf;
std::string _text;
Element _elements;
+ Tweaks _tweaks;
BindingProxy binding_proxy;
bool _act_on_release;
@@ -117,6 +129,7 @@ class ArdourButton : public CairoWidget
bool _fixed_diameter;
bool _distinct_led_click;
cairo_rectangle_t* _led_rect;
+ bool _hovering;
void setup_led_rect ();
void set_colors ();