diff options
author | Colin Fletcher <colin.m.fletcher@googlemail.com> | 2014-07-01 19:10:47 +0100 |
---|---|---|
committer | Colin Fletcher <colin.m.fletcher@googlemail.com> | 2014-07-01 19:10:47 +0100 |
commit | e5e12acc5698090f2c0c614385e457cc0b46fbb0 (patch) | |
tree | 3f4f28baba25f4e276d669d98ff485f7c51aa0b1 /gtk2_ardour/editor_drag.h | |
parent | 23e7cf10191270d70357ccf0ed9294f020c7b7ab (diff) | |
parent | da65f3778c66dd2935709445c9a5dbd225296439 (diff) |
Merge branch 'ripple-mode-cc' into cairocanvas
Fix up merge conflicts in
gtk2_ardour/editor_mouse.cc
gtk2_ardour/editor_ops.cc
Also fix up compile errors.
Diffstat (limited to 'gtk2_ardour/editor_drag.h')
-rw-r--r-- | gtk2_ardour/editor_drag.h | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/gtk2_ardour/editor_drag.h b/gtk2_ardour/editor_drag.h index 476d98a2d4..d9eda5685a 100644 --- a/gtk2_ardour/editor_drag.h +++ b/gtk2_ardour/editor_drag.h @@ -316,7 +316,7 @@ public: protected: double compute_x_delta (GdkEvent const *, ARDOUR::framepos_t *); - bool y_movement_allowed (int, double) const; + virtual bool y_movement_allowed (int, double) const; bool _brushing; ARDOUR::framepos_t _last_frame_position; ///< last position of the thing being dragged @@ -349,9 +349,11 @@ public: void setup_pointer_frame_offset (); -private: +protected: typedef std::set<boost::shared_ptr<ARDOUR::Playlist> > PlaylistSet; + void add_stateful_diff_commands_for_playlists (PlaylistSet const &); +private: void finished_no_copy ( bool const, bool const, @@ -378,7 +380,6 @@ private: PlaylistSet& modified_playlists ); - void add_stateful_diff_commands_for_playlists (PlaylistSet const &); void collect_new_region_view (RegionView *); RouteTimeAxisView* create_destination_time_axis (boost::shared_ptr<ARDOUR::Region>, TimeAxisView* original); @@ -412,6 +413,33 @@ public: void aborted (bool); }; +/** Region drag in ripple mode */ + +class RegionRippleDrag : public RegionMoveDrag +{ +public: + RegionRippleDrag (Editor *, ArdourCanvas::Item *, RegionView *, std::list<RegionView*> const &); + ~RegionRippleDrag () { delete exclude; } + + void motion (GdkEvent *, bool); + void finished (GdkEvent *, bool); + void aborted (bool); +protected: + bool y_movement_allowed (int delta_track, double delta_layer) const; + +private: + TimeAxisView *prev_tav; // where regions were most recently dragged from + TimeAxisView *orig_tav; // where drag started + framecnt_t prev_amount; + framepos_t prev_position; + framecnt_t selection_length; + bool allow_moves_across_tracks; // only if all selected regions are on one track + ARDOUR::RegionList *exclude; + void add_all_after_to_views (TimeAxisView *tav, framepos_t where, const RegionSelection &exclude, bool drag_in_progress); + void remove_unselected_from_views (framecnt_t amount, bool move_regions); + +}; + /** Drags to create regions */ class RegionCreateDrag : public Drag { |