version 3.3

VRS::KeyCondition Class Reference

Key Event Condition. More...

#include <vrs/sg/keycondition.h>

Inheritance diagram for VRS::KeyCondition:

VRS::Condition VRS::SharedObj VRS::Visitable

List of all members.

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)


Detailed Description

Key Event Condition.

Constructor & Destructor Documentation

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'.


Member Function Documentation

virtual bool VRS::KeyCondition::satisfied ( Event  )  const [virtual]

For a given event, a condition is either satisfied or unsatisfied.

Implements VRS::Condition.

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   ) 


The documentation for this class was generated from the following file:

Generated on Mon May 21 06:00:26 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact