diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-06-21 15:18:54 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-06-21 15:18:54 -0400 |
commit | 479e97dc59cc52c79dca8fed63834ecc28f5e60c (patch) | |
tree | 7996dcdc74ae6b3efa445d7ad3f28da96f34c8a3 /gtk2_ardour/editor_drag.h | |
parent | a0791189817f67b6d1cfbe48688f02f121dbf270 (diff) |
some prep work for generally handling dbl-click on draggable objects
Diffstat (limited to 'gtk2_ardour/editor_drag.h')
-rw-r--r-- | gtk2_ardour/editor_drag.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gtk2_ardour/editor_drag.h b/gtk2_ardour/editor_drag.h index 4497cd025d..df55270e54 100644 --- a/gtk2_ardour/editor_drag.h +++ b/gtk2_ardour/editor_drag.h @@ -63,6 +63,8 @@ public: bool end_grab (GdkEvent *); bool have_item (ArdourCanvas::Item *) const; + void mark_double_click (); + /** @return true if an end drag or abort is in progress */ bool ending () const { return _ending; @@ -101,7 +103,7 @@ private: class Drag { public: - Drag (Editor *, ArdourCanvas::Item *); + Drag (Editor *, ArdourCanvas::Item *); virtual ~Drag () {} void set_manager (DragManager* m) { @@ -120,6 +122,9 @@ public: ARDOUR::framepos_t adjusted_frame (ARDOUR::framepos_t, GdkEvent const *, bool snap = true) const; ARDOUR::framepos_t adjusted_current_frame (GdkEvent const *, bool snap = true) const; + bool was_double_click() const { return _was_double_click; } + void set_double_click (bool yn) { _was_double_click = yn; } + /** Called to start a grab of an item. * @param e Event that caused the grab to start. * @param c Cursor to use, or 0. @@ -225,6 +230,7 @@ protected: private: bool _move_threshold_passed; ///< true if the move threshold has been passed, otherwise false + bool _was_double_click; ///< true if drag initiated by a double click event double _grab_x; ///< trackview x of the grab start position double _grab_y; ///< trackview y of the grab start position double _last_pointer_x; ///< trackview x of the pointer last time a motion occurred @@ -694,7 +700,7 @@ public: class MarkerDrag : public Drag { public: - MarkerDrag (Editor *, ArdourCanvas::Item *); + MarkerDrag (Editor *, ArdourCanvas::Item *); ~MarkerDrag (); void start_grab (GdkEvent *, Gdk::Cursor* c = 0); |