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

A configuration of the toolbar layout. More...

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

List of all members.

Classes

struct  OrderParameters
struct  ToolbarGeometry
struct  ToolbarState

Public Types

enum  ToolbarLocation {
  DockLeft = 0, DockRight = 1, DockTop = 2, DockBottom = 3,
  DockNone = 4
}
typedef std::list< DtToolbarPathToolbarPathList
typedef std::set< DtToolbarPathToolbarPathSet
typedef std::map
< DtToolbarPath, ToolbarState
ToolbarStateMap

Public Member Functions

 DtToolbarConfiguration ()
 CTOR.
 ~DtToolbarConfiguration ()
 DTOR.
void addToolbarPath (const DtToolbarPath &, int weight=-1)
 Adds the toolbar path (as well as its entire family).
void addToolbarPathAfter (const DtToolbarPath &newPath, const DtToolbarPath &relativeTo)
void addToolbarPathBefore (const DtToolbarPath &newPath, const DtToolbarPath &relativeTo)
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)
void addMenuPathBefore (const DtMenuPath &newPath, const DtMenuPath &relativeTo)
void removeMenuPath (const DtMenuPath &newPath)
void addConfiguration (const DtToolbarConfiguration &subConfiguration)
 Merges from an external configurations into this configuration.
void removeToolbarPath (const DtToolbarPath &)
 Remove the menu path.
void getRootPaths (ToolbarPathList &children) const
 Get all paths which have no parents (aka top level paths).
void getChildren (const DtToolbarPath &path, ToolbarPathList &children) const
void sortChildren (ToolbarPathList &children) const
 Sort the list of children.
int getNewWeight ()
 Get new weight.
DtToolbarConfigurationoperator= (const DtToolbarConfiguration &rhs)
const DtMenuConfigurationmenuConfiguration () const
 Menu configuration that is specific to this toolbar configuration and can only be used with toolbars defined through this configuration.
void merge (const DtToolbarConfiguration &rhs)
 Merges in contents of supplied configuration, adding new paths.
void copyValuesFrom (const DtToolbarConfiguration &source)
 Uses the location, geometry, order, etc.
void updateState (const DtToolbarPath &tb, ToolbarState &state)
 Updates the state of the given toolbar path to the new one passed by argument.
const ToolbarStatestate (const DtToolbarPath &tb) const
 Returns the UI state for the given toolbar path.
const ToolbarStateMapstates () const
 Returns the map with the UI state of each toolbar.
void setVisible (const DtToolbarPath &tb, bool isVisible)
 Set the myIsVisible state value for a toolbar path.

Protected Types

typedef std::map
< DtToolbarPath,
OrderParameters
ToolbarPathOrderMap

Protected Member Functions

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);.
bool sortAbsolute (const DtToolbarPath &a, const DtToolbarPath &b) const

Protected Attributes

ToolbarStateMap myToolbarStates
ToolbarPathSet myToolbarPaths
ToolbarPathOrderMap myToolbarOrder
int myCurrentWeight
DtMenuConfiguration myMenuConfiguration
 If there are menus that are specifically created for toolbars, they go here.

Detailed Description

A configuration of the toolbar layout.


Member Typedef Documentation


Member Enumeration Documentation

Enumerator:
DockLeft 
DockRight 
DockTop 
DockBottom 
DockNone 

Constructor & Destructor Documentation

CTOR.

DTOR.


Member Function Documentation

void makVrv::DtToolbarConfiguration::addToolbarPath ( const DtToolbarPath ,
int  weight = -1 
)

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

void makVrv::DtToolbarConfiguration::addToolbarPathAfter ( const DtToolbarPath newPath,
const DtToolbarPath relativeTo 
)
void makVrv::DtToolbarConfiguration::addToolbarPathBefore ( const DtToolbarPath newPath,
const DtToolbarPath relativeTo 
)
void makVrv::DtToolbarConfiguration::addMenuPath ( const DtMenuPath ,
int  weight = -1 
)

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

void makVrv::DtToolbarConfiguration::addMenuPathAfter ( const DtMenuPath newPath,
const DtMenuPath relativeTo 
)
void makVrv::DtToolbarConfiguration::addMenuPathBefore ( const DtMenuPath newPath,
const DtMenuPath relativeTo 
)

Merges from an external configurations into this configuration.

Remove the menu path.

Get all paths which have no parents (aka top level paths).

void makVrv::DtToolbarConfiguration::getChildren ( const DtToolbarPath path,
ToolbarPathList children 
) const

Sort the list of children.

Get new weight.

DtToolbarConfiguration& makVrv::DtToolbarConfiguration::operator= ( const DtToolbarConfiguration rhs) [inline]

Menu configuration that is specific to this toolbar configuration and can only be used with toolbars defined through this configuration.

Assumes that any creators are registered with the system creator factory

Merges in contents of supplied configuration, adding new paths.

Order will get added at the end

Uses the location, geometry, order, etc.

values from the supplied configuration while keeping the existence of toolbars based on the existing configuration

Updates the state of the given toolbar path to the new one passed by argument.

Returns the UI state for the given toolbar path.

Returns the map with the UI state of each toolbar.

void makVrv::DtToolbarConfiguration::setVisible ( const DtToolbarPath tb,
bool  isVisible 
)

Set the myIsVisible state value for a toolbar path.

template<class Archive >
void makVrv::DtToolbarConfiguration::_serialize ( Archive &  ar,
const unsigned int  version 
) [inline, protected]

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);.

Serialize this class.

Reimplemented from makVrv::DtConfiguration.

References DT_SERIALIZE_BASE, and DT_SERIALIZE_MEMBER.

bool makVrv::DtToolbarConfiguration::sortAbsolute ( const DtToolbarPath a,
const DtToolbarPath b 
) const [protected]

Member Data Documentation

Referenced by operator=().

Referenced by operator=().

Referenced by operator=().

If there are menus that are specifically created for toolbars, they go here.

Referenced by operator=().


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)