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

A class that maps from one set of key codes to another. More...

#include <omGUIInputKeyCodeMap.h>

Public Member Functions

 KeyCodeMap ()
 Create a new key code map which has the default initial size. More...
 
 KeyCodeMap (Size mapSize)
 Create a new key code map which has the specified initial size. More...
 
 KeyCodeMap (const KeyCodeMap &other)
 Create a copy of this key code map. More...
 
 ~KeyCodeMap ()
 Destroy this key code map, releasing all internal data. More...
 
KeyCodeMapoperator= (const KeyCodeMap &other)
 Assign the state of another key code map to this one. More...
 
KeyCode getCode (KeyCode inputCode) const
 Map the specified input key code to an output key code. More...
 
void setCode (KeyCode inputCode, KeyCode outputCode)
 Set the specified input code mapping for this key code map. More...
 
void clearCodes ()
 Remove all code mappings from this key code map. More...
 

Detailed Description

A class that maps from one set of key codes to another.

The usual purpose of this class is to provide an efficient way to convert from platform-specific key codes to a generic set of key codes.

Constructor & Destructor Documentation

om::gui::input::KeyCodeMap::KeyCodeMap ( )

Create a new key code map which has the default initial size.

om::gui::input::KeyCodeMap::KeyCodeMap ( Size  mapSize)

Create a new key code map which has the specified initial size.

om::gui::input::KeyCodeMap::KeyCodeMap ( const KeyCodeMap other)

Create a copy of this key code map.

om::gui::input::KeyCodeMap::~KeyCodeMap ( )

Destroy this key code map, releasing all internal data.

Member Function Documentation

KeyCodeMap& om::gui::input::KeyCodeMap::operator= ( const KeyCodeMap other)

Assign the state of another key code map to this one.

KeyCode om::gui::input::KeyCodeMap::getCode ( KeyCode  inputCode) const

Map the specified input key code to an output key code.

If there is no mapping for the specified input code, a Key::UNDEFINED code is returned.

void om::gui::input::KeyCodeMap::setCode ( KeyCode  inputCode,
KeyCode  outputCode 
)

Set the specified input code mapping for this key code map.

If there is already an input mapping for that code, it is replaced with the new output key code.

void om::gui::input::KeyCodeMap::clearCodes ( )

Remove all code mappings from this key code map.


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