#include <keyboard.h>

Public Types | |
| typedef std::list < dtCore::RefPtr < KeyboardListener > > | KeyboardListenerList |
Public Member Functions | |
| Keyboard (const std::string &name="keyboard") | |
| Registers many Buttons as DeviceFeatures with the base class, InputDevice. | |
| bool | GetKeyState (int key) const |
| Checks the state of the specified key. | |
| void | AddKeyboardListener (KeyboardListener *keyboardListener) |
| Pushes a listener for keyboard events to the back of the container. | |
| void | InsertKeyboardListener (const KeyboardListenerList::value_type &pos, KeyboardListener *kbl) |
| Inserts the listener into the list at a position BEFORE pos. | |
| void | RemoveKeyboardListener (KeyboardListener *keyboardListener) |
| Removes a keyboard listener. | |
| virtual bool | KeyDown (int key) |
| virtual bool | KeyUp (int key) |
| const KeyboardListenerList & | GetListeners () const |
| |
Protected Member Functions | |
| virtual | ~Keyboard () |
| Deregisters itself with the instance management layer. | |
Protected Attributes | |
| KeyboardListenerList | mKeyboardListeners |
| The container of keyboard listeners. | |
| typedef std::list<dtCore::RefPtr<KeyboardListener> > dtCore::Keyboard::KeyboardListenerList |
| Keyboard::Keyboard | ( | const std::string & | name = "keyboard" |
) |
Registers many Buttons as DeviceFeatures with the base class, InputDevice.
It also registers itself with the instance management layer.
| name | the instance name |
| Keyboard::~Keyboard | ( | ) | [protected, virtual] |
Deregisters itself with the instance management layer.
| bool Keyboard::GetKeyState | ( | int | key | ) | const |
Checks the state of the specified key.
| key | the key to check |
| void Keyboard::AddKeyboardListener | ( | KeyboardListener * | keyboardListener | ) |
Pushes a listener for keyboard events to the back of the container.
| keyboardListener | the listener to add |
| void Keyboard::InsertKeyboardListener | ( | const KeyboardListenerList::value_type & | pos, | |
| KeyboardListener * | kbl | |||
| ) |
Inserts the listener into the list at a position BEFORE pos.
| void Keyboard::RemoveKeyboardListener | ( | KeyboardListener * | keyboardListener | ) |
Removes a keyboard listener.
| keyboardListener | the listener to remove from the container of listeners. |
| bool Keyboard::KeyDown | ( | int | key | ) | [virtual] |
| bool Keyboard::KeyUp | ( | int | key | ) | [virtual] |
| const KeyboardListenerList& dtCore::Keyboard::GetListeners | ( | ) | const [inline] |
The container of keyboard listeners.