class MASKING_DLL_DECLSPEC Accelerator

The accelerator widget.

Inheritance:

Accelerator - Widget - Rect


Public Methods

[more]void Add(int key, int shifts, int msg)
Adds a combination of keys the widget should respond to and the the message it should respond with.

Protected Fields

[more]std::vector<KeyCombo> acc
The vector of keyboard combination

Protected Methods

[more]bool MsgXChar(int xchar)
Handles keypresses.


Documentation

The accelerator widget. This widget is similar to a Shortcut except it allows you to setup more than one keyboard shortcut. When it detects a predefined keyboard combination, it will send the message associated with this combination.
ostd::vector<KeyCombo> acc
The vector of keyboard combination

obool MsgXChar(int xchar)
Handles keypresses. If it detects a combination of keys defined in the accelerator array, it sends the message associated with the keyboard combination in question to the parent dialog.

ovoid Add(int key, int shifts, int msg)
Adds a combination of keys the widget should respond to and the the message it should respond with. Key is an Allegro KEY_* constant (as in KEY_A, KEY_F1, KEY_LEFT, etc.) and shifts is a combination of key shifts flags such as KB_CTRL_FLAG, KB_ALT_FLAG, KB_SHIFT_FLAG, etc. Whenever the widget detects that this combination of keys was pressed, it send the message msg to the parent dialog.


This class has no child classes.

Alphabetic index Hierarchy of classes


Back to front page   |   page generated with DOC++