diff options
author | nick_m <mainsbridge@gmail.com> | 2015-05-24 01:10:06 +1000 |
---|---|---|
committer | nick_m <mainsbridge@gmail.com> | 2015-05-24 01:10:06 +1000 |
commit | 9a55bcb04fc9af5e0425b7ef12c628cad9494433 (patch) | |
tree | d2d09503d909f97e49cebe12a8edd5a484cd2b47 | |
parent | 119c644dc08a4575c2770257efea451d3968e3cc (diff) |
Rekative snap - add comments
-rw-r--r-- | gtk2_ardour/keyboard.cc | 3 | ||||
-rw-r--r-- | gtk2_ardour/keyboard.h | 7 |
2 files changed, 10 insertions, 0 deletions
diff --git a/gtk2_ardour/keyboard.cc b/gtk2_ardour/keyboard.cc index bdce6badda..96c73f63d4 100644 --- a/gtk2_ardour/keyboard.cc +++ b/gtk2_ardour/keyboard.cc @@ -242,6 +242,9 @@ ArdourKeyboard::set_state (const XMLNode& node, int version) return Keyboard::set_state (node, version); } +/* Snap and snap delta modifiers may contain each other, so we use the + * following two methods to sort that out: + */ bool ArdourKeyboard::indicates_snap (guint state) { diff --git a/gtk2_ardour/keyboard.h b/gtk2_ardour/keyboard.h index b163bfaa37..9ca60950bb 100644 --- a/gtk2_ardour/keyboard.h +++ b/gtk2_ardour/keyboard.h @@ -41,7 +41,14 @@ class ArdourKeyboard : public Gtkmm2ext::Keyboard ARDOUR_UI& ui; + /** @param state The button state from a GdkEvent. + * @return true if the modifier state indicates snap modifier + */ static bool indicates_snap (guint state); + + /** @param state The button state from a GdkEvent. + * @return true if the modifier state indicates snap delta + */ static bool indicates_snap_delta (guint state); static void set_constraint_modifier (guint); |