![]() |
VR-Forces 5.0.1 Developer's Guide
|
The manager for owning key maps.

Public Types | |
| enum | FunctionCategory { Movement, Rotation, Orbit, Camera, Attachment, Gain, Rendering, Display, Miscellaneous, UserDefined = 100 } |
| typedef std::map < FunctionCategory, DtUnicode > | FunctionCategories |
| 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 |
| typedef std::map < FunctionCategory, CategoryList * > | CategoryMap |
Public Member Functions | |
| virtual | ~DtKeyMapManager () |
| virtual DtKeyMap * | createKeyMap (const std::string &mapName, bool silent=false) |
| virtual DtKeyMap * | cloneKeyMap (const std::string &mapName, const std::string &newMapName, bool silent=false) |
| virtual void | destroyKeyMap (const std::string &mapName, bool silent=false) |
| virtual DtKeyMap * | findKeyMap (const std::string &mapName) |
| bool | saveKeyMap (const DtKeyMap &keyMap) const |
| bool | saveKeyMapToFile (const DtKeyMap &keyMap, const std::string &filename) const |
| DtKeyMap * | loadKeyMapFromFile (const std::string &filename, bool createBackup=false) |
| virtual void | setFromRecord (const std::string &keyMap, const makArchives::DtKeyMapRecord &rec) |
| virtual DtSettingsBackup * | settingsBackup (const std::string &keyMap) const |
| virtual void | categorizeKeyFunction (const std::string &functionName, FunctionCategory functionCategory) |
| virtual void | categorizeBinaryKeyFunction (const std::string &functionName, FunctionCategory functionCategory) |
| virtual void | addKeyFunction (const std::string &functionName, const KeyFunction &function, FunctionCategory functionCategory, bool categorize=true) |
| KeyFunction | findKeyFunction (const std::string &functionName) const |
| void | removeKeyFunction (const std::string &functionName) |
| virtual const KeyMapCatalog & | keyMapCatalog () const |
| virtual const CategoryMap & | categoryMap () const |
| virtual const CategoryMap & | binaryCategoryMap () const |
| const BinaryFunctionNameMap & | binaryDownMap () const |
| const BinaryFunctionNameMap & | binaryUpMap () const |
| virtual void | addBinaryKeyFunction (const std::string &binaryName, const std::string &keyDownFunctionName, const KeyFunction &downFunction, const std::string &keyUpFuntionName, const KeyFunction &upFunction, FunctionCategory functionCategory) |
| virtual std::string | lookupBinaryKeyFunctionName (DtKeyEvent::KeyEventType eventType, const std::string &binaryName) const |
| virtual bool | processKeyEvent (const std::string &mapName, const DtKeyEvent &keyEvent) |
| virtual void | activateMap (const std::string &mapName) |
| virtual void | deactivateMap (const std::string &mapName) |
| virtual void | setCurrentMap (const std::string &mapName) |
| virtual const std::string & | currentMap () const |
| virtual void | clear () |
| virtual void | addFunctionCategory (FunctionCategory, const DtUnicode &functionCategoryName) |
| virtual DtUnicode | functionCategoryName (FunctionCategory) const |
| virtual const FunctionCategories & | functionCategories () const |
| DtDe & | de () |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| virtual | ~DtVirtualBaseClass () |
Static Public Member Functions | |
| static DtKeyMapManager & | instance (DtDe &de) |
Protected Member Functions | |
| DtKeyMapManager (DtDe &de) | |
| void | invokeKeyFunctions (const DtKeyFunctionNameList &funcsToUse) |
| virtual DtKeyMapSettingsBackup * | createBackupFor (const std::string &, const std::string &factoryFile="") |
Friends | |
| class | DtKeyMapBackupAsync |
| typedef std::map<FunctionCategory, DtUnicode> makVrv::DtKeyMapManager::FunctionCategories |
| 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.
|
virtual |
Adds a new function category into the key map system. These function categories can be used to classify keymap functions and extend the functions available. These functions will appear on the key mapping widget. To add new functions use the UserDefined function category as a base. Adding existing function categories will simply rename the exising categories.
|
virtual |
Returns the text for the particular category or "Unknown" if not present.
|
virtual |
Returns current map of function categories.
| DtDe& makVrv::DtKeyMapManager::de | ( | ) |
Returns the de associated with the manager. Used by DtKeyMap to get at the signaler to signal when key bindings have changed.
|
protected |
|
protectedvirtual |
Creates a backup object, if does not exist, for the given key map object caller is then responsible for calling back up on the resulting object.
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |