#include <FXAccelTable.h>
Public Member Functions | |
long | onKeyPress (FXObject *, FXSelector, void *) |
long | onKeyRelease (FXObject *, FXSelector, void *) |
FXAccelTable () | |
void | addAccel (FXHotKey hotkey, FXObject *target=NULL, FXSelector seldn=0, FXSelector selup=0) |
void | removeAccel (FXHotKey hotkey) |
bool | hasAccel (FXHotKey hotkey) const |
FXObject * | targetOfAccel (FXHotKey hotkey) const |
virtual void | save (FXStream &store) const |
virtual void | load (FXStream &store) |
virtual | ~FXAccelTable () |
virtual long | onDefault (FXObject *, FXSelector, void *) |
const FXchar * | getClassName () const |
bool | isMemberOf (const FXMetaClass *metaclass) const |
virtual long | tryHandle (FXObject *sender, FXSelector sel, void *ptr) |
QTransString | tr (const char *text, const char *hint=0) |
virtual void * | getPythonObject () const |
virtual void | decouplePythonObject () const |
Friends | |
FXAPI FXHotKey | parseAccel (const FXString &string) |
FXAPI FXString | unparseAccel (FXHotKey key) |
FXAPI FXHotKey | parseHotKey (const FXString &string) |
FXAPI FXint | findHotKey (const FXString &string) |
FXAPI FXString | stripHotKey (const FXString &string) |
FX::FXAccelTable::FXAccelTable | ( | ) |
Construct empty accelerator table.
virtual FX::FXAccelTable::~FXAccelTable | ( | ) | [virtual] |
Destructor.
void FX::FXAccelTable::addAccel | ( | FXHotKey | hotkey, | |
FXObject * | target = NULL , |
|||
FXSelector | seldn = 0 , |
|||
FXSelector | selup = 0 | |||
) |
Add an accelerator into the table.
void FX::FXAccelTable::removeAccel | ( | FXHotKey | hotkey | ) |
Remove an accelerator from the table.
bool FX::FXAccelTable::hasAccel | ( | FXHotKey | hotkey | ) | const |
Return true if accelerator specified.
FXObject* FX::FXAccelTable::targetOfAccel | ( | FXHotKey | hotkey | ) | const |
Return target object of the given accelerator.
virtual void FX::FXAccelTable::save | ( | FXStream & | store | ) | const [virtual] |
virtual void FX::FXAccelTable::load | ( | FXStream & | store | ) | [virtual] |
virtual long FX::FXObject::onDefault | ( | FXObject * | , | |
FXSelector | , | |||
void * | ||||
) | [virtual, inherited] |
Called for unhandled messages.
Reimplemented in FX::FXDelegator, FX::FXGLViewer, FX::FXMDIChild, and FX::FXMDIClient.
const FXchar* FX::FXObject::getClassName | ( | ) | const [inherited] |
Get class name of some object.
bool FX::FXObject::isMemberOf | ( | const FXMetaClass * | metaclass | ) | const [inherited] |
Check if object is member of metaclass.
virtual long FX::FXObject::tryHandle | ( | FXObject * | sender, | |
FXSelector | sel, | |||
void * | ptr | |||
) | [virtual, inherited] |
Try handle message safely.
QTransString FX::FXObject::tr | ( | const char * | text, | |
const char * | hint = 0 | |||
) | [inherited] |
Returns a human translated version of the text to the locale language (warning: uses a virtual method call, so can't use before construction)
virtual void* FX::FXObject::getPythonObject | ( | ) | const [inline, virtual, inherited] |
Returns the python object representing this instance (if created in python).
virtual void FX::FXObject::decouplePythonObject | ( | ) | const [inline, virtual, inherited] |
Causes decoupling of python object from this object (deletes self).
FXAPI FXHotKey parseAccel | ( | const FXString & | string | ) | [friend] |
Parse accelerator from string, yielding modifier and key code. For example, parseAccel("Ctl+Shift+X") yields MKUINT(KEY_X,CONTROLMASK|SHIFTMASK).
FXAPI FXString unparseAccel | ( | FXHotKey | key | ) | [friend] |
Unparse hot key comprising modifier and key code back into a string suitable for parsing with fxparseHotKey.
FXAPI FXHotKey parseHotKey | ( | const FXString & | string | ) | [friend] |
Parse hot key from string, yielding modifier and key code. For example, parseHotKey(""Salt && &Pepper!"") yields MKUINT(KEY_p,ALTMASK).
FXAPI FXint findHotKey | ( | const FXString & | string | ) | [friend] |
Obtain hot key offset in string, or -1 if not found. For example, findHotKey("Salt && &Pepper!") yields 7. Note that this is the byte-offset, not the character index!
Strip hot key combination from the string. For example, stripHotKey("Salt && &Pepper") should yield "Salt & Pepper".