VR-Forces 4.0.4 Class Documentation
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
makVrv::DtMenuPath Class Reference

a Class which represents a menu path. More...

Inheritance diagram for makVrv::DtMenuPath:
Inheritance graph
[legend]

List of all members.

Classes

struct  MenuPathBuilder

Public Member Functions

 DtMenuPath (const MenuPathBuilder &builder)
 DtMenuPath (const DtMenuPath &copy)
 Copy CTOR.
const std::string & path () const
DtMenuPath menuPart () const
 Get the menu path part of this path.
DtMenuPath parentMenu () const
 Get the path to the parent of this path.
DtMenuPath rootParentMenu () const
 Get the root parent of this path.
std::string name () const
 Get the name of the this menu path, this is either the item name or the menu name.
bool isEmpty () const
 Is the path empty.
bool isAbsolutePath () const
 Is this path rooted off a main menu.
bool isMainMenu () const
 Is this item a main menu path.
bool isPopupPath () const
 Is this item a popup menu path.
bool isMenu () const
 Is the path a menu (not an item)?
bool isItem () const
 Is the path an item?
bool isChildOf (const DtMenuPath &parent) const
 Is this path it's direct parent.
bool isDescendant (const DtMenuPath &ancestor) const
 Is this path under the given path.
bool isSiblingOf (const DtMenuPath &sibling) const
 Does this path have the same parent as the given path.
bool isSeparator () const
 Is this path for a separator.
bool operator== (const DtMenuPath &other) const
bool operator< (const DtMenuPath &other) const
bool operator!= (const DtMenuPath &other) const

Static Public Member Functions

static DtMenuPath empty ()
static DtMenuPath root ()
static DtMenuPath popup ()
static MenuPathBuilder mainMenu (const std::string &name)
static MenuPathBuilder popupMenu (const std::string &name)
static MenuPathBuilder menu (const std::string &name)

Protected Member Functions

 DtMenuPath (const std::string &path)
 Protected CTOR, use the static MenuMenu function to start a path.

Protected Attributes

std::string myPath
 Internal path.

Detailed Description

a Class which represents a menu path.

The specific strings are not menu text, but the names used when registering menuBuilder and menuItemBuilder instances.

    DtMenuPath::mainMenu("FileMenu").item("ExitItem");
    DtMenuPath::mainMenu("FileMenu").menu("OpenMenu").item("OpenTerrainFile");

Constructor & Destructor Documentation

Copy CTOR.

makVrv::DtMenuPath::DtMenuPath ( const std::string &  path) [protected]

Protected CTOR, use the static MenuMenu function to start a path.


Member Function Documentation

static DtMenuPath makVrv::DtMenuPath::root ( ) [static]
static MenuPathBuilder makVrv::DtMenuPath::mainMenu ( const std::string &  name) [static]
static MenuPathBuilder makVrv::DtMenuPath::popupMenu ( const std::string &  name) [static]
static MenuPathBuilder makVrv::DtMenuPath::menu ( const std::string &  name) [static]
const std::string& makVrv::DtMenuPath::path ( ) const [inline]

Reimplemented in makVrf::DtSubMenuPath.

Referenced by makVrf::DtSubMenuPath::path().

Get the menu path part of this path.

Typically this will remove the item, however it will simply return a copy is the path has no item.

Get the path to the parent of this path.

If this path is the top level an empty path is returned.

Get the root parent of this path.

std::string makVrv::DtMenuPath::name ( ) const

Get the name of the this menu path, this is either the item name or the menu name.

Is the path empty.

Is this path rooted off a main menu.

Is this item a main menu path.

Is this item a popup menu path.

Is the path a menu (not an item)?

Is the path an item?

bool makVrv::DtMenuPath::isChildOf ( const DtMenuPath parent) const

Is this path it's direct parent.

bool makVrv::DtMenuPath::isDescendant ( const DtMenuPath ancestor) const

Is this path under the given path.

bool makVrv::DtMenuPath::isSiblingOf ( const DtMenuPath sibling) const

Does this path have the same parent as the given path.

Is this path for a separator.

bool makVrv::DtMenuPath::operator== ( const DtMenuPath other) const
bool makVrv::DtMenuPath::operator< ( const DtMenuPath other) const
bool makVrv::DtMenuPath::operator!= ( const DtMenuPath other) const

Member Data Documentation

std::string makVrv::DtMenuPath::myPath [protected]

Internal path.


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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)