- static bool no_modifiers_active (guint state);
-
- static void set_snap_modifier (guint);
- static ModifierMask snap_modifier () { return ModifierMask (snap_mod); }
-
- static guint edit_button() { return edit_but; }
- static void set_edit_button (guint);
- static guint edit_modifier() { return edit_mod; }
- static void set_edit_modifier(guint);
-
- static guint delete_button() { return delete_but; }
- static void set_delete_button(guint);
- static guint delete_modifier() { return delete_mod; }
- static void set_delete_modifier(guint);
-
- 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; }
-
- static bool some_magic_widget_has_focus ();
- static void magic_widget_grab_focus ();
- static void magic_widget_drop_focus ();
-
- static void setup_keybindings ();
- static void keybindings_changed ();
- static void save_keybindings ();
- static bool load_keybindings (std::string path);
- static void set_can_save_keybindings (bool yn);
- static std::string current_binding_name () { return _current_binding_name; }
- static std::map<std::string,std::string> binding_files;
-
- struct AccelKeyLess {
- bool operator() (const Gtk::AccelKey a, const Gtk::AccelKey b) const {
- if (a.get_key() != b.get_key()) {
- return a.get_key() < b.get_key();
- } else {
- return a.get_mod() < b.get_mod();
- }
- }
- };
-
- private:
- static Keyboard* _the_keyboard;
-
- guint snooper_id;
- State state;
-
- static guint edit_but;
- static guint edit_mod;
- 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;
- static bool bindings_changed_after_save_became_legal;
- static std::string _current_binding_name;
-
- typedef std::pair<std::string,std::string> two_strings;
-
- static std::map<Gtk::AccelKey,two_strings,AccelKeyLess> release_keys;
-
- static gint _snooper (GtkWidget*, GdkEventKey*, gpointer);
- gint snooper (GtkWidget*, GdkEventKey*);
-
- static void set_modifier (uint32_t newval, uint32_t& variable);
-
- static bool _some_magic_widget_has_focus;