![]() |
VR-Forces 4.0.4 Class Documentation
|
A configuration of the menu layout. More...

Classes | |
| struct | OrderParameters |
Public Types | |
| typedef std::list< DtMenuPath > | MenuPathList |
| typedef std::set< DtMenuPath > | MenuPathSet |
Public Member Functions | |
| DtMenuConfiguration () | |
| CTOR. | |
| ~DtMenuConfiguration () | |
| DTOR. | |
| void | addMenuPath (const DtMenuPath &, int weight=-1) |
| Adds the menu path (as well as its entire family). | |
| void | addMenuPathAfter (const DtMenuPath &newPath, const DtMenuPath &relativeTo) |
| Adds the menu path before a relative (they must share the same parent). | |
| void | addMenuPathBefore (const DtMenuPath &newPath, const DtMenuPath &relativeTo) |
| Adds the menu path before a relative (they must share the same parent). | |
| void | addConfiguration (const DtMenuConfiguration &subConfiguration) |
| Merges from an external configurations into this configuration. | |
| void | removeMenuPath (const DtMenuPath &) |
| Remove the menu path. | |
| void | getRootPaths (MenuPathList &children) const |
| Get all paths which have no parents (aka top level paths). | |
| void | getChildren (const DtMenuPath &path, MenuPathList &children) const |
| Get a list of children (first generation only) for a given path. | |
| void | sortChildren (MenuPathList &children) const |
| Sort the list of children. | |
| int | getNewWeight () |
| Get new weight. | |
| DtMenuConfiguration & | operator= (const DtMenuConfiguration &rhs) |
| void | merge (const DtMenuConfiguration &rhs) |
| Merges in contents of supplied configuration, adding new paths. | |
| bool | hasMenuPath (const DtMenuPath &p) const |
| Returns true if has the menu path. | |
Protected Types | |
| typedef std::map< DtMenuPath, OrderParameters > | MenuPathOrderMap |
Protected Member Functions | |
| bool | sortAbsolute (const DtMenuPath &a, const DtMenuPath &b) const |
Protected Attributes | |
| MenuPathSet | myMenuPaths |
| MenuPathOrderMap | myMenuOrder |
| int | myCurrentWeight |
A configuration of the menu layout.
| typedef std::list<DtMenuPath> makVrv::DtMenuConfiguration::MenuPathList |
| typedef std::set<DtMenuPath> makVrv::DtMenuConfiguration::MenuPathSet |
typedef std::map<DtMenuPath,OrderParameters> makVrv::DtMenuConfiguration::MenuPathOrderMap [protected] |
| void makVrv::DtMenuConfiguration::addMenuPath | ( | const DtMenuPath & | , |
| int | weight = -1 |
||
| ) |
Adds the menu path (as well as its entire family).
Reimplemented in makVrf::DtVrfRightClickContextHandler, makVrf::DtSubMenuConfiguration, and makVrf::DtVrfMainMenuConfiguration.
| void makVrv::DtMenuConfiguration::addMenuPathAfter | ( | const DtMenuPath & | newPath, |
| const DtMenuPath & | relativeTo | ||
| ) |
Adds the menu path before a relative (they must share the same parent).
Menus added after get negative weights, to indicate they are added In reverse order.
Reimplemented in makVrf::DtVrfRightClickContextHandler, makVrf::DtSubMenuConfiguration, and makVrf::DtVrfMainMenuConfiguration.
| void makVrv::DtMenuConfiguration::addMenuPathBefore | ( | const DtMenuPath & | newPath, |
| const DtMenuPath & | relativeTo | ||
| ) |
Adds the menu path before a relative (they must share the same parent).
Reimplemented in makVrf::DtVrfRightClickContextHandler, makVrf::DtSubMenuConfiguration, and makVrf::DtVrfMainMenuConfiguration.
| 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.
Reimplemented in makVrf::DtVrfRightClickContextHandler, makVrf::DtSubMenuConfiguration, and makVrf::DtVrfMainMenuConfiguration.
| 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.
/
If there are these three menu items:
File\
File\Open\
File\Open\Terrain
And you call getChildren("File\",children).
children will only contain 'File\Open'.
| void makVrv::DtMenuConfiguration::sortChildren | ( | MenuPathList & | children | ) | const |
Sort the list of children.
Get new weight.
| DtMenuConfiguration& makVrv::DtMenuConfiguration::operator= | ( | const DtMenuConfiguration & | rhs | ) | [inline] |
Reimplemented in makVrf::DtSubMenuConfiguration.
References myCurrentWeight, myMenuOrder, and myMenuPaths.
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 has the menu path.
| bool makVrv::DtMenuConfiguration::sortAbsolute | ( | const DtMenuPath & | a, |
| const DtMenuPath & | b | ||
| ) | const [protected] |
MenuPathSet makVrv::DtMenuConfiguration::myMenuPaths [protected] |
Referenced by operator=().
Referenced by operator=().
int makVrv::DtMenuConfiguration::myCurrentWeight [protected] |
Referenced by operator=().