![]() |
VR-Forces 4.1 Class Documentation
|
The manager for owning key maps. More...

Public Types | |
| enum | FunctionCategory { Movement, Rotation, Orbit, Camera, Attachment, Gain, Rendering, Display, Miscellaneous } |
| typedef std::map< std::string, DtKeyMap * > | KeyMapCatalog |
| typedef boost::function< void()> | KeyFunction |
| typedef std::map< std::string, KeyFunction > | KeyFunctionMap |
| typedef std::map< std::string, std::string > | BinaryFunctionNameMap |
| typedef std::map< std::string, DtSettingsBackup * > | BackupMap |
| typedef std::list< std::string > | CategoryList |
| A list of all the functions in a given category. | |
| typedef std::map < FunctionCategory, CategoryList * > | CategoryMap |
| A list of category lists. | |
Public Member Functions | |
| virtual | ~DtKeyMapManager () |
| virtual DTOR | |
| virtual DtKeyMap * | createKeyMap (const std::string &mapName, bool silent=false) |
| create and return a key map | |
| virtual DtKeyMap * | cloneKeyMap (const std::string &mapName, const std::string &newMapName, bool silent=false) |
| create and return a key map based on an existing key map | |
| virtual void | destroyKeyMap (const std::string &mapName, bool silent=false) |
| Destroy a key map. | |
| virtual DtKeyMap * | findKeyMap (const std::string &mapName) |
| look up a key map | |
| bool | saveKeyMap (const DtKeyMap &keyMap) const |
| Saves the keymap to configuration directory based on key map name. | |
| bool | saveKeyMapToFile (const DtKeyMap &keyMap, const std::string &filename) const |
| Save a key map to a file. | |
| DtKeyMap * | loadKeyMapFromFile (const std::string &filename, bool createBackup=false) |
| Save a key map to a file. | |
| virtual void | setFromRecord (const std::string &keyMap, const makArchives::DtKeyMapRecord &rec) |
| If key map exists, sets the key map from the record, else created a new one. | |
| virtual DtSettingsBackup * | settingsBackup (const std::string &keyMap) const |
| Returns the settings backup for the specified key map. | |
| virtual void | categorizeKeyFunction (const std::string &functionName, FunctionCategory functionCategory) |
| Add a key function to the specified category. | |
| virtual void | categorizeBinaryKeyFunction (const std::string &functionName, FunctionCategory functionCategory) |
| virtual void | addKeyFunction (const std::string &functionName, const KeyFunction &function, FunctionCategory functionCategory, bool categorize=true) |
| bind a function to string name that can be used in a key map (or binary function set) | |
| KeyFunction | findKeyFunction (const std::string &functionName) const |
| look up the function bound to 'functionName' | |
| void | removeKeyFunction (const std::string &functionName) |
| Removes a key function. | |
| virtual const KeyMapCatalog & | keyMapCatalog () const |
| get the catalog of key maps maintained by this manager | |
| virtual const CategoryMap & | categoryMap () const |
| virtual const CategoryMap & | binaryCategoryMap () const |
| const BinaryFunctionNameMap & | binaryDownMap () const |
| Get the map of binary functions to associated down functions. | |
| const BinaryFunctionNameMap & | binaryUpMap () const |
| Get the map of binary functions to associated up functions. | |
| virtual void | addBinaryKeyFunction (const std::string &binaryName, const std::string &keyDownFunctionName, const KeyFunction &downFunction, const std::string &keyUpFuntionName, const KeyFunction &upFunction, FunctionCategory functionCategory) |
| create a binary function set | |
| virtual std::string | lookupBinaryKeyFunctionName (DtKeyEvent::KeyEventType eventType, const std::string &binaryName) const |
| find the function name bound to the up or down event (eventType) for a given binary function name | |
| virtual bool | processKeyEvent (const std::string &mapName, const DtKeyEvent &keyEvent) |
| look up the map named, find the appropriate function(s) based on the keyEvent, and invoke | |
| virtual void | activateMap (const std::string &mapName) |
| invoke the function(s) on a map's pre-function list | |
| virtual void | deactivateMap (const std::string &mapName) |
| invoke the function(s) on a map's post-function list | |
| virtual void | setCurrentMap (const std::string &mapName) |
| virtual const std::string & | currentMap () const |
| virtual void | clear () |
| Clears all maps. | |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| Do nothing constructor. | |
| virtual | ~DtVirtualBaseClass () |
| Virtual do nothing destructor. | |
Static Public Member Functions | |
| static DtKeyMapManager & | instance (DtDe &de) |
| Get an instance of the key map. | |
Protected Member Functions | |
| DtKeyMapManager (DtDe &de) | |
| CTOR. | |
| void | invokeKeyFunctions (const DtKeyFunctionNameList &funcsToUse) |
| virtual void | createBackupFor (const std::string &, const std::string &factoryFile="") |
| Creates a backup object, if does not exist, for the given key map object and backs it up. | |
The manager for owning key maps.
| typedef std::map<std::string, DtKeyMap*> makVrv::DtKeyMapManager::KeyMapCatalog |
| typedef boost::function< void ()> makVrv::DtKeyMapManager::KeyFunction |
| typedef std::map<std::string, KeyFunction> makVrv::DtKeyMapManager::KeyFunctionMap |
| typedef std::map<std::string, std::string> makVrv::DtKeyMapManager::BinaryFunctionNameMap |
| typedef std::map<std::string, DtSettingsBackup*> makVrv::DtKeyMapManager::BackupMap |
| typedef std::list<std::string> makVrv::DtKeyMapManager::CategoryList |
A list of all the functions in a given category.
| typedef std::map<FunctionCategory, CategoryList*> makVrv::DtKeyMapManager::CategoryMap |
A list of category lists.
The key is the first item in the Category list
|
virtual |
virtual DTOR
|
protected |
CTOR.
|
static |
Get an instance of the key map.
|
virtual |
create and return a key map
|
virtual |
create and return a key map based on an existing key map
|
virtual |
Destroy a key map.
|
virtual |
look up a key map
Saves the keymap to configuration directory based on key map name.
| bool makVrv::DtKeyMapManager::saveKeyMapToFile | ( | const DtKeyMap & | keyMap, |
| const std::string & | filename | ||
| ) | const |
Save a key map to a file.
| DtKeyMap* makVrv::DtKeyMapManager::loadKeyMapFromFile | ( | const std::string & | filename, |
| bool | createBackup = false |
||
| ) |
Save a key map to a file.
|
virtual |
If key map exists, sets the key map from the record, else created a new one.
Emits created or updated signal depending on which it is
|
virtual |
Returns the settings backup for the specified key map.
|
virtual |
Add a key function to the specified category.
To ensure that all key functions appear in at least one category, the addKeyFunction and addBinaryKeyFunction require a category argument. Use this function to add a key function to additional categories. Categories are used for filtering functions on the Edit Key Map dialog.
|
virtual |
|
virtual |
bind a function to string name that can be used in a key map (or binary function set)
| KeyFunction makVrv::DtKeyMapManager::findKeyFunction | ( | const std::string & | functionName | ) | const |
look up the function bound to 'functionName'
| void makVrv::DtKeyMapManager::removeKeyFunction | ( | const std::string & | functionName | ) |
Removes a key function.
|
virtual |
get the catalog of key maps maintained by this manager
|
virtual |
|
virtual |
| const BinaryFunctionNameMap& makVrv::DtKeyMapManager::binaryDownMap | ( | ) | const |
Get the map of binary functions to associated down functions.
| const BinaryFunctionNameMap& makVrv::DtKeyMapManager::binaryUpMap | ( | ) | const |
Get the map of binary functions to associated up functions.
|
virtual |
create a binary function set
A binary function set binds a name to a pair of functions and function names that can then be associated with a key's down and up events
|
virtual |
find the function name bound to the up or down event (eventType) for a given binary function name
|
virtual |
look up the map named, find the appropriate function(s) based on the keyEvent, and invoke
|
virtual |
invoke the function(s) on a map's pre-function list
|
virtual |
invoke the function(s) on a map's post-function list
|
virtual |
|
virtual |
|
virtual |
Clears all maps.
|
protected |
|
protectedvirtual |
Creates a backup object, if does not exist, for the given key map object and backs it up.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |