This class is responsible for the registration and handling of hotkeys in the UI system. More...
#include <hotkeyhandler.h>
Public Types | |
typedef HotKeyContainer::const_iterator | ConstHotKeyIterator |
Const Iterator type for hotkey bindings stored by this class. | |
typedef std::multimap< Input::InputCode, UI::Button * > | HotKeyContainer |
Basic container type for hotkey binding storage by this class. | |
typedef HotKeyContainer::iterator | HotKeyIterator |
Iterator type for hotkey bindings stored by this class. | |
typedef std::pair< Input::InputCode, UI::Button * > | HotKeyPair |
A convenience type for handling hotkey pairs. | |
Public Member Functions | |
HotKeyHandler () | |
Class constructor. | |
~HotKeyHandler () | |
Class destructor. | |
void | BindHotKey (const Input::MetaCode &HotKey, UI::Button *BoundButton) |
Binds a key to a button. More... | |
void | RemoveAllHotKeys () |
Clears all registered hotkeys. | |
void | UnbindHotKey (const Input::MetaCode &HotKey, UI::Button *BoundButton) |
Removes a previously set hotkey binding. More... | |
Protected Attributes | |
HotKeyContainer | HotKeys |
A container storing all registered hotkey bindings. More... | |
This class is responsible for the registration and handling of hotkeys in the UI system.
Definition at line 58 of file hotkeyhandler.h.
void Mezzanine::UI::HotKeyHandler::BindHotKey | ( | const Input::MetaCode & | HotKey, |
UI::Button * | BoundButton | ||
) |
Binds a key to a button.
This function allows buttons to behave like they are pressed without mouse input.
HotKey | The key or button (on the input device) to activate the button. |
BoundButton | The button being bound to the hotkey. |
Definition at line 62 of file hotkeyhandler.cpp.
void Mezzanine::UI::HotKeyHandler::UnbindHotKey | ( | const Input::MetaCode & | HotKey, |
UI::Button * | BoundButton | ||
) |
Removes a previously set hotkey binding.
HotKey | The key or button (on the input device) to activate the button. |
BoundButton | The button currently bound to the hotkey. |
Definition at line 68 of file hotkeyhandler.cpp.
|
protected |
A container storing all registered hotkey bindings.
Definition at line 72 of file hotkeyhandler.h.