summaryrefslogtreecommitdiff
path: root/gtk2_ardour/public_editor.h
diff options
context:
space:
mode:
authornick_m <mainsbridge@gmail.com>2017-01-27 00:41:17 +1100
committernick_m <mainsbridge@gmail.com>2017-02-04 22:57:36 +1100
commit59daffea1d78cb55b35fe19c135cc4ab472bd01d (patch)
tree45e514f2e4f5a1935e360fd4fa3e2475ec217006 /gtk2_ardour/public_editor.h
parenta21a414615505269bf770ad2358482e698e841af (diff)
rework snap
snap now fills in a struct (MusicFrame) which contins a snapped frame along with a music divisor. this gives useful information wrt magnetic snap which may or may not have rounded to an exact musical position. region position may now be set musically (using quarter notes for now). this patch fixes several problems in the current code: - dragging a list of music-locked regions now maintains correct musical offsets within the list. - splitting regions using magnetic snap works correctly (#7192) - cut drag should now work correctly with magnetic snap. - musical length of split midi regions is no longer frame based.
Diffstat (limited to 'gtk2_ardour/public_editor.h')
-rw-r--r--gtk2_ardour/public_editor.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/gtk2_ardour/public_editor.h b/gtk2_ardour/public_editor.h
index a63cd049b3..7516d48099 100644
--- a/gtk2_ardour/public_editor.h
+++ b/gtk2_ardour/public_editor.h
@@ -148,10 +148,10 @@ class PublicEditor : public Gtkmm2ext::Tabbable {
* Snap a value according to the current snap setting.
* ensure_snap overrides SnapOff and magnetic snap
*/
- virtual void snap_to (framepos_t& first,
- ARDOUR::RoundMode direction = ARDOUR::RoundNearest,
- bool for_mark = false,
- bool ensure_snap = false) = 0;
+ virtual void snap_to (ARDOUR::MusicFrame& first,
+ ARDOUR::RoundMode direction = ARDOUR::RoundNearest,
+ bool for_mark = false,
+ bool ensure_snap = false) = 0;
/** Undo some transactions.
* @param n Number of transactions to undo.
@@ -320,7 +320,7 @@ class PublicEditor : public Gtkmm2ext::Tabbable {
virtual void restore_editing_space () = 0;
virtual framepos_t get_preferred_edit_position (Editing::EditIgnoreOption = Editing::EDIT_IGNORE_NONE, bool from_context_menu = false, bool from_outside_canvas = false) = 0;
virtual void toggle_meter_updating() = 0;
- virtual void split_regions_at (framepos_t, RegionSelection&, const int32_t sub_num, bool snap) = 0;
+ virtual void split_regions_at (ARDOUR::MusicFrame, RegionSelection&, bool snap) = 0;
virtual void split_region_at_points (boost::shared_ptr<ARDOUR::Region>, ARDOUR::AnalysisFeatureList&, bool can_ferret, bool select_new = false) = 0;
virtual void mouse_add_new_marker (framepos_t where, bool is_cd=false) = 0;
virtual void foreach_time_axis_view (sigc::slot<void,TimeAxisView&>) = 0;
@@ -435,10 +435,10 @@ class PublicEditor : public Gtkmm2ext::Tabbable {
virtual ARDOUR::Location* find_location_from_marker (ArdourMarker *, bool &) const = 0;
virtual ArdourMarker* find_marker_from_location_id (PBD::ID const &, bool) const = 0;
- virtual void snap_to_with_modifier (framepos_t & first,
- GdkEvent const * ev,
- ARDOUR::RoundMode direction = ARDOUR::RoundNearest,
- bool for_mark = false) = 0;
+ virtual void snap_to_with_modifier (ARDOUR::MusicFrame& first,
+ GdkEvent const * ev,
+ ARDOUR::RoundMode direction = ARDOUR::RoundNearest,
+ bool for_mark = false) = 0;
virtual void get_regions_at (RegionSelection &, framepos_t where, TrackViewList const &) const = 0;
virtual void get_regions_after (RegionSelection&, framepos_t where, const TrackViewList& ts) const = 0;