+ /** @return current pointer frame */
+ ARDOUR::framepos_t current_pointer_frame () const {
+ return _current_pointer_frame;
+ }
+
+private:
+ Editor* _editor;
+ std::list<Drag*> _drags;
+ bool _ending; ///< true if end_grab or abort is in progress, otherwise false
+ double _current_pointer_x; ///< trackview x of the current pointer
+ double _current_pointer_y; ///< trackview y of the current pointer
+ ARDOUR::framepos_t _current_pointer_frame; ///< frame that the pointer is now at
+ bool _old_follow_playhead; ///< state of Editor::follow_playhead() before the drags started
+};
+
+/** Abstract base class for dragging of things within the editor */
+class Drag
+{
+public:
+ Drag (Editor *, ArdourCanvas::Item *);
+ virtual ~Drag () {}
+
+ void set_manager (DragManager* m) {
+ _drags = m;
+ }
+
+ /** @return the canvas item being dragged */
+ ArdourCanvas::Item* item () const {
+ return _item;
+ }
+
+ void swap_grab (ArdourCanvas::Item *, Gdk::Cursor *, uint32_t);
+ bool motion_handler (GdkEvent*, bool);
+ void abort ();
+
+ 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;