Ardour  9.0-pre0-582-g084a23a80d
Gtkmm2ext::Bindings Class Reference

#include <bindings.h>

Classes

struct  ActionInfo
 
struct  DragsBlockBindings
 

Public Types

enum  Operation { Press , Release }
 
typedef std::map< KeyboardKey, ActionInfoKeybindingMap
 

Public Member Functions

 Bindings (std::string const &name)
 
 ~Bindings ()
 
std::string const & name () const
 
void reassociate ()
 
void associate ()
 
void dissociate ()
 
bool empty () const
 
bool empty_keys () const
 
bool empty_mouse () const
 
bool add (KeyboardKey, Operation, std::string const &, XMLProperty const *, bool can_save=false)
 
bool replace (KeyboardKey, Operation, std::string const &action_name, bool can_save=true)
 
bool remove (Operation, std::string const &action_name, bool can_save=false)
 
bool activate (KeyboardKey, Operation)
 
void add (MouseButton, Operation, std::string const &, XMLProperty const *)
 
void remove (MouseButton, Operation)
 
bool activate (MouseButton, Operation)
 
bool is_bound (KeyboardKey const &, Operation, std::string *path=0) const
 
std::string bound_name (KeyboardKey const &, Operation) const
 
bool is_registered (Operation op, std::string const &action_name) const
 
KeyboardKey get_binding_for_action (Glib::RefPtr< Gtk::Action >, Operation &op)
 
bool load (XMLNode const &node)
 
void load_operation (XMLNode const &node)
 
void save (XMLNode &root)
 
void save_as_html (std::ostream &, bool) const
 
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)
 

Static Public Member Functions

static void reset_bindings ()
 
static Bindingsget_bindings (std::string const &name)
 
static void associate_all ()
 
static void save_all_bindings_as_html (std::ostream &)
 

Static Public Attributes

static std::list< Bindings * > bindings
 
static PBD::Signal< void(Bindings *)> BindingsChanged
 

Private Types

typedef std::map< MouseButton, ActionInfoMouseButtonBindingMap
 

Private Member Functions

void push_to_gtk (KeyboardKey, Glib::RefPtr< Gtk::Action >)
 
KeybindingMapget_keymap (Operation op)
 
const KeybindingMapget_keymap (Operation op) const
 
MouseButtonBindingMapget_mousemap (Operation op)
 

Static Private Member Functions

static std::string ardour_action_name (Glib::RefPtr< Gtk::Action >)
 

Private Attributes

std::string _name
 
KeybindingMap press_bindings
 
KeybindingMap release_bindings
 
MouseButtonBindingMap button_press_bindings
 
MouseButtonBindingMap button_release_bindings
 

Static Private Attributes

static int _drag_active
 

Friends

struct DragsBlockBindings
 

Detailed Description

Definition at line 103 of file bindings.h.

Member Typedef Documentation

◆ KeybindingMap

Definition at line 118 of file bindings.h.

◆ MouseButtonBindingMap

Definition at line 184 of file bindings.h.

Member Enumeration Documentation

◆ Operation

Enumerator
Press 
Release 

Definition at line 105 of file bindings.h.

Constructor & Destructor Documentation

◆ Bindings()

Gtkmm2ext::Bindings::Bindings ( std::string const &  name)

◆ ~Bindings()

Gtkmm2ext::Bindings::~Bindings ( )

Member Function Documentation

◆ activate() [1/2]

bool Gtkmm2ext::Bindings::activate ( KeyboardKey  ,
Operation   
)

◆ activate() [2/2]

bool Gtkmm2ext::Bindings::activate ( MouseButton  ,
Operation   
)

◆ add() [1/2]

bool Gtkmm2ext::Bindings::add ( KeyboardKey  ,
Operation  ,
std::string const &  ,
XMLProperty const *  ,
bool  can_save = false 
)

◆ add() [2/2]

void Gtkmm2ext::Bindings::add ( MouseButton  ,
Operation  ,
std::string const &  ,
XMLProperty const *   
)

◆ ardour_action_name()

static std::string Gtkmm2ext::Bindings::ardour_action_name ( Glib::RefPtr< Gtk::Action )
staticprivate

◆ associate()

void Gtkmm2ext::Bindings::associate ( )

◆ associate_all()

static void Gtkmm2ext::Bindings::associate_all ( )
static

◆ bound_name()

std::string Gtkmm2ext::Bindings::bound_name ( KeyboardKey const &  ,
Operation   
) const

◆ dissociate()

void Gtkmm2ext::Bindings::dissociate ( )

◆ empty()

bool Gtkmm2ext::Bindings::empty ( ) const

◆ empty_keys()

bool Gtkmm2ext::Bindings::empty_keys ( ) const

◆ empty_mouse()

bool Gtkmm2ext::Bindings::empty_mouse ( ) const

◆ get_all_actions()

void Gtkmm2ext::Bindings::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 
)

◆ get_binding_for_action()

KeyboardKey Gtkmm2ext::Bindings::get_binding_for_action ( Glib::RefPtr< Gtk::Action ,
Operation op 
)

◆ get_bindings()

static Bindings* Gtkmm2ext::Bindings::get_bindings ( std::string const &  name)
static

◆ get_keymap() [1/2]

KeybindingMap& Gtkmm2ext::Bindings::get_keymap ( Operation  op)
private

◆ get_keymap() [2/2]

const KeybindingMap& Gtkmm2ext::Bindings::get_keymap ( Operation  op) const
private

◆ get_mousemap()

MouseButtonBindingMap& Gtkmm2ext::Bindings::get_mousemap ( Operation  op)
private

◆ is_bound()

bool Gtkmm2ext::Bindings::is_bound ( KeyboardKey const &  ,
Operation  ,
std::string *  path = 0 
) const

◆ is_registered()

bool Gtkmm2ext::Bindings::is_registered ( Operation  op,
std::string const &  action_name 
) const

◆ load()

bool Gtkmm2ext::Bindings::load ( XMLNode const &  node)

◆ load_operation()

void Gtkmm2ext::Bindings::load_operation ( XMLNode const &  node)

◆ name()

std::string const& Gtkmm2ext::Bindings::name ( ) const
inline

Definition at line 123 of file bindings.h.

◆ push_to_gtk()

void Gtkmm2ext::Bindings::push_to_gtk ( KeyboardKey  ,
Glib::RefPtr< Gtk::Action  
)
private

◆ reassociate()

void Gtkmm2ext::Bindings::reassociate ( )

◆ remove() [1/2]

void Gtkmm2ext::Bindings::remove ( MouseButton  ,
Operation   
)

◆ remove() [2/2]

bool Gtkmm2ext::Bindings::remove ( Operation  ,
std::string const &  action_name,
bool  can_save = false 
)

◆ replace()

bool Gtkmm2ext::Bindings::replace ( KeyboardKey  ,
Operation  ,
std::string const &  action_name,
bool  can_save = true 
)

◆ reset_bindings()

static void Gtkmm2ext::Bindings::reset_bindings ( )
inlinestatic

Definition at line 162 of file bindings.h.

◆ save()

void Gtkmm2ext::Bindings::save ( XMLNode root)

◆ save_all_bindings_as_html()

static void Gtkmm2ext::Bindings::save_all_bindings_as_html ( std::ostream &  )
static

◆ save_as_html()

void Gtkmm2ext::Bindings::save_as_html ( std::ostream &  ,
bool   
) const

Friends And Related Function Documentation

◆ DragsBlockBindings

friend struct DragsBlockBindings
friend

Definition at line 210 of file bindings.h.

Member Data Documentation

◆ _drag_active

int Gtkmm2ext::Bindings::_drag_active
staticprivate

Definition at line 209 of file bindings.h.

◆ _name

std::string Gtkmm2ext::Bindings::_name
private

Definition at line 180 of file bindings.h.

◆ bindings

std::list<Bindings*> Gtkmm2ext::Bindings::bindings
static

Definition at line 163 of file bindings.h.

◆ BindingsChanged

PBD::Signal<void(Bindings*)> Gtkmm2ext::Bindings::BindingsChanged
static

Definition at line 168 of file bindings.h.

◆ button_press_bindings

MouseButtonBindingMap Gtkmm2ext::Bindings::button_press_bindings
private

Definition at line 185 of file bindings.h.

◆ button_release_bindings

MouseButtonBindingMap Gtkmm2ext::Bindings::button_release_bindings
private

Definition at line 186 of file bindings.h.

◆ press_bindings

KeybindingMap Gtkmm2ext::Bindings::press_bindings
private

Definition at line 181 of file bindings.h.

◆ release_bindings

KeybindingMap Gtkmm2ext::Bindings::release_bindings
private

Definition at line 182 of file bindings.h.


The documentation for this class was generated from the following file: