X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Feditor_drag.h;h=97e503f0d680de2829eb4fb3609cfbaf85e6bea3;hb=4f3bddf7ef163c3106ba973123cbc657ebaf4b74;hp=370cc566436aef6ebd888114c8acf61f3f920079;hpb=0874426a5b6777559a12f87070b2aadb230ec50d;p=ardour.git diff --git a/gtk2_ardour/editor_drag.h b/gtk2_ardour/editor_drag.h index 370cc56643..97e503f0d6 100644 --- a/gtk2_ardour/editor_drag.h +++ b/gtk2_ardour/editor_drag.h @@ -110,11 +110,12 @@ public: return false; } - /** Called when a subclass should update the editor's selection following a drag */ - virtual void update_selection () {} + virtual bool allow_vertical_autoscroll () const { + return true; + } protected: - nframes64_t adjusted_current_frame () const; + nframes64_t adjusted_current_frame (GdkEvent *) const; Editor* _editor; ///< our editor ArdourCanvas::Item* _item; ///< our item @@ -151,8 +152,6 @@ public: RegionDrag (Editor *, ArdourCanvas::Item *, RegionView *, std::list const &); virtual ~RegionDrag () {} - void update_selection (); - protected: RegionView* _primary; ///< the view that was clicked on (or whatever) to start the drag @@ -339,6 +338,14 @@ public: void motion (GdkEvent *, bool); void finished (GdkEvent *, bool); + bool active (Editing::MouseMode) { + return true; + } + + bool allow_vertical_autoscroll () const { + return false; + } + private: EditorCursor* _cursor; ///< cursor being dragged bool _stop; ///< true to stop the transport on starting the drag, otherwise false @@ -397,6 +404,8 @@ public: void motion (GdkEvent *, bool); void finished (GdkEvent *, bool); + bool active (Editing::MouseMode m); + private: ControlPoint* _point; @@ -414,6 +423,10 @@ public: void start_grab (GdkEvent *, Gdk::Cursor* c = 0); void motion (GdkEvent *, bool); void finished (GdkEvent *, bool); + + bool active (Editing::MouseMode) { + return true; + } private: @@ -445,7 +458,18 @@ public: void finished (GdkEvent *, bool); }; -/** Drag in range selection mode */ +/** Scrub drag in audition mode */ +class ScrubDrag : public Drag +{ +public: + ScrubDrag (Editor *e, ArdourCanvas::Item *i) : Drag (e, i) {} + + void start_grab (GdkEvent *, Gdk::Cursor* c = 0); + void motion (GdkEvent *, bool); + void finished (GdkEvent *, bool); +}; + +/** Drag in range select(gc_owner.get()) moAutomatable */ class SelectionDrag : public Drag { public: