diff options
author | Ben Loftis <ben@glw.com> | 2012-12-06 19:09:16 +0000 |
---|---|---|
committer | Ben Loftis <ben@glw.com> | 2012-12-06 19:09:16 +0000 |
commit | 27bfb0f9e2db321d9596912ed95ccb6bcd00bc57 (patch) | |
tree | 2bc2cc9522138be8b2e0ef4bec95a6eac9e07134 /gtk2_ardour/shuttle_control.h | |
parent | 044f89a76d6bb3cd892f1ad0e5112e6cd08f3483 (diff) |
new look for transport shuttle box. still operates brokenly though
git-svn-id: svn://localhost/ardour2/branches/3.0@13609 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/shuttle_control.h')
-rw-r--r-- | gtk2_ardour/shuttle_control.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gtk2_ardour/shuttle_control.h b/gtk2_ardour/shuttle_control.h index ab58969743..c16328e384 100644 --- a/gtk2_ardour/shuttle_control.h +++ b/gtk2_ardour/shuttle_control.h @@ -32,7 +32,7 @@ namespace Gtk { #include "ardour/types.h" -class ShuttleControl : public Gtk::DrawingArea, public ARDOUR::SessionHandlePtr +class ShuttleControl : public CairoWidget, public ARDOUR::SessionHandlePtr { public: ShuttleControl (); @@ -55,6 +55,7 @@ class ShuttleControl : public Gtk::DrawingArea, public ARDOUR::SessionHandlePtr boost::shared_ptr<ShuttleControllable> controllable() const { return _controllable; } protected: + bool _hovering; float shuttle_max_speed; float last_speed_displayed; bool shuttle_grabbed; @@ -62,6 +63,7 @@ class ShuttleControl : public Gtk::DrawingArea, public ARDOUR::SessionHandlePtr float shuttle_fract; boost::shared_ptr<ShuttleControllable> _controllable; cairo_pattern_t* pattern; + cairo_pattern_t* shine_pattern; ARDOUR::microseconds_t last_shuttle_request; PBD::ScopedConnection parameter_connection; Gtk::Menu* shuttle_unit_menu; @@ -75,11 +77,15 @@ class ShuttleControl : public Gtk::DrawingArea, public ARDOUR::SessionHandlePtr void shuttle_unit_clicked (); void set_shuttle_max_speed (float); + bool on_enter_notify_event (GdkEventCrossing*); + bool on_leave_notify_event (GdkEventCrossing*); bool on_button_press_event (GdkEventButton*); bool on_button_release_event(GdkEventButton*); bool on_scroll_event (GdkEventScroll*); bool on_motion_notify_event(GdkEventMotion*); - bool on_expose_event(GdkEventExpose*); + + void render (cairo_t *); + void on_size_allocate (Gtk::Allocation&); bool on_query_tooltip (int, int, bool, const Glib::RefPtr<Gtk::Tooltip>&); |