diff options
author | Robin Gareus <robin@gareus.org> | 2019-11-09 05:03:38 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2019-11-09 06:00:01 +0100 |
commit | a8f9ba4a5edc7137dc02ae6d8b0245c3b1d5bc87 (patch) | |
tree | 7c577167faa88b170fa8e61349e7d79f44fd411d /gtk2_ardour/editor_drag.h | |
parent | a701882e665d71be9fdb14352332dafdc66e664b (diff) |
Preview video frame when dragging
Diffstat (limited to 'gtk2_ardour/editor_drag.h')
-rw-r--r-- | gtk2_ardour/editor_drag.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gtk2_ardour/editor_drag.h b/gtk2_ardour/editor_drag.h index 6994b8131f..f4a76cb599 100644 --- a/gtk2_ardour/editor_drag.h +++ b/gtk2_ardour/editor_drag.h @@ -120,6 +120,9 @@ public: return _current_pointer_sample; } + /** return drag-motion displays video-frame of drag-location */ + bool preview_video () const; + private: Editor* _editor; std::list<Drag*> _drags; @@ -189,6 +192,10 @@ public: return true; } + bool preview_video () const { + return _preview_video; + } + /** @return minimum number of samples (in x) and pixels (in y) that should be considered a movement */ virtual std::pair<ARDOUR::samplecnt_t, int> move_threshold () const { return std::make_pair (1, 1); @@ -217,6 +224,12 @@ public: _pointer_sample_offset = 0; } + /** Set up the _video_sample_offset - relative to _current_pointer_sample */ + virtual void setup_video_sample_offset () { + _video_sample_offset = 0; + _preview_video = false; + } + protected: double grab_x () const { @@ -261,12 +274,15 @@ protected: void show_verbose_cursor_time (samplepos_t); void show_verbose_cursor_duration (samplepos_t, samplepos_t, double xoffset = 0); void show_verbose_cursor_text (std::string const &); + void show_view_preview (samplepos_t); Editor* _editor; ///< our editor DragManager* _drags; ArdourCanvas::Item* _item; ///< our item /** Offset from the mouse's position for the drag to the start of the thing that is being dragged */ ARDOUR::samplecnt_t _pointer_sample_offset; + ARDOUR::samplecnt_t _video_sample_offset; + bool _preview_video; bool _x_constrained; ///< true if x motion is constrained, otherwise false bool _y_constrained; ///< true if y motion is constrained, otherwise false bool _was_rolling; ///< true if the session was rolling before the drag started, otherwise false @@ -341,6 +357,8 @@ protected: int _visible_y_high; uint32_t _ntracks; + void setup_video_sample_offset (); + friend class DraggingView; private: @@ -979,6 +997,7 @@ public: } void setup_pointer_sample_offset (); + void setup_video_sample_offset (); private: void update_item (ARDOUR::Location *); |