![]() |
Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
![]() |
#include <FXAccelTable.h>
Public Member Functions | |
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 () |
Friends | |
FXHotKey | parseAccel (const FXString &string) |
FXString | unparseAccel (FXHotKey key) |
FXHotKey | parseHotKey (const FXString &string) |
FXint | findHotKey (const FXString &string) |
FXString | stripHotKey (const FXString &string) |
The accelerator table sends a message to a specific target object when the indicated key and modifier combination is pressed.
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] |
Save table to a stream.
Reimplemented from FX::FXObject.
virtual void FX::FXAccelTable::load | ( | FXStream & | store | ) | [virtual] |
Load table from a stream.
Reimplemented from FX::FXObject.
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).
FXString unparseAccel | ( | FXHotKey | key | ) | [friend] |
Unparse hot key comprising modifier and key code back into a string suitable for parsing with fxparseHotKey.
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).
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!
FXString stripHotKey | ( | const FXString & | string | ) | [friend] |
Strip hot key combination from the string.
For example, stripHotKey("Salt && &Pepper") should yield "Salt & Pepper".
![]() |