#include <LoadBindings.h>
Public Member Functions | |
LoadBindings (EV_EditMethodCallData *d, _FROM_URI) | |
LoadBindings (EV_EditMethodCallData *d, _FROM_MEMORY) | |
~LoadBindings () | |
bool | Load () |
bool | Set () const |
const std::string & | GetName () const |
Protected Member Functions | |
int | strcmp (const char *s1, const char *s2) |
int | strcmp (const char *s1, const xmlChar *s2) |
int | strcmp (const xmlChar *s1, const xmlChar *s2) |
int | strcmp (const xmlChar *s1, const char *s2) |
EV_EditModifierState | GetModifiers (xmlNodePtr node) |
Parses the control, shift and alt attribute's (if present) and converts them to a EV_EditModifierState value. | |
const char * | FindAttribute (xmlNodePtr node, const char *name) |
Searches the specified node's attributes for a certain named attribute and returns its value, if present. | |
bool | AddMapping (UT_uint32 binding, const char *command) |
Adds a new mapping to the internal binding map. | |
bool | RemoveMapping (const char *command, UT_uint8 unbinding) |
Adds a new mapping removal. | |
void | ReportError (const char *format,...) const |
Reports an error. | |
void | ReportWarning (const char *format,...) const |
Reports a warning. | |
Protected Attributes | |
XAP_App * | m_pApp |
xmlDocPtr | m_pXMLDoc |
std::string | m_sName |
bool | m_bReplace |
BindingMap | m_BindMap |
UnbindMap | m_UnbindMap |
LoadBindings::LoadBindings | ( | EV_EditMethodCallData * | d, | |
_FROM_URI | ||||
) |
LoadBindings::LoadBindings | ( | EV_EditMethodCallData * | d, | |
_FROM_MEMORY | ||||
) |
LoadBindings::~LoadBindings | ( | ) |
References m_pXMLDoc.
bool LoadBindings::AddMapping | ( | UT_uint32 | binding, | |
const char * | command | |||
) | [protected] |
Adds a new mapping to the internal binding map.
References m_BindMap, ReportError(), and UT_DEBUGMSG.
Referenced by Load().
const char * LoadBindings::FindAttribute | ( | xmlNodePtr | node, | |
const char * | name | |||
) | [protected] |
EV_EditModifierState LoadBindings::GetModifiers | ( | xmlNodePtr | node | ) | [protected] |
const std::string& LoadBindings::GetName | ( | ) | const [inline] |
References m_sName.
bool LoadBindings::Load | ( | ) |
References AddMapping(), command, DONT_UNBIND_ANYTHING, EV_EKP_NAMEDKEY, EV_EKP_PRESS, FindAttribute(), EV_NamedVirtualKey::getEB(), GetModifiers(), m_bReplace, m_pXMLDoc, m_sName, RemoveMapping(), ReportError(), and strcmp().
Referenced by LoadBindingsFromMemory_invoke(), and LoadBindingsFromURI_invoke().
bool LoadBindings::RemoveMapping | ( | const char * | command, | |
UT_uint8 | unbinding | |||
) | [protected] |
Adds a new mapping removal.
References m_UnbindMap, ReportWarning(), and UT_DEBUGMSG.
Referenced by Load().
void LoadBindings::ReportError | ( | const char * | format, | |
... | ||||
) | const [protected] |
Reports an error.
Referenced by AddMapping(), and Load().
void LoadBindings::ReportWarning | ( | const char * | format, | |
... | ||||
) | const [protected] |
Reports a warning.
Referenced by RemoveMapping(), and Set().
bool LoadBindings::Set | ( | ) | const |
References AP_BindingSet::createMap(), DONT_UNBIND_KEYSTROKES, DONT_UNBIND_MOUSECONTEXTS, EV_IsKeyboard, EV_IsMouse, EV_EditBindingMap::findEditBits(), XAP_App::getBindingSet(), AP_BindingSet::getMap(), m_BindMap, m_bReplace, m_pApp, m_sName, m_UnbindMap, EV_EditBindingMap::removeBinding(), ReportWarning(), EV_EditBindingMap::resetAll(), EV_EditBindingMap::setBinding(), XAP_App::setInputMode(), and UT_return_val_if_fail.
Referenced by LoadBindingsFromMemory_invoke(), and LoadBindingsFromURI_invoke().
int LoadBindings::strcmp | ( | const xmlChar * | s1, | |
const xmlChar * | s2 | |||
) | [inline, protected] |
References strcmp().
int LoadBindings::strcmp | ( | const xmlChar * | s1, | |
const char * | s2 | |||
) | [inline, protected] |
References strcmp().
int LoadBindings::strcmp | ( | const char * | s1, | |
const char * | s2 | |||
) | [inline, protected] |
Referenced by FindAttribute(), GetModifiers(), Load(), and strcmp().
int LoadBindings::strcmp | ( | const char * | s1, | |
const xmlChar * | s2 | |||
) | [inline, protected] |
References strcmp().
BindingMap LoadBindings::m_BindMap [protected] |
Referenced by AddMapping(), and Set().
bool LoadBindings::m_bReplace [protected] |
XAP_App* LoadBindings::m_pApp [protected] |
Referenced by Set().
xmlDocPtr LoadBindings::m_pXMLDoc [protected] |
Referenced by Load(), LoadBindings(), and ~LoadBindings().
std::string LoadBindings::m_sName [protected] |
UnbindMap LoadBindings::m_UnbindMap [protected] |
Referenced by RemoveMapping(), and Set().