![]() |
VR-Forces Developer's Guide
|
A configuration of a menu layout. A menu configuration manages an ordered collection of menu paths that make up a menu. A menu configuration is used by the VR-Vantage's menu assembler to create the actual GUI elements for the menu.
The order the collection of menu paths follow depend on each menu paths' sort flags (see DtMenuConfiguration::MenuSortFlags). The sort flags for any menu item paths are ignored. If a menu path's sort flags has the NoSort flag enabled, then the menu path's children menus and menu items keep the order specified in the menu configuration. If a menu path's sort flags has its NoSort flag disabled and has any of the Sort[AllAphabetically|WithinSubmenus|BetweenSeparators|BetweenSubmenus] flags enabled, then the menu path's children menu items are not guaranteed to keep the order specified in the menu configuration. Additionally, the children menu items are sorted by their display string - defined within the C++ implementation of the child menu or menu item.

Classes | |
| struct | OrderParameters |
Public Types | |
| enum | MenuSortFlags { NoSort = 0x00000000, SortAllAlphabetically = 0x00000001, SortWithinSubmenus = 0x00000002, SortBetweenSeparators = 0x00000004, SortBetweenSubMenus = 0x00000010 } |
| typedef std::list< DtMenuPath > | MenuPathList |
| typedef std::set< DtMenuPath > | MenuPathSet |
Public Types inherited from makVrv::DtConfiguration | |
| typedef std::map< std::string, std::string > | ParameterMap |
Protected Types | |
| typedef std::map< DtMenuPath, OrderParameters > | MenuPathOrderMap |
| typedef std::map< DtMenuPath, MenuSortFlags > | MenuPathSortFlagsMap |
Protected Member Functions | |
| int | getNewWeight () |
| void | addMenuPath (const DtMenuPath &, int weight) |
| bool | sortAbsolute (const DtMenuPath &a, const DtMenuPath &b) const |
Protected Member Functions inherited from makVrv::DtConfiguration | |
| template<class Archive > | |
| void | _serialize (Archive &ar, const unsigned int version) |
Protected Attributes | |
| MenuPathSet | myMenuPaths |
| MenuPathOrderMap | myMenuOrder |
| MenuPathSortFlagsMap | myMenuSortFlags |
| int | myCurrentWeight |
Protected Attributes inherited from makVrv::DtConfiguration | |
| std::string | myName |
| ParameterMap | myOptionalParameters |
| DtProxyWP | myAttachedInterface |
| typedef std::list<DtMenuPath> makVrv::DtMenuConfiguration::MenuPathList |
| typedef std::set<DtMenuPath> makVrv::DtMenuConfiguration::MenuPathSet |
|
protected |
|
protected |
| makVrv::DtMenuConfiguration::DtMenuConfiguration | ( | ) |
CTOR.
|
virtual |
DTOR.
| void makVrv::DtMenuConfiguration::addMenuPath | ( | const DtMenuPath & | , |
| const MenuSortFlags & | sortFlagsIfMenu = (MenuSortFlags)(SortAllAlphabetically|SortWithinSubmenus|SortBetweenSeparators) |
||
| ) |
Adds the menu path (as well as its entire family).
| void makVrv::DtMenuConfiguration::addMenuPathAfter | ( | const DtMenuPath & | newPath, |
| const DtMenuPath & | relativeTo, | ||
| const MenuSortFlags & | sortFlagsIfMenu = (MenuSortFlags)(SortAllAlphabetically|SortWithinSubmenus|SortBetweenSeparators) |
||
| ) |
Adds the menu path after a relative (they must share the same parent).
| void makVrv::DtMenuConfiguration::addMenuPathBefore | ( | const DtMenuPath & | newPath, |
| const DtMenuPath & | relativeTo, | ||
| const MenuSortFlags & | sortFlagsIfMenu = (MenuSortFlags)(SortAllAlphabetically|SortWithinSubmenus|SortBetweenSeparators) |
||
| ) |
Adds the menu path before a relative (they must share the same parent).
| void makVrv::DtMenuConfiguration::addConfiguration | ( | const DtMenuConfiguration & | subConfiguration | ) |
Merges from an external configurations into this configuration.
| void makVrv::DtMenuConfiguration::removeMenuPath | ( | const DtMenuPath & | ) |
Remove the menu path from this menu configuration.
| void makVrv::DtMenuConfiguration::getRootPaths | ( | MenuPathList & | children | ) | const |
Get all paths which have no parents (aka top level paths).
| void makVrv::DtMenuConfiguration::getChildren | ( | const DtMenuPath & | path, |
| MenuPathList & | children | ||
| ) | const |
Get a list of children (first generation only) for a given path./ An absolute path must be given./.
| void makVrv::DtMenuConfiguration::sortChildren | ( | MenuPathList & | children | ) | const |
Sort the list of children.
|
inline |
References myCurrentWeight, myMenuOrder, myMenuPaths, and myMenuSortFlags.
Referenced by makVrf::DtSubMenuConfiguration::operator=().
| void makVrv::DtMenuConfiguration::merge | ( | const DtMenuConfiguration & | rhs | ) |
Merges in contents of supplied configuration, adding new paths. Order will get added at the end.
| bool makVrv::DtMenuConfiguration::hasMenuPath | ( | const DtMenuPath & | p | ) | const |
Returns true if the menu configuration has the provided menu path.
| bool makVrv::DtMenuConfiguration::menuSortFlags | ( | const DtMenuPath & | p, |
| MenuSortFlags & | flags | ||
| ) | const |
Returns the sort flags for the provided menu path.
|
protected |
Get new weight.
|
protected |
|
protected |
|
protected |
Referenced by operator=().
|
protected |
Referenced by operator=().
|
protected |
Referenced by operator=().
|
protected |
Referenced by operator=().