Darc Library
2012.11
|
Short. More...
#include <cr_keyboard.h>
Public Member Functions | |
IKeyboardScanner () | |
EventHandler & | GetEventHandler () |
The method returns an event handler. | |
DCR | Update () |
Call this periodically to scan a keyboard. | |
virtual bool | IsKeyDown (Byte _code) const =0 |
Returns true if a key, specified by its scan code, is pressed. | |
Protected Member Functions | |
virtual DCR | UpdateState ()=0 |
This function updates the m_keyState array. | |
Protected Attributes | |
Byte | m_keyState [256] |
Short.
Detailed
darc::core::IKeyboardScanner::IKeyboardScanner | ( | ) | [inline] |
EventHandler& darc::core::IKeyboardScanner::GetEventHandler | ( | ) | [inline] |
The method returns an event handler.
The object's event handler can be used to connect to any item of KeyEvent::E_SUBTYPE. All invoked functions will receive the pointer to a KeyEvent as their parameter.
virtual bool darc::core::IKeyboardScanner::IsKeyDown | ( | Byte | _code | ) | const [pure virtual] |
Returns true if a key, specified by its scan code, is pressed.
All subclasses must implement a layout specific way to determine a keys status.
Implemented in darc::protox::DIKeyboardScanner.
Call this periodically to scan a keyboard.
virtual DCR darc::core::IKeyboardScanner::UpdateState | ( | ) | [protected, pure virtual] |
This function updates the m_keyState array.
All subclasses must implement a layout specific way to Setup the key states.
Implemented in darc::protox::DIKeyboardScanner.
Byte darc::core::IKeyboardScanner::m_keyState[256] [protected] |