diff options
author | Ben Loftis <ben@harrisonconsoles.com> | 2017-07-20 09:51:26 -0500 |
---|---|---|
committer | Ben Loftis <ben@harrisonconsoles.com> | 2017-07-20 09:51:26 -0500 |
commit | 40e2f9a68ab15b5accd1cd992c07d906d7d9b637 (patch) | |
tree | eff5949c3e3a282f3e348a230aaff43e78baf327 /gtk2_ardour/editor_drag.h | |
parent | 3b47a42127e4814611fb56a921fca9192ffac51f (diff) |
CursorZoomDrag rework:
* If the use-time-rulers-to-zoom option is enabled, -all- cursor drags can zoom.
* Behavior has been tweaked so it is easy to scroll without zooming, if you want to.
Diffstat (limited to 'gtk2_ardour/editor_drag.h')
-rw-r--r-- | gtk2_ardour/editor_drag.h | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/gtk2_ardour/editor_drag.h b/gtk2_ardour/editor_drag.h index 17e459ba67..f2b08d4cfe 100644 --- a/gtk2_ardour/editor_drag.h +++ b/gtk2_ardour/editor_drag.h @@ -907,6 +907,12 @@ private: EditorCursor& _cursor; bool _stop; ///< true to stop the transport on starting the drag, otherwise false double _grab_zoom; ///< editor frames per unit when our grab started + + //used for zooming + int _last_mx; + int _last_my; + int _last_dx; + int _last_y_delta; }; /** Region fade-in drag */ @@ -1295,21 +1301,5 @@ private: bool start; }; -class RulerZoomDrag : public Drag -{ -public: - RulerZoomDrag (Editor*, ArdourCanvas::Item*); - - void start_grab (GdkEvent*, Gdk::Cursor* c = 0); - void motion (GdkEvent *, bool); - void finished (GdkEvent*, bool); - void aborted (bool); - - virtual bool allow_vertical_autoscroll () const { - return false; - } - -}; - #endif /* __gtk2_ardour_editor_drag_h_ */ |