VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
makVrf::DtSubMenuConfiguration Class Reference

Subclass for additional functionality needed by VRF.

Inheritance diagram for makVrf::DtSubMenuConfiguration:
Inheritance graph
[legend]

Public Member Functions

 DtSubMenuConfiguration ()
 
 DtSubMenuConfiguration (const makVrv::DtMenuConfiguration &c)
 
 DtSubMenuConfiguration (makVrv::DtDe *de)
 
virtual ~DtSubMenuConfiguration ()
 
virtual bool isUnique (const std::string &) const
 
int size () const
 
void convert (const std::string &str1, const std::string &str2)
 
virtual void addMenuPath (const makVrv::DtMenuPath &path, const MenuSortFlags &sortFlagsIfMenu=(MenuSortFlags)(SortAllAlphabetically|SortWithinSubmenus|SortBetweenSeparators))
 
virtual void removeMenuPath (const makVrv::DtMenuPath &path)
 
virtual void addMenuPathAfter (const makVrv::DtMenuPath &newPath, const makVrv::DtMenuPath &relativeTo, const MenuSortFlags &sortFlagsIfMenu=(MenuSortFlags)(SortAllAlphabetically|SortWithinSubmenus|SortBetweenSeparators))
 
virtual void addMenuPathBefore (const makVrv::DtMenuPath &newPath, const makVrv::DtMenuPath &relativeTo, const MenuSortFlags &sortFlagsIfMenu=(MenuSortFlags)(SortAllAlphabetically|SortWithinSubmenus|SortBetweenSeparators))
 
virtual void addMenuItemAfter (const std::string &menuItem, const std::string &after)
 
virtual void removeMenuItem (const std::string &menuItem)
 
virtual void addMenuItemBefore (const std::string &menuItem, const std::string &before)
 
virtual makVrv::DtMenuPath menuPathForItem (const std::string &menuItem) const
 
virtual std::string mainMenu () const
 
DtSubMenuConfigurationoperator= (const makVrv::DtMenuConfiguration &rhs)
 
virtual bool fixSortChildren (makVrv::DtMenuConfiguration::MenuPathList &, bool checkOnly=false)
 
void makeChangesTo (makVrv::DtMenuConfiguration *c)
 
void clearMakeChangesTo ()
 
const MenuPathSetpathsRemoved () const
 
const MenuPathSetmenuPaths () const
 
void setProtected (const std::string &p, bool b)
 
bool isProtected (const std::string &p) const
 
bool isGoingToBeRemoved (const makVrv::DtMenuPath &p) const
 
virtual void reworkRelativeOrder ()
 
- Public Member Functions inherited from makVrv::DtMenuConfiguration
 DtMenuConfiguration ()
 
virtual ~DtMenuConfiguration ()
 
void addMenuPath (const DtMenuPath &, const MenuSortFlags &sortFlagsIfMenu=(MenuSortFlags)(SortAllAlphabetically|SortWithinSubmenus|SortBetweenSeparators))
 
void addMenuPathAfter (const DtMenuPath &newPath, const DtMenuPath &relativeTo, const MenuSortFlags &sortFlagsIfMenu=(MenuSortFlags)(SortAllAlphabetically|SortWithinSubmenus|SortBetweenSeparators))
 
void addMenuPathBefore (const DtMenuPath &newPath, const DtMenuPath &relativeTo, const MenuSortFlags &sortFlagsIfMenu=(MenuSortFlags)(SortAllAlphabetically|SortWithinSubmenus|SortBetweenSeparators))
 
void addConfiguration (const DtMenuConfiguration &subConfiguration)
 
void removeMenuPath (const DtMenuPath &)
 
void getRootPaths (MenuPathList &children) const
 
void getChildren (const DtMenuPath &path, MenuPathList &children) const
 
void sortChildren (MenuPathList &children) const
 
DtMenuConfigurationoperator= (const DtMenuConfiguration &rhs)
 
void merge (const DtMenuConfiguration &rhs)
 
bool hasMenuPath (const DtMenuPath &p) const
 
bool menuSortFlags (const DtMenuPath &p, MenuSortFlags &flags) const
 
- Public Member Functions inherited from makVrv::DtConfiguration
 DtConfiguration (const std::string &name="")
 
 DtConfiguration (const DtConfiguration &)
 
DtConfigurationoperator= (const DtConfiguration &)
 
virtual ~DtConfiguration ()
 
virtual const std::string & name () const
 
virtual void setName (const std::string &name)
 
virtual const std::string * findOptionalParameter (const std::string &name) const
 
virtual void setOptionalParameter (const std::string &name, const std::string &value)
 
virtual void setOptionalParameters (const ParameterMap &)
 
virtual void removeOptionalParameter (const std::string &name)
 
const ParameterMapoptionalParameters () const
 

Protected Member Functions

bool sortAbsolute (const makVrv::DtMenuPath &a, const makVrv::DtMenuPath &b) const
 
- Protected Member Functions inherited from makVrv::DtMenuConfiguration
int getNewWeight ()
 
void addMenuPath (const DtMenuPath &, int weight)
 
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)
 

Protected Attributes

makVrv::DtDemyDe
 
std::vector
< makVrv::DtMenuConfiguration * > 
myMakeChangesTo
 
MenuPathSet myPathsRemoved
 
std::map< std::string, boolmyIsProtected
 
- Protected Attributes inherited from makVrv::DtMenuConfiguration
MenuPathSet myMenuPaths
 
MenuPathOrderMap myMenuOrder
 
MenuPathSortFlagsMap myMenuSortFlags
 
int myCurrentWeight
 
- Protected Attributes inherited from makVrv::DtConfiguration
std::string myName
 
ParameterMap myOptionalParameters
 
DtProxyWP myAttachedInterface
 

Additional Inherited Members

- Public Types inherited from makVrv::DtMenuConfiguration
enum  MenuSortFlags {
  NoSort = 0x00000000, SortAllAlphabetically = 0x00000001, SortWithinSubmenus = 0x00000002, SortBetweenSeparators = 0x00000004,
  SortBetweenSubMenus = 0x00000010
}
 
typedef std::list< DtMenuPathMenuPathList
 
typedef std::set< DtMenuPathMenuPathSet
 
- Public Types inherited from makVrv::DtConfiguration
typedef std::map< std::string,
std::string > 
ParameterMap
 
- Protected Types inherited from makVrv::DtMenuConfiguration
typedef std::map< DtMenuPath,
OrderParameters
MenuPathOrderMap
 
typedef std::map< DtMenuPath,
MenuSortFlags
MenuPathSortFlagsMap
 

Constructor & Destructor Documentation

makVrf::DtSubMenuConfiguration::DtSubMenuConfiguration ( )
inline
makVrf::DtSubMenuConfiguration::DtSubMenuConfiguration ( const makVrv::DtMenuConfiguration c)
inline
makVrf::DtSubMenuConfiguration::DtSubMenuConfiguration ( makVrv::DtDe de)
virtual makVrf::DtSubMenuConfiguration::~DtSubMenuConfiguration ( )
virtual

Member Function Documentation

virtual bool makVrf::DtSubMenuConfiguration::isUnique ( const std::string &  ) const
virtual

Returns true if there is only one occurance of this path.

int makVrf::DtSubMenuConfiguration::size ( ) const
inline
void makVrf::DtSubMenuConfiguration::convert ( const std::string &  str1,
const std::string &  str2 
)
inline
virtual void makVrf::DtSubMenuConfiguration::addMenuPath ( const makVrv::DtMenuPath path,
const MenuSortFlags sortFlagsIfMenu = (MenuSortFlags)(SortAllAlphabetically|SortWithinSubmenus|SortBetweenSeparators) 
)
virtual

Adds the menu path to the menu. The weight determines how it will be placed compared to other menus/items in the menu. It is important to note that the menu/item in the path must already be registered to the main menu. Most menus and items will already be registered if they are being used by VRF already. If you are making your own custom menu (and not the simple menus), then you will need to register it first (which does not take place in this class.

Reimplemented in makVrf::DtVrfRightClickContextHandler, and makVrf::DtVrfMainMenuConfiguration.

virtual void makVrf::DtSubMenuConfiguration::removeMenuPath ( const makVrv::DtMenuPath path)
virtual

Removes the path from the menu. Specifically only removes the item at the end of the path, which could be an entire menu or just a sub-menu or an item in a menu.

Reimplemented in makVrf::DtVrfRightClickContextHandler, and makVrf::DtVrfMainMenuConfiguration.

virtual void makVrf::DtSubMenuConfiguration::addMenuPathAfter ( const makVrv::DtMenuPath newPath,
const makVrv::DtMenuPath relativeTo,
const MenuSortFlags sortFlagsIfMenu = (MenuSortFlags)(SortAllAlphabetically|SortWithinSubmenus|SortBetweenSeparators) 
)
virtual

Same as addMenuPath() except you can specify where you want to put the menu/item relative to something else in that menu. The paths must be entirely the same other than the final element.

Reimplemented in makVrf::DtVrfMainMenuConfiguration.

virtual void makVrf::DtSubMenuConfiguration::addMenuPathBefore ( const makVrv::DtMenuPath newPath,
const makVrv::DtMenuPath relativeTo,
const MenuSortFlags sortFlagsIfMenu = (MenuSortFlags)(SortAllAlphabetically|SortWithinSubmenus|SortBetweenSeparators) 
)
virtual

Same as addMenuPath() except you can specify where you want to put the menu/item relative to something else in that menu. The paths must be entirely the same other than the final element.

Reimplemented in makVrf::DtVrfMainMenuConfiguration.

virtual void makVrf::DtSubMenuConfiguration::addMenuItemAfter ( const std::string &  menuItem,
const std::string &  after 
)
virtual

Finds the first occurance of a menu item that matches the "after" in the configuration and adds the menu item to add after that item. If "after" does not exist will be added to the menu configuration in question as a top level menu item.

virtual void makVrf::DtSubMenuConfiguration::removeMenuItem ( const std::string &  menuItem)
virtual

Finds the first occurance of a menu item that matches the "menuItem" in the configuration and removes it.

virtual void makVrf::DtSubMenuConfiguration::addMenuItemBefore ( const std::string &  menuItem,
const std::string &  before 
)
virtual

Finds the first occurance of a menu item that matches the "after" in the configuration and adds the menu item to add before that item. If "before" does not exist will be added to the menu configuration in question as a top level menu item.

virtual makVrv::DtMenuPath makVrf::DtSubMenuConfiguration::menuPathForItem ( const std::string &  menuItem) const
virtual

Finds a menu path that contains the menu item.

virtual std::string makVrf::DtSubMenuConfiguration::mainMenu ( ) const
virtual

Returns the main menu that represents this path. Will be the first items main menu.

DtSubMenuConfiguration& makVrf::DtSubMenuConfiguration::operator= ( const makVrv::DtMenuConfiguration rhs)
inline
virtual bool makVrf::DtSubMenuConfiguration::fixSortChildren ( makVrv::DtMenuConfiguration::MenuPathList ,
bool  checkOnly = false 
)
virtual

Returns true if something was fixed.

void makVrf::DtSubMenuConfiguration::makeChangesTo ( makVrv::DtMenuConfiguration c)
inline
void makVrf::DtSubMenuConfiguration::clearMakeChangesTo ( )
inline
const MenuPathSet& makVrf::DtSubMenuConfiguration::pathsRemoved ( ) const
inline
const MenuPathSet& makVrf::DtSubMenuConfiguration::menuPaths ( ) const
inline
void makVrf::DtSubMenuConfiguration::setProtected ( const std::string &  p,
bool  b 
)
inline
bool makVrf::DtSubMenuConfiguration::isProtected ( const std::string &  p) const
inline
bool makVrf::DtSubMenuConfiguration::isGoingToBeRemoved ( const makVrv::DtMenuPath p) const
inline
virtual void makVrf::DtSubMenuConfiguration::reworkRelativeOrder ( )
virtual

Reworks the relativeTo items to do a closest match and then use that based on the menu paths. If called, call as the last step before menu assembly.

bool makVrf::DtSubMenuConfiguration::sortAbsolute ( const makVrv::DtMenuPath a,
const makVrv::DtMenuPath b 
) const
protected

Member Data Documentation

makVrv::DtDe* makVrf::DtSubMenuConfiguration::myDe
protected
std::vector<makVrv::DtMenuConfiguration*> makVrf::DtSubMenuConfiguration::myMakeChangesTo
protected
MenuPathSet makVrf::DtSubMenuConfiguration::myPathsRemoved
protected
std::map<std::string, bool> makVrf::DtSubMenuConfiguration::myIsProtected
protected

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

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)