X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fkeyboard.h;h=c6a05abe2a4ca5f5895d78e0781e1355ac9f0ad9;hb=b402e12d545e9729578e03ad041a131d8a72f37c;hp=8ed30efb72210f609e72ba9244d5d682dc8f8884;hpb=eaf49f02ff92f22cbfa214ae89ec0a2fc3861d29;p=ardour.git diff --git a/gtk2_ardour/keyboard.h b/gtk2_ardour/keyboard.h index 8ed30efb72..c6a05abe2a 100644 --- a/gtk2_ardour/keyboard.h +++ b/gtk2_ardour/keyboard.h @@ -20,6 +20,9 @@ #ifndef __ardour_keyboard_h__ #define __ardour_keyboard_h__ +#include +#include + #include "ardour/types.h" #include "gtkmm2ext/keyboard.h" @@ -41,9 +44,21 @@ 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); + /** @return Modifier mask to constrain drags in a particular direction; + */ + static ModifierMask constraint_modifier () { return ModifierMask (constraint_mod); } + static void set_trim_contents_modifier (guint); /** @return Modifier mask to move contents rather than region bounds during trim; */ @@ -74,12 +89,15 @@ class ArdourKeyboard : public Gtkmm2ext::Keyboard */ static ModifierMask note_size_relative_modifier () { return ModifierMask (note_size_relative_mod); } private: + static guint constraint_mod; static guint trim_contents_mod; static guint trim_overlap_mod; static guint trim_anchored_mod; static guint fine_adjust_mod; static guint push_points_mod; static guint note_size_relative_mod; + + void find_bindings_files (std::map& files); }; #endif /* __ardour_keyboard_h__ */