diff options
author | David Robillard <d@drobilla.net> | 2014-11-16 01:05:21 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-11-16 22:35:45 -0500 |
commit | fd9ccc7058cf7cfadbfa1dfb9676e2de3a14e1b0 (patch) | |
tree | b65c03818c9eded429651ca621773d728f9e1976 /gtk2_ardour/public_editor.h | |
parent | 9c5e63bcc69290e1df84ea345b1899a241b7655e (diff) |
Use an enum for RoundMode instead of magic numbers.
No functional changes in this one (for easier auditing), but towards having
round up/down only if necessary modes, rather than kludging around that
situation with a double round as we do currently.
Diffstat (limited to 'gtk2_ardour/public_editor.h')
-rw-r--r-- | gtk2_ardour/public_editor.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gtk2_ardour/public_editor.h b/gtk2_ardour/public_editor.h index 4bf03bc72f..9969d9d49e 100644 --- a/gtk2_ardour/public_editor.h +++ b/gtk2_ardour/public_editor.h @@ -141,7 +141,9 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible, publi virtual void set_snap_threshold (double t) = 0; /** Snap a value according to the current snap setting. */ - virtual void snap_to (framepos_t& first, int32_t direction = 0, bool for_mark = false) = 0; + virtual void snap_to (framepos_t& first, + ARDOUR::RoundMode direction = ARDOUR::RoundNearest, + bool for_mark = false) = 0; /** Undo some transactions. * @param n Number of transactions to undo. @@ -411,7 +413,10 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible, publi virtual ARDOUR::Location* find_location_from_marker (Marker *, bool &) const = 0; virtual Marker* find_marker_from_location_id (PBD::ID const &, bool) const = 0; - virtual void snap_to_with_modifier (framepos_t &, GdkEvent const *, int32_t direction = 0, bool for_mark = false) = 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 get_regions_at (RegionSelection &, framepos_t where, TrackViewList const &) const = 0; virtual RegionSelection get_regions_from_selection_and_mouse (framepos_t) = 0; |