This class is the core class responsible for the management of actions. More...
#include <actionhandler.h>
Collaboration diagram for Mezzanine::UI::ActionHandler:Public Types | |
|
typedef std::map< String, Action * > | ActionContainer |
| typedef ActionContainer::iterator | ActionIterator |
| typedef std::vector< Action * > | ActivatedContainer |
|
typedef ActivatedContainer::iterator | ActivatedIterator |
|
typedef std::multimap < Input::MetaCodeKey, Action * > | BindingContainer |
| typedef BindingContainer::iterator | BindingIterator |
|
typedef std::pair < Input::MetaCodeKey, Action * > | BindingPair |
|
typedef std::pair < BindingIterator, BindingIterator > | BindingRange |
|
typedef ActionContainer::const_iterator | ConstActionIterator |
|
typedef ActivatedContainer::const_iterator | ConstActivatedIterator |
|
typedef BindingContainer::const_iterator | ConstBindingIterator |
|
typedef std::pair < ConstBindingIterator, ConstBindingIterator > | ConstBindingRange |
Public Member Functions | |
| ActionHandler () | |
| Class constructor. | |
| ~ActionHandler () | |
| Class destructor. | |
| bool | _HandleInput (const Input::MetaCode &Code) |
| Handles input passed to this handler. More... | |
| void | _NotifyActionActivated (Action *BeingActivated) |
| Used by Actions to notify this handler it was activated. More... | |
| void | _ProcessAllActions () |
| Processes all active actions, and deactivates them if necessary. More... | |
| ActionIterator | BeginAction () |
| Gets an iterator to the first Action. More... | |
| ConstActionIterator | BeginAction () const |
| Gets a const iterator to the first Action. More... | |
| BindingIterator | BeginBinding () |
| Gets an iterator to the first Binding. More... | |
| ConstBindingIterator | BeginBinding () const |
| Gets a const iterator to the first Binding. More... | |
| void | Bind (const Input::MetaCode &Code, Action *ToBind, bool ForceUnique=true) |
| Binds a MetaCode to an action, making the action fire when this handler recieves the code. More... | |
| Action * | CreateAction (const String &Name) |
| Creates a new Action that can be bound to a MetaCode. More... | |
| void | DestroyAction (Action *ToBeDestroyed) |
| Destroy's an action. More... | |
| void | DestroyAllActions () |
| Destroys all Actions being stored by this Handler. | |
| ActionIterator | EndAction () |
| Gets an iterator to one-passed-the-last Action. More... | |
| ConstActionIterator | EndAction () const |
| Gets a const iterator to one-passed-the-last Action. More... | |
| BindingIterator | EndBinding () |
| Gets an iterator to one-passed-the-last Binding. More... | |
| ConstBindingIterator | EndBinding () const |
| Gets a const iterator to one-passed-the-last Binding. More... | |
| Action * | GetAction (const String &Name) |
| Gets an Action by name. More... | |
| ConstBindingRange | GetActionsBoundToCode (const Input::MetaCode &Code) |
| Gets all Actions bound to a MetaCode. More... | |
| void | RemoveAllBindings () |
| Completely removes all bindings from this Handler. | |
| void | Unbind (const Input::MetaCode &Code) |
| Unbinds Actions via MetaCode. More... | |
| void | Unbind (Action *ToUnbind) |
| Unbinds an Action via Action pointer. More... | |
| void | UnbindAll () |
| Unbinds all actions in this handler. More... | |
Protected Attributes | |
| ActionContainer | Actions |
| ActivatedContainer | ActivatedActions |
| BindingContainer | Bindings |
This class is the core class responsible for the management of actions.
Definition at line 56 of file actionhandler.h.
| bool Mezzanine::UI::ActionHandler::_HandleInput | ( | const Input::MetaCode & | Code) |
Handles input passed to this handler.
| Code | The MetaCode to be processed. |
Definition at line 208 of file actionhandler.cpp.
| void Mezzanine::UI::ActionHandler::_NotifyActionActivated | ( | Action * | BeingActivated) |
Used by Actions to notify this handler it was activated.
| BeingActivated | The Action calling this method and being activated. |
Definition at line 198 of file actionhandler.cpp.
| void Mezzanine::UI::ActionHandler::_ProcessAllActions | ( | ) |
Processes all active actions, and deactivates them if necessary.
Definition at line 219 of file actionhandler.cpp.
| ActionHandler::ActionIterator Mezzanine::UI::ActionHandler::BeginAction | ( | ) |
Gets an iterator to the first Action.
Definition at line 104 of file actionhandler.cpp.
| ActionHandler::ConstActionIterator Mezzanine::UI::ActionHandler::BeginAction | ( | ) | const |
Gets a const iterator to the first Action.
Definition at line 114 of file actionhandler.cpp.
| ActionHandler::BindingIterator Mezzanine::UI::ActionHandler::BeginBinding | ( | ) |
Gets an iterator to the first Binding.
Definition at line 175 of file actionhandler.cpp.
| ActionHandler::ConstBindingIterator Mezzanine::UI::ActionHandler::BeginBinding | ( | ) | const |
Gets a const iterator to the first Binding.
Definition at line 185 of file actionhandler.cpp.
| void Mezzanine::UI::ActionHandler::Bind | ( | const Input::MetaCode & | Code, |
| Action * | ToBind, | ||
| bool | ForceUnique = true |
||
| ) |
Binds a MetaCode to an action, making the action fire when this handler recieves the code.
| Code | The code to trigger the Action. |
| ToBind | The Action to be triggered. |
| ForceUnique | If true this will clear any previous entries that are equal to the MetaCode provided in the binding multimap. |
Definition at line 132 of file actionhandler.cpp.
Creates a new Action that can be bound to a MetaCode.
| Name | The name to be given to the created Action. |
Definition at line 63 of file actionhandler.cpp.
| void Mezzanine::UI::ActionHandler::DestroyAction | ( | Action * | ToBeDestroyed) |
Destroy's an action.
| ToBeDestroyed | The action to be destroyed. |
Definition at line 83 of file actionhandler.cpp.
| ActionHandler::ActionIterator Mezzanine::UI::ActionHandler::EndAction | ( | ) |
Gets an iterator to one-passed-the-last Action.
Definition at line 109 of file actionhandler.cpp.
| ActionHandler::ConstActionIterator Mezzanine::UI::ActionHandler::EndAction | ( | ) | const |
Gets a const iterator to one-passed-the-last Action.
Definition at line 119 of file actionhandler.cpp.
| ActionHandler::BindingIterator Mezzanine::UI::ActionHandler::EndBinding | ( | ) |
Gets an iterator to one-passed-the-last Binding.
Definition at line 180 of file actionhandler.cpp.
| ActionHandler::ConstBindingIterator Mezzanine::UI::ActionHandler::EndBinding | ( | ) | const |
Gets a const iterator to one-passed-the-last Binding.
Definition at line 190 of file actionhandler.cpp.
Gets an Action by name.
| Name | The name of the Action to retrieve. |
Definition at line 76 of file actionhandler.cpp.
| ActionHandler::ConstBindingRange Mezzanine::UI::ActionHandler::GetActionsBoundToCode | ( | const Input::MetaCode & | Code) |
Gets all Actions bound to a MetaCode.
| Code | The MetaCode to use to search for bound Actions. |
Definition at line 127 of file actionhandler.cpp.
| void Mezzanine::UI::ActionHandler::Unbind | ( | const Input::MetaCode & | Code) |
Unbinds Actions via MetaCode.
| Code | The MetaCode to find and remove all bindings to actions. |
Definition at line 146 of file actionhandler.cpp.
| void Mezzanine::UI::ActionHandler::Unbind | ( | Action * | ToUnbind) |
| void Mezzanine::UI::ActionHandler::UnbindAll | ( | ) |
Unbinds all actions in this handler.
Definition at line 162 of file actionhandler.cpp.
1.8.4