summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_drag.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-06-08 11:26:25 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2014-06-08 11:26:32 -0400
commit84873140695a97c21f9be1edd80b27817ee9b526 (patch)
tree13fcaa5e28230dff0bd628c8622c61eb2bc422da /gtk2_ardour/editor_drag.h
parent5e281d3b440b8087ad54f48dcab123aa9efa5b30 (diff)
introduce Drag::_trackview_only which indicates that all y-axis positions for the pointer during a drag should be relative to the top of the trackview group.
More or less all drags except for Cursor (playhead) and drags in the range marker bars have this true (which is the default value)
Diffstat (limited to 'gtk2_ardour/editor_drag.h')
-rw-r--r--gtk2_ardour/editor_drag.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/gtk2_ardour/editor_drag.h b/gtk2_ardour/editor_drag.h
index 259dc50778..7649813269 100644
--- a/gtk2_ardour/editor_drag.h
+++ b/gtk2_ardour/editor_drag.h
@@ -103,7 +103,7 @@ private:
class Drag
{
public:
- Drag (Editor *, ArdourCanvas::Item *);
+ Drag (Editor *, ArdourCanvas::Item *, bool trackview_only = true);
virtual ~Drag () {}
void set_manager (DragManager* m) {
@@ -212,6 +212,8 @@ protected:
return _last_pointer_frame;
}
+ double current_pointer_y () const;
+
boost::shared_ptr<ARDOUR::Region> add_midi_region (MidiTimeAxisView*);
void show_verbose_cursor_time (framepos_t);
@@ -228,11 +230,11 @@ protected:
bool _was_rolling; ///< true if the session was rolling before the drag started, otherwise false
private:
-
+ bool _trackview_only; ///< true if pointer y value should always be relative to the top of the trackview group
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 _grab_y; ///< y of the grab start position, possibly adjusted if _trackview_only is true
double _last_pointer_x; ///< trackview x of the pointer last time a motion occurred
double _last_pointer_y; ///< trackview y of the pointer last time a motion occurred
ARDOUR::framepos_t _raw_grab_frame; ///< unsnapped frame that the mouse was at when start_grab was called, or 0