MezzanineEngine 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Protected Attributes | List of all members
Mezzanine::UI::HotKeyHandler Class Reference

This class is responsible for the registration and handling of hotkeys in the UI system. More...

#include <hotkeyhandler.h>

+ Collaboration diagram for Mezzanine::UI::HotKeyHandler:

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...
 

Detailed Description

This class is responsible for the registration and handling of hotkeys in the UI system.

Definition at line 58 of file hotkeyhandler.h.

Member Function Documentation

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.

Parameters
HotKeyThe key or button (on the input device) to activate the button.
BoundButtonThe 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.

Parameters
HotKeyThe key or button (on the input device) to activate the button.
BoundButtonThe button currently bound to the hotkey.

Definition at line 68 of file hotkeyhandler.cpp.

Member Data Documentation

HotKeyContainer Mezzanine::UI::HotKeyHandler::HotKeys
protected

A container storing all registered hotkey bindings.

Definition at line 72 of file hotkeyhandler.h.


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