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

a Class which represents a toolbar path. More...

List of all members.

Classes

struct  ToolbarPathBuilder

Public Member Functions

 DtToolbarPath ()
 DtToolbarPath (const ToolbarPathBuilder &builder)
 DtToolbarPath (const DtMenuPath &copy)
 DtToolbarPath (const DtToolbarPath &copy)
 Copy CTOR.
DtToolbarPath menuPart () const
 Get the menu path part of this path.
DtToolbarPath toolbarPart () const
 Get the part that is the toolbar.
DtToolbarPath parentMenu () const
 Returns the parent of this item.
bool isChildOf (const DtToolbarPath &parent) const
 Is this path it's direct parent.
bool isDescendant (const DtToolbarPath &ancestor) const
 Is this path under the given path.
bool isSiblingOf (const DtToolbarPath &sibling) const
 Does this path have the same parent as the given path.
bool isToolbar () const
 Returns true if this path is a toolbar.
bool isAbsolutePath () const
 Is this path rooted off a toolbar.
bool isWidget () const
 Returns true if the item is a widget.
const std::string & path () const
bool isEmpty () const
 Is the path empty.
bool isItem () const
 Is the path an item?
bool isMainMenu () const
 Does the path contain a main menu?
bool isSeparator () const
 Is this path for a separator.
bool isMenu () const
 Is the path a menu (not an item)?
bool isRow () const
 Is the path a row item?
DtToolbarPath 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 operator== (const DtToolbarPath &other) const
bool operator< (const DtToolbarPath &other) const
bool operator!= (const DtToolbarPath &other) const

Static Public Member Functions

static ToolbarPathBuilder toolbar (const std::string &name)
static ToolbarPathBuilder row (const std::string &name)
static DtToolbarPath empty ()
static DtToolbarPath root ()

Protected Member Functions

template<class Archive >
void _serialize (Archive &ar, const unsigned int version)
 Serialize this class.
 DtToolbarPath (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 toolbar path.

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

    DtToolbarPath::toolbar("FileMenu").item("ExitItem");
    DtToolbarPath::toolbar("FileMenu").menu("OpenMenu");
    DtToolbarPath::toolbar("FileMenu").separator("FileMenuSeparator");
    DtToolbarPath::toolbar("FileMenu").widget("FileMode");
 
    If you want to start a new row or add a toolbar to a particular row, use the row("") modifier:
    DtToolbarPath::row("Top_Row").toolbar("FileMenu");

    Note that any item that is not attached to a row is considered to be added to the last row defined.  Any new
    row will create a new toolbar break

A toolbar differs from a menu only in that the root is the name of a toolbar


Constructor & Destructor Documentation

Copy CTOR.

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

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


Member Function Documentation

static ToolbarPathBuilder makVrv::DtToolbarPath::toolbar ( const std::string &  name) [static]
static ToolbarPathBuilder makVrv::DtToolbarPath::row ( const std::string &  name) [static]

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 part that is the toolbar.

Returns the parent of this item.

Is this path it's direct parent.

Is this path under the given path.

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

Returns true if this path is a toolbar.

Is this path rooted off a toolbar.

Returns true if the item is a widget.

const std::string& makVrv::DtToolbarPath::path ( ) const [inline]

Is the path empty.

Is the path an item?

Does the path contain a main menu?

Is this path for a separator.

Is the path a menu (not an item)?

Is the path a row item?

Get the root parent of this path.

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

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

bool makVrv::DtToolbarPath::operator== ( const DtToolbarPath other) const
bool makVrv::DtToolbarPath::operator< ( const DtToolbarPath other) const
bool makVrv::DtToolbarPath::operator!= ( const DtToolbarPath other) const
template<class Archive >
void makVrv::DtToolbarPath::_serialize ( Archive &  ar,
const unsigned int  version 
) [inline, protected]

Serialize this class.

References DT_SERIALIZE_MEMBER.


Member Data Documentation

std::string makVrv::DtToolbarPath::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)