VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
makVrv::DtMenuConfiguration Class Reference

A configuration of the menu layout. More...

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

Classes

struct  OrderParameters
 

Public Types

typedef std::list< DtMenuPathMenuPathList
 
typedef std::set< DtMenuPathMenuPathSet
 
- Public Types inherited from makVrv::DtConfiguration
typedef std::map< std::string,
std::string > 
ParameterMap
 

Public Member Functions

 DtMenuConfiguration ()
 CTOR. More...
 
virtual ~DtMenuConfiguration ()
 DTOR. More...
 
void addMenuPath (const DtMenuPath &, int weight=-1)
 Adds the menu path (as well as its entire family). More...
 
void addMenuPathAfter (const DtMenuPath &newPath, const DtMenuPath &relativeTo)
 Adds the menu path after a relative (they must share the same parent). More...
 
void addMenuPathBefore (const DtMenuPath &newPath, const DtMenuPath &relativeTo)
 Adds the menu path before a relative (they must share the same parent). More...
 
void addConfiguration (const DtMenuConfiguration &subConfiguration)
 Merges from an external configurations into this configuration. More...
 
void removeMenuPath (const DtMenuPath &)
 Remove the menu path. More...
 
void getRootPaths (MenuPathList &children) const
 Get all paths which have no parents (aka top level paths). More...
 
void getChildren (const DtMenuPath &path, MenuPathList &children) const
 Get a list of children (first generation only) for a given path. More...
 
void sortChildren (MenuPathList &children) const
 Sort the list of children. More...
 
int getNewWeight ()
 Get new weight. More...
 
DtMenuConfigurationoperator= (const DtMenuConfiguration &rhs)
 
void merge (const DtMenuConfiguration &rhs)
 Merges in contents of supplied configuration, adding new paths. More...
 
bool hasMenuPath (const DtMenuPath &p) const
 Returns true if has the menu path. More...
 
- Public Member Functions inherited from makVrv::DtConfiguration
 DtConfiguration (const std::string &name="")
 CTOR. More...
 
 DtConfiguration (const DtConfiguration &)
 Copy CTOR. More...
 
DtConfigurationoperator= (const DtConfiguration &)
 Assignment OP. More...
 
virtual ~DtConfiguration ()
 DTOR. More...
 
virtual const std::string & name () const
 Get the configuration name. More...
 
virtual void setName (const std::string &name)
 Set the configuration name. More...
 
virtual const std::string * findOptionalParameter (const std::string &name) const
 Find an optional parameters. More...
 
virtual void setOptionalParameter (const std::string &name, const std::string &value)
 Set an optional parameter. More...
 
virtual void setOptionalParameters (const ParameterMap &)
 Set an optional parameters. More...
 
virtual void removeOptionalParameter (const std::string &name)
 Remove an optional parameter. More...
 
const ParameterMapoptionalParameters () const
 Get the optional parameters. More...
 

Protected Types

typedef std::map< DtMenuPath,
OrderParameters
MenuPathOrderMap
 

Protected Member Functions

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)
 Declare serialize functions Call via serialize(Archive ar, unsigned int version); Where Archive can be any of : xml_oarchive,xml_iarchive,binary_oarchive binary_iarchive,text_oarchive, or text_iarchive example: fstream fo("test.xml",std;:ios_base::out); xml_oarchive os(fo); DtConfiguration aConfig; aConfig.serialize(os,0);. More...
 

Protected Attributes

MenuPathSet myMenuPaths
 
MenuPathOrderMap myMenuOrder
 
int myCurrentWeight
 
- Protected Attributes inherited from makVrv::DtConfiguration
std::string myName
 
ParameterMap myOptionalParameters
 
DtProxyWP myAttachedInterface
 

Detailed Description

A configuration of the menu layout.

Member Typedef Documentation

Constructor & Destructor Documentation

makVrv::DtMenuConfiguration::DtMenuConfiguration ( )

CTOR.

virtual makVrv::DtMenuConfiguration::~DtMenuConfiguration ( )
virtual

DTOR.

Member Function Documentation

void makVrv::DtMenuConfiguration::addMenuPath ( const DtMenuPath ,
int  weight = -1 
)

Adds the menu path (as well as its entire family).

void makVrv::DtMenuConfiguration::addMenuPathAfter ( const DtMenuPath newPath,
const DtMenuPath relativeTo 
)

Adds the menu path after a relative (they must share the same parent).

Menus added after get negative weights, to indicate they are added In reverse order.

void makVrv::DtMenuConfiguration::addMenuPathBefore ( const DtMenuPath newPath,
const DtMenuPath relativeTo 
)

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.

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./

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.

int makVrv::DtMenuConfiguration::getNewWeight ( )

Get new weight.

DtMenuConfiguration& makVrv::DtMenuConfiguration::operator= ( const DtMenuConfiguration rhs)
inline
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

Member Data Documentation

MenuPathSet makVrv::DtMenuConfiguration::myMenuPaths
protected

Referenced by operator=().

MenuPathOrderMap makVrv::DtMenuConfiguration::myMenuOrder
protected

Referenced by operator=().

int makVrv::DtMenuConfiguration::myCurrentWeight
protected

Referenced by operator=().


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

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)