diff options
Diffstat (limited to 'gtk2_ardour/editor_drag.h')
-rw-r--r-- | gtk2_ardour/editor_drag.h | 59 |
1 files changed, 58 insertions, 1 deletions
diff --git a/gtk2_ardour/editor_drag.h b/gtk2_ardour/editor_drag.h index 711b5095c7..d190c54424 100644 --- a/gtk2_ardour/editor_drag.h +++ b/gtk2_ardour/editor_drag.h @@ -792,7 +792,8 @@ private: bool _copy; bool _movable; - double _grab_bpm; + ARDOUR::Tempo _grab_bpm; + double _grab_qn; XMLNode* before_state; }; @@ -823,6 +824,62 @@ private: XMLNode* before_state; }; +/** tempo curve twist drag */ +class TempoTwistDrag : public Drag +{ +public: + TempoTwistDrag (Editor *, ArdourCanvas::Item *); + + void start_grab (GdkEvent *, Gdk::Cursor* c = 0); + void motion (GdkEvent *, bool); + void finished (GdkEvent *, bool); + void aborted (bool); + + bool allow_vertical_autoscroll () const { + return false; + } + + bool y_movement_matters () const { + return true; + } + + void setup_pointer_frame_offset (); + +private: + double _grab_qn; + ARDOUR::Tempo _grab_tempo; + ARDOUR::TempoSection* _tempo; + XMLNode* before_state; +}; + + +/** tempo curve twist drag */ +class TempoEndDrag : public Drag +{ +public: + TempoEndDrag (Editor *, ArdourCanvas::Item *); + + void start_grab (GdkEvent *, Gdk::Cursor* c = 0); + void motion (GdkEvent *, bool); + void finished (GdkEvent *, bool); + void aborted (bool); + + bool allow_vertical_autoscroll () const { + return false; + } + + bool y_movement_matters () const { + return true; + } + + void setup_pointer_frame_offset (); + +private: + double _grab_qn; + ARDOUR::TempoSection* _tempo; + XMLNode* before_state; +}; + /** Drag of the playhead cursor */ class CursorDrag : public Drag { |