20 #ifndef __libgtkmm2ext_bindings_h__
21 #define __libgtkmm2ext_bindings_h__
54 uint32_t
state()
const {
return _val >> 32; }
55 uint32_t
key()
const {
return _val & 0xffffffff; }
58 return _val < other.
_val;
62 return _val == other.
_val;
83 uint32_t
state()
const {
return _val >> 32; }
84 uint32_t
button()
const {
return _val & 0xffff; }
87 return _val < other.
_val;
91 return _val == other.
_val;
112 ActionInfo (std::string
const&
name, std::string
const& grp) : action_name (
name), group_name (grp) {}
116 mutable Glib::RefPtr<Gtk::Action>
action;
123 std::string
const&
name()
const {
return _name; }
156 std::vector<std::string>& labels,
157 std::vector<std::string>& tooltips,
158 std::vector<std::string>& keys,
159 std::vector<Glib::RefPtr<Gtk::Action> >& actions);
std::ostream & operator<<(std::ostream &out, Gtkmm2ext::KeyboardKey const &k)
MouseButtonBindingMap button_release_bindings
void add(MouseButton, Operation, std::string const &, XMLProperty const *)
static std::string ardour_action_name(Glib::RefPtr< Gtk::Action >)
MouseButtonBindingMap button_press_bindings
bool activate(KeyboardKey, Operation)
const KeybindingMap & get_keymap(Operation op) const
KeyboardKey get_binding_for_action(Glib::RefPtr< Gtk::Action >, Operation &op)
void save_as_html(std::ostream &, bool) const
static std::list< Bindings * > bindings
bool activate(MouseButton, Operation)
KeybindingMap release_bindings
void push_to_gtk(KeyboardKey, Glib::RefPtr< Gtk::Action >)
bool load(XMLNode const &node)
void load_operation(XMLNode const &node)
static Bindings * get_bindings(std::string const &name)
void get_all_actions(std::vector< std::string > &paths, std::vector< std::string > &labels, std::vector< std::string > &tooltips, std::vector< std::string > &keys, std::vector< Glib::RefPtr< Gtk::Action > > &actions)
void remove(MouseButton, Operation)
std::string bound_name(KeyboardKey const &, Operation) const
static void associate_all()
Bindings(std::string const &name)
std::map< MouseButton, ActionInfo > MouseButtonBindingMap
bool add(KeyboardKey, Operation, std::string const &, XMLProperty const *, bool can_save=false)
static PBD::Signal< void(Bindings *)> BindingsChanged
std::string const & name() const
static void reset_bindings()
static void save_all_bindings_as_html(std::ostream &)
MouseButtonBindingMap & get_mousemap(Operation op)
bool replace(KeyboardKey, Operation, std::string const &action_name, bool can_save=true)
KeybindingMap press_bindings
bool is_registered(Operation op, std::string const &action_name) const
bool remove(Operation, std::string const &action_name, bool can_save=false)
bool is_bound(KeyboardKey const &, Operation, std::string *path=0) const
KeybindingMap & get_keymap(Operation op)
std::map< KeyboardKey, ActionInfo > KeybindingMap
bool operator<(const KeyboardKey &other) const
std::string display_label() const
static KeyboardKey null_key()
std::string native_name() const
std::string native_short_name() const
bool operator==(const KeyboardKey &other) const
KeyboardKey(uint32_t state, uint32_t keycode)
static bool make_key(const std::string &, KeyboardKey &)
GtkImageIconNameData name
ActionInfo(std::string const &name, std::string const &grp)
Glib::RefPtr< Gtk::Action > action
ActionInfo(std::string const &name)