Radium Engine  1.5.20
Loading...
Searching...
No Matches
Ra::Gui::KeyMappingManageable< T > Class Template Reference

KeyMappingManageable decorator to use as CRTP. More...

#include <Gui/Utils/KeyMappingManager.hpp>

+ Inheritance diagram for Ra::Gui::KeyMappingManageable< T >:
+ Collaboration diagram for Ra::Gui::KeyMappingManageable< T >:

Static Public Member Functions

static KeyMappingManager::Context getContext ()
 
static void configureKeyMapping ()
 

Protected Member Functions

T & self ()
 

Static Protected Member Functions

static void setContext (const KeyMappingManager::Context &c)
 

Detailed Description

template<typename T>
class Ra::Gui::KeyMappingManageable< T >

KeyMappingManageable decorator to use as CRTP.

typical use as a CRTP :

class MyClass : public KeyMappingManageable<MyClass> {
KeyMappingManageable decorator to use as CRTP.

It defines a static class member m_keyMappingContext, readable with getContext() This context index must be registered by the class to the KeyMappingManager with

KeyMappingManager::addContext("MyClassContextName")
Context addContext(const std::string &contextName)
Creates the context index for the given context name.

after configuration file is loaded. Decoreated class must implement configureKeyMapping_impl().

Definition at line 239 of file KeyMappingManager.hpp.

Member Function Documentation

◆ configureKeyMapping()

template<typename T >
static void Ra::Gui::KeyMappingManageable< T >::configureKeyMapping ( )
inlinestatic

KeyManageable class must implement static configureKeyMapping_impl to get their keyMappingAction values from KeyMappingManager.

Definition at line 247 of file KeyMappingManager.hpp.

◆ getContext()

template<typename T >
static KeyMappingManager::Context Ra::Gui::KeyMappingManageable< T >::getContext ( )
inlinestatic

Definition at line 242 of file KeyMappingManager.hpp.

◆ self()

template<typename T >
T & Ra::Gui::KeyMappingManageable< T >::self ( )
inlineprotected

Definition at line 250 of file KeyMappingManager.hpp.

◆ setContext()

template<typename T >
static void Ra::Gui::KeyMappingManageable< T >::setContext ( const KeyMappingManager::Context & c)
inlinestaticprotected

Definition at line 251 of file KeyMappingManager.hpp.


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