Small cleanups to port matrix context menu.
[ardour.git] / gtk2_ardour / keyboard.h
index e6d5065e86e758a5744cdb9938720f22c951fa95..e34c424329f3e0761ffd5325be2d7421b8d86b28 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2001 Paul Davis 
+    Copyright (C) 2001 Paul Davis
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
 #include <gtk/gtk.h>
 #include <gtkmm/accelkey.h>
 
-#include <ardour/types.h>
-#include <pbd/stateful.h>
+#include "ardour/types.h"
+#include "pbd/stateful.h"
 
 #include "selection.h"
 
-using std::string;
-
 class Keyboard : public sigc::trackable, PBD::Stateful
 {
   public:
@@ -42,7 +40,7 @@ class Keyboard : public sigc::trackable, PBD::Stateful
        ~Keyboard ();
 
        XMLNode& get_state (void);
-       int set_state (const XMLNode&);
+       int set_state (const XMLNode&, int version);
 
        typedef std::vector<uint32_t> State;
        typedef uint32_t ModifierMask;
@@ -92,6 +90,11 @@ class Keyboard : public sigc::trackable, PBD::Stateful
        static bool no_modifiers_active (guint state);
 
        static void set_snap_modifier (guint);
+
+       /** @return Modifier mask to temporarily toggle grid setting; with this modifier
+        *  - magnetic or normal grid should become no grid and
+        *  - no grid should become normal grid
+        */
        static ModifierMask snap_modifier () { return ModifierMask (snap_mod); }
 
        static guint edit_button() { return edit_but; }
@@ -107,6 +110,7 @@ class Keyboard : public sigc::trackable, PBD::Stateful
        static bool is_edit_event (GdkEventButton*);
        static bool is_delete_event (GdkEventButton*);
        static bool is_context_menu_event (GdkEventButton*);
+       static bool is_button2_event (GdkEventButton*);
 
        static Keyboard& the_keyboard() { return *_the_keyboard; }
 
@@ -143,6 +147,7 @@ class Keyboard : public sigc::trackable, PBD::Stateful
        static guint     delete_but;
        static guint     delete_mod;
        static guint     snap_mod;
+       static guint     button2_modifiers;
        static Gtk::Window* current_window;
        static std::string user_keybindings_path;
        static bool can_save_keybindings;