summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-11-16 01:05:21 -0500
committerDavid Robillard <d@drobilla.net>2014-11-16 22:35:45 -0500
commitfd9ccc7058cf7cfadbfa1dfb9676e2de3a14e1b0 (patch)
treeb65c03818c9eded429651ca621773d728f9e1976 /gtk2_ardour/editor.h
parent9c5e63bcc69290e1df84ea345b1899a241b7655e (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/editor.h')
-rw-r--r--gtk2_ardour/editor.h25
1 files changed, 20 insertions, 5 deletions
diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h
index 2831fc894f..09b81c4e64 100644
--- a/gtk2_ardour/editor.h
+++ b/gtk2_ardour/editor.h
@@ -412,9 +412,19 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
Gtkmm2ext::TearOff* mouse_mode_tearoff () const { return _mouse_mode_tearoff; }
Gtkmm2ext::TearOff* tools_tearoff () const { return _tools_tearoff; }
- void snap_to (framepos_t& first, int32_t direction = 0, bool for_mark = false);
- void snap_to_with_modifier (framepos_t& first, GdkEvent const *, int32_t direction = 0, bool for_mark = false);
- void snap_to (framepos_t& first, framepos_t& last, int32_t direction = 0, bool for_mark = false);
+ void snap_to (framepos_t& first,
+ ARDOUR::RoundMode direction = ARDOUR::RoundNearest,
+ bool for_mark = false);
+
+ void snap_to_with_modifier (framepos_t& first,
+ GdkEvent const * ev,
+ ARDOUR::RoundMode direction = ARDOUR::RoundNearest,
+ bool for_mark = false);
+
+ void snap_to (framepos_t& first,
+ framepos_t& last,
+ ARDOUR::RoundMode direction = ARDOUR::RoundNearest,
+ bool for_mark = false);
void begin_reversible_command (std::string cmd_name);
void begin_reversible_command (GQuark);
@@ -2018,8 +2028,13 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
void select_next_route ();
void select_prev_route ();
- void snap_to_internal (framepos_t& first, int32_t direction = 0, bool for_mark = false);
- void timecode_snap_to_internal (framepos_t& first, int32_t direction = 0, bool for_mark = false);
+ void snap_to_internal (framepos_t& first,
+ ARDOUR::RoundMode direction = ARDOUR::RoundNearest,
+ bool for_mark = false);
+
+ void timecode_snap_to_internal (framepos_t& first,
+ ARDOUR::RoundMode direction = ARDOUR::RoundNearest,
+ bool for_mark = false);
RhythmFerret* rhythm_ferret;