| VRS - The Virtual Rendering System |
| version 3.3 |
#include <vrs/sg/keycondition.h>

Public Member Functions | |
| KeyCondition (unsigned int code=0x1b, int modifier=InputEvent::NoModifier, int pressed=InputEvent::Pressed) | |
| virtual bool | satisfied (Event *event) const |
| For a given event, a condition is either satisfied or unsatisfied. | |
| void | setKeyCode (unsigned int code) |
| void | setModifier (int mods) |
| unsigned int | getKeyCode () const |
| int | getModifier () const |
| Set/get the key code and the modifiers which are checked. | |
| VRS_TYPEINFO (KeyCondition, Condition) | |
| VRS_SERIALIZABLE (KeyCondition) | |
| VRS::KeyCondition::KeyCondition | ( | unsigned int | code = 0x1b, |
|
| int | modifier = InputEvent::NoModifier, |
|||
| int | pressed = InputEvent::Pressed | |||
| ) |
An `KeyCondition' checks whether an event reports a key event for the right key and the right set of modifiers. The condition is satisfied in this case. It is not satisfied if the key code or the modifiers or the event type do not match. Note that the condition differentiates between a key pressed event and a key released event. See also the definition of modifiers and keys in `InputEvent'.
| virtual bool VRS::KeyCondition::satisfied | ( | Event * | ) | const [virtual] |
| void VRS::KeyCondition::setKeyCode | ( | unsigned int | code | ) | [inline] |
| void VRS::KeyCondition::setModifier | ( | int | mods | ) | [inline] |
| unsigned int VRS::KeyCondition::getKeyCode | ( | ) | const [inline] |
| int VRS::KeyCondition::getModifier | ( | ) | const [inline] |
Set/get the key code and the modifiers which are checked.
| VRS::KeyCondition::VRS_TYPEINFO | ( | KeyCondition | , | |
| Condition | ||||
| ) |
| VRS::KeyCondition::VRS_SERIALIZABLE | ( | KeyCondition | ) |