Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | List of all members
om::gui::input::KeyEvent Class Reference

A class that encapsulates an event that occurrs whenever a key's state is changed. More...

#include <omGUIInputKeyEvent.h>

Public Member Functions

 KeyEvent (KeyCode newKeyCode, Bool newIsPressed, Bool newIsRepeat)
 Create a new keyboard event for the specified key code and pressed-state. More...
 
 KeyEvent (const Key &newKey, Bool newIsPressed, Bool newIsRepeat)
 Create a new keyboard event for the specified key and pressed-state. More...
 
KeyCode getKeyCode () const
 Return a code that identifies the key that this keyboard event is associated with. More...
 
void setKeyCode (KeyCode newKeyCode)
 Set the code that identifies the key that this keyboard event is associated with. More...
 
Bool isPressed () const
 Return whether or not the key was pressed. More...
 
void setIsPressed (Bool newIsPressed)
 Set whether or not the key was pressed. More...
 
Bool isReleased () const
 Return whether or not the key was released. More...
 
void setIsReleased (Bool newIsReleased)
 Set whether or not the key was released. More...
 
Bool isRepeat () const
 Return whether or not the key event corresponds to a key repeat. More...
 
const TimegetTime () const
 Return the absolute time since the epoch when the key event occurred. More...
 
void setTime (const Time &newTime)
 Set the absolute time since the epoch when the key event occurred. More...
 
const ModifiersgetModifiers () const
 Return the modifier flags that were set when the event occurred. More...
 
void setModifiers (const Modifiers &newModifiers)
 Set the modifier flags that were set when the event occurred. More...
 
Bool operator== (const Key &key) const
 Return whether or not this key event corresponds to the specified key. More...
 
Bool operator!= (const Key &key) const
 Return whether or not this key event corresponds to the specified key. More...
 

Detailed Description

A class that encapsulates an event that occurrs whenever a key's state is changed.

Constructor & Destructor Documentation

om::gui::input::KeyEvent::KeyEvent ( KeyCode  newKeyCode,
Bool  newIsPressed,
Bool  newIsRepeat 
)
inline

Create a new keyboard event for the specified key code and pressed-state.

om::gui::input::KeyEvent::KeyEvent ( const Key newKey,
Bool  newIsPressed,
Bool  newIsRepeat 
)
inline

Create a new keyboard event for the specified key and pressed-state.

Member Function Documentation

KeyCode om::gui::input::KeyEvent::getKeyCode ( ) const
inline

Return a code that identifies the key that this keyboard event is associated with.

void om::gui::input::KeyEvent::setKeyCode ( KeyCode  newKeyCode)
inline

Set the code that identifies the key that this keyboard event is associated with.

Bool om::gui::input::KeyEvent::isPressed ( ) const
inline

Return whether or not the key was pressed.

void om::gui::input::KeyEvent::setIsPressed ( Bool  newIsPressed)
inline

Set whether or not the key was pressed.

Bool om::gui::input::KeyEvent::isReleased ( ) const
inline

Return whether or not the key was released.

void om::gui::input::KeyEvent::setIsReleased ( Bool  newIsReleased)
inline

Set whether or not the key was released.

Bool om::gui::input::KeyEvent::isRepeat ( ) const
inline

Return whether or not the key event corresponds to a key repeat.

const Time& om::gui::input::KeyEvent::getTime ( ) const
inline

Return the absolute time since the epoch when the key event occurred.

void om::gui::input::KeyEvent::setTime ( const Time newTime)
inline

Set the absolute time since the epoch when the key event occurred.

const Modifiers& om::gui::input::KeyEvent::getModifiers ( ) const
inline

Return the modifier flags that were set when the event occurred.

void om::gui::input::KeyEvent::setModifiers ( const Modifiers newModifiers)
inline

Set the modifier flags that were set when the event occurred.

Bool om::gui::input::KeyEvent::operator== ( const Key key) const
inline

Return whether or not this key event corresponds to the specified key.

Bool om::gui::input::KeyEvent::operator!= ( const Key key) const
inline

Return whether or not this key event corresponds to the specified key.


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