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::DtPageConfiguration Class Reference

A configuration of the pages in the gui. More...

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

Classes

struct  OrderParameters
 
struct  PageCollectionGeometry
 
struct  PageCollectionState
 

Public Types

enum  PageCollectionLocation {
  DockLeft = 0, DockRight = 1, DockTop = 2, DockBottom = 3,
  FloatLeft = DockLeft | 4, FloatRight = DockRight | 4, FloatTop = DockTop | 4, FloatBottom = DockBottom | 4,
  Dialog, Location_End
}
 
typedef std::list< DtPagePathPagePathList
 
typedef std::set< DtPagePathPagePathSet
 
typedef std::map< std::string,
PageCollectionState
PageCollectionStatesMap
 
typedef std::map< std::string,
DtUnicode
PageCollectionTitlesMap
 
- Public Types inherited from makVrv::DtConfiguration
typedef std::map< std::string,
std::string > 
ParameterMap
 

Public Member Functions

 DtPageConfiguration ()
 CTOR. More...
 
virtual ~DtPageConfiguration ()
 DTOR. More...
 
DtPageConfigurationoperator= (const DtPageConfiguration &rhs)
 Assignment operator. More...
 
void addPageCollection (const std::string &collectionClassName, const DtUnicode &pageTitle, PageCollectionLocation location, bool visible, const std::string &pageClassToShow, bool closable=true, bool floatable=true, bool movable=true)
 Add a new page collection to the configuration. More...
 
void removePageCollection (const std::string &collectionClassName)
 Remove a page collection. More...
 
const PageCollectionStatefindPageCollectionState (const std::string &collectionClassName) const
 Find a page collection state. More...
 
PageCollectionStatefindPageCollectionState (const std::string &collectionClassName)
 
const bool isPageVisible (const std::string &pageName) const
 Check whether a page (specified by name) is visible in this configuration. More...
 
const DtUnicodefindPageCollectionTitle (const std::string &collectionClassName) const
 Find a page collection title. More...
 
DtUnicodefindPageCollectionTitle (const std::string &collectionClassName)
 
void addPagePath (const DtPagePath &, int weight=-1)
 Adds the menu path (as well as its entire family). More...
 
void addPagePathAfter (const DtPagePath &newPath, const DtPagePath &relativeTo)
 Adds the menu path after a relative (they must share the same parent). More...
 
void addPagePathBefore (const DtPagePath &newPath, const DtPagePath &relativeTo)
 Adds the menu path before a relative (they must share the same parent). More...
 
void addConfiguration (const DtPageConfiguration &subConfiguration)
 Merges from an external configurations into this configuration. More...
 
void removePagePath (const DtPagePath &)
 Remove the page path. More...
 
void getRootPaths (PagePathList &children) const
 Get all paths which have no parents (aka top level paths). More...
 
void getChildren (const DtPagePath &path, PagePathList &children) const
 Get a list of children (first generation only) for a given path. More...
 
void sortChildren (PagePathList &children) const
 Sort the list of children. More...
 
virtual PagePathList filterForAbsoluteChildren (const PagePathList &children) const
 Filter a list of only the page paths with absolute positions. More...
 
virtual PagePathList filterForRelativeChildren (const PagePathList &children) const
 Filter a list of only the page paths with relative positions. More...
 
int getNewWeight ()
 Get new weight. More...
 
void merge (const DtPageConfiguration &rhs)
 Merges in contents of supplied configuration, adding new paths. More...
 
void copyValuesFrom (const DtPageConfiguration &source)
 Uses the location, geometry, order, etc. More...
 
bool hasPagePath (const DtPagePath &p) const
 Returns true if has the menu path. More...
 
const PageCollectionStatesMapstates () const
 Returns the map of page collection states. More...
 
const PageCollectionTitlesMaptitles () const
 Returns the map of page collection titles. 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< DtPagePath,
OrderParameters
PagePathOrderMap
 

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. More...
 
bool comparePagesByPageOrder (const DtPagePath &a, const DtPagePath &b) const
 Compare by page order, then compare pages with equal order alphabetically. More...
 
virtual const OrderParameterspageOrderFor (const DtPagePath &pagePath) const
 Get the page order parameters for a given page path. More...
 
- 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

PagePathSet myPagePaths
 
PagePathOrderMap myPageOrder
 
PageCollectionStatesMap myCollections
 
PageCollectionTitlesMap myPageCollectionTitles
 
int myCurrentWeight
 
- Protected Attributes inherited from makVrv::DtConfiguration
std::string myName
 
ParameterMap myOptionalParameters
 
DtProxyWP myAttachedInterface
 

Detailed Description

A configuration of the pages in the gui.

Member Typedef Documentation

Member Enumeration Documentation

Enumerator
DockLeft 
DockRight 
DockTop 
DockBottom 
FloatLeft 
FloatRight 
FloatTop 
FloatBottom 
Dialog 
Location_End 

Constructor & Destructor Documentation

makVrv::DtPageConfiguration::DtPageConfiguration ( )

CTOR.

virtual makVrv::DtPageConfiguration::~DtPageConfiguration ( )
virtual

DTOR.

Member Function Documentation

DtPageConfiguration& makVrv::DtPageConfiguration::operator= ( const DtPageConfiguration rhs)

Assignment operator.

void makVrv::DtPageConfiguration::addPageCollection ( const std::string &  collectionClassName,
const DtUnicode pageTitle,
PageCollectionLocation  location,
bool  visible,
const std::string &  pageClassToShow,
bool  closable = true,
bool  floatable = true,
bool  movable = true 
)

Add a new page collection to the configuration.

void makVrv::DtPageConfiguration::removePageCollection ( const std::string &  collectionClassName)

Remove a page collection.

const PageCollectionState* makVrv::DtPageConfiguration::findPageCollectionState ( const std::string &  collectionClassName) const

Find a page collection state.

The page collection can't be changed; to modify a page collection, call addPageCollection with the same collection class name, and new parameters.

PageCollectionState* makVrv::DtPageConfiguration::findPageCollectionState ( const std::string &  collectionClassName)
const bool makVrv::DtPageConfiguration::isPageVisible ( const std::string &  pageName) const

Check whether a page (specified by name) is visible in this configuration.

const DtUnicode* makVrv::DtPageConfiguration::findPageCollectionTitle ( const std::string &  collectionClassName) const

Find a page collection title.

The page collection title can't be changed; to modify a page collection title, call addPageCollection with the same collection class name, and new parameters.

DtUnicode* makVrv::DtPageConfiguration::findPageCollectionTitle ( const std::string &  collectionClassName)
void makVrv::DtPageConfiguration::addPagePath ( const DtPagePath ,
int  weight = -1 
)

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

void makVrv::DtPageConfiguration::addPagePathAfter ( const DtPagePath newPath,
const DtPagePath relativeTo 
)

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

Pages added after get negative weights, to indicate they are added in reverse order.

void makVrv::DtPageConfiguration::addPagePathBefore ( const DtPagePath newPath,
const DtPagePath relativeTo 
)

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

void makVrv::DtPageConfiguration::addConfiguration ( const DtPageConfiguration subConfiguration)

Merges from an external configurations into this configuration.

void makVrv::DtPageConfiguration::removePagePath ( const DtPagePath )

Remove the page path.

void makVrv::DtPageConfiguration::getRootPaths ( PagePathList children) const

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

void makVrv::DtPageConfiguration::getChildren ( const DtPagePath path,
PagePathList children 
) const

Get a list of children (first generation only) for a given path.

/

If there are these three pages:
* Panel\
* Panel\Page1
* Panel\Page2
* And you call getChildren("Panel\",children).
* children will only contain 'Page1' and 'Page2'.
*
void makVrv::DtPageConfiguration::sortChildren ( PagePathList children) const

Sort the list of children.

virtual PagePathList makVrv::DtPageConfiguration::filterForAbsoluteChildren ( const PagePathList children) const
virtual

Filter a list of only the page paths with absolute positions.

virtual PagePathList makVrv::DtPageConfiguration::filterForRelativeChildren ( const PagePathList children) const
virtual

Filter a list of only the page paths with relative positions.

int makVrv::DtPageConfiguration::getNewWeight ( )

Get new weight.

void makVrv::DtPageConfiguration::merge ( const DtPageConfiguration rhs)

Merges in contents of supplied configuration, adding new paths.

Order will get added at the end

void makVrv::DtPageConfiguration::copyValuesFrom ( const DtPageConfiguration source)

Uses the location, geometry, order, etc.

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

bool makVrv::DtPageConfiguration::hasPagePath ( const DtPagePath p) const

Returns true if has the menu path.

const PageCollectionStatesMap& makVrv::DtPageConfiguration::states ( ) const

Returns the map of page collection states.

const PageCollectionTitlesMap& makVrv::DtPageConfiguration::titles ( ) const

Returns the map of page collection titles.

template<class Archive >
void makVrv::DtPageConfiguration::_serialize ( Archive &  ar,
const unsigned int  version 
)
inlineprotected

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.

References DT_SERIALIZE_BASE, and DT_SERIALIZE_MEMBER.

bool makVrv::DtPageConfiguration::comparePagesByPageOrder ( const DtPagePath a,
const DtPagePath b 
) const
protected

Compare by page order, then compare pages with equal order alphabetically.

virtual const OrderParameters& makVrv::DtPageConfiguration::pageOrderFor ( const DtPagePath pagePath) const
protectedvirtual

Get the page order parameters for a given page path.

pagePath must exist in the myPageOrder map; throws DtInvalidInput if not found.

Member Data Documentation

PagePathSet makVrv::DtPageConfiguration::myPagePaths
protected
PagePathOrderMap makVrv::DtPageConfiguration::myPageOrder
protected
PageCollectionStatesMap makVrv::DtPageConfiguration::myCollections
protected
PageCollectionTitlesMap makVrv::DtPageConfiguration::myPageCollectionTitles
protected
int makVrv::DtPageConfiguration::myCurrentWeight
protected

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)