From 9a55bcb04fc9af5e0425b7ef12c628cad9494433 Mon Sep 17 00:00:00 2001 From: nick_m Date: Sun, 24 May 2015 01:10:06 +1000 Subject: Rekative snap - add comments --- gtk2_ardour/keyboard.cc | 3 +++ gtk2_ardour/keyboard.h | 7 +++++++ 2 files changed, 10 insertions(+) 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); -- cgit v1.2.3