VR-Forces 4.0.4 Class Documentation
Public Member Functions | Protected Member Functions | Protected Attributes
makVrf::DtVrfRightClickContextHandler Class Reference

The menu assembler and configuration were combined into one class for convenience. More...

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

List of all members.

Public Member Functions

 DtVrfRightClickContextHandler (makVrv::DtDe &de)
 Default constructor that should not be used by users.
virtual ~DtVrfRightClickContextHandler ()
 Default destructor which should not be used by users.
virtual void addContext (std::string contextName, DtVrfRightClickContextFunc func)
 Adds a new context to the context handler. This is called by DtVrfRightClickMenu.
virtual void removeContext (std::string contextName)
 Removes a context from the context handler. This is called by DtVrfRightClickMenu.
virtual void setDefaultContext (std::string contextName)
 Sets default context of the context handler. This is called by DtVrfRightClickMenu.
virtual void setCurrentContext (std::string contextName)
 Sets current context of the context handler. This is called by DtVrfRightClickMenu.
virtual void resetContext ()
 Resets the current context to the default context.
virtual std::string currentContext ()
 Gets the current context.
virtual std::string defaultContext ()
 Gets the default context.
virtual void addMenuPath (const makVrv::DtMenuPath &path, int weight=-1)
 Overridden from base class.
virtual void removeMenuPath (const makVrv::DtMenuPath &)
 Overridden from base class.
virtual void addMenuPathAfter (const makVrv::DtMenuPath &newPath, const makVrv::DtMenuPath &relativeTo)
 Overridden from base class.
virtual void addMenuPathBefore (const makVrv::DtMenuPath &newPath, const makVrv::DtMenuPath &relativeTo)
 Overridden from base class.
virtual void registerMenu (makVrv::DtMenu *menu)
 Registers a menu object to the right click menu.
virtual void unregisterMenu (makVrv::DtMenu *menu)
 Unregisters a menu object from the right click menu.
virtual void registerItem (makVrv::DtMenuItem *item)
 Registers a menu item object to the right click menu.
virtual void unregisterItem (makVrv::DtMenuItem *item)
 Unregisters a menu item object to the right click menu.

Protected Member Functions

virtual void applyContext (std::string contextName, makVrv::DtMenuConfiguration &config)
 Internally used function to apply contexts to the configuration.
virtual void applyRegistrations (makVrv::DtQtMenuAssembler &assembler)
 Internally used function to apply registrations to the menu assembler.
virtual void slot_modifyRightClickMenu (makVrv::DtQtMenuAssembler &, makVrv::DtMenuConfiguration &, const makVrv::DtSelectionManager::IdSet &, int, makVrv::DtDe &)
 Internally used function to handle right click at the time it happens.
virtual void registerMenu (makVrv::DtMenuItem *)
 Use registerItem() instead.
virtual void unregisterMenu (makVrv::DtMenu *, bool deleteBuilder=true)
 Use unregisterMenu() instead.
virtual void unregisterMenu (makVrv::DtMenuItem *, bool deleteBuilder=true)
 Use unregisterItem() instead.

Protected Attributes

std::map< std::string,
DtVrfRightClickContextFunc
myChangeRules
std::map< std::string,
DtVrfRightClickChanges * > 
myChanges
std::string myDefaultContext
std::string myCurrentContext
std::vector< makVrv::DtMenu * > myUnregisterMenus
std::vector< makVrv::DtMenu * > myRegisterMenus
std::vector< makVrv::DtMenuItem * > myRegisterItems
std::vector< makVrv::DtMenuItem * > myUnregisterItems

Detailed Description

The menu assembler and configuration were combined into one class for convenience.

Most users won't really notice this or care.


Constructor & Destructor Documentation

Default constructor that should not be used by users.

Default destructor which should not be used by users.


Member Function Documentation

virtual void makVrf::DtVrfRightClickContextHandler::addContext ( std::string  contextName,
DtVrfRightClickContextFunc  func 
) [virtual]

Adds a new context to the context handler. This is called by DtVrfRightClickMenu.

virtual void makVrf::DtVrfRightClickContextHandler::removeContext ( std::string  contextName) [virtual]

Removes a context from the context handler. This is called by DtVrfRightClickMenu.

virtual void makVrf::DtVrfRightClickContextHandler::setDefaultContext ( std::string  contextName) [virtual]

Sets default context of the context handler. This is called by DtVrfRightClickMenu.

virtual void makVrf::DtVrfRightClickContextHandler::setCurrentContext ( std::string  contextName) [virtual]

Sets current context of the context handler. This is called by DtVrfRightClickMenu.

virtual void makVrf::DtVrfRightClickContextHandler::resetContext ( ) [inline, virtual]

Resets the current context to the default context.

virtual std::string makVrf::DtVrfRightClickContextHandler::currentContext ( ) [inline, virtual]

Gets the current context.

virtual std::string makVrf::DtVrfRightClickContextHandler::defaultContext ( ) [inline, virtual]

Gets the default context.

virtual void makVrf::DtVrfRightClickContextHandler::addMenuPath ( const makVrv::DtMenuPath path,
int  weight = -1 
) [virtual]

Overridden from base class.

Adds a menu path to the right click menu based on the current context. To change contexts, you should call setCurrentContext() before calling this function to ensure your right click change happens when you want it to. This function assumes the menu/item at the end of the path is already registered to this class or to DtVrfMainMenu.

Reimplemented from makVrf::DtSubMenuConfiguration.

Overridden from base class.

Removes a menu path from the right click menu based on the current context. To change contexts, you should call setCurrentContext() before calling this function to ensure your right click change happens when you want it to. This function assumes the menu/item at the end of the path is already registered to this class or to DtVrfMainMenu.

Reimplemented from makVrf::DtSubMenuConfiguration.

virtual void makVrf::DtVrfRightClickContextHandler::addMenuPathAfter ( const makVrv::DtMenuPath newPath,
const makVrv::DtMenuPath relativeTo 
) [virtual]

Overridden from base class.

Adds a menu path to the right click menu based on the current context. To change contexts, you should call setCurrentContext() before calling this function to ensure your right click change happens when you want it to. This function assumes the menu/item at the end of the path is already registered to this class or to DtVrfMainMenu.

Reimplemented from makVrf::DtSubMenuConfiguration.

virtual void makVrf::DtVrfRightClickContextHandler::addMenuPathBefore ( const makVrv::DtMenuPath newPath,
const makVrv::DtMenuPath relativeTo 
) [virtual]

Overridden from base class.

Adds a menu path to the right click menu based on the current context. To change contexts, you should call setCurrentContext() before calling this function to ensure your right click change happens when you want it to. This function assumes the menu/item at the end of the path is already registered to this class or to DtVrfMainMenu.

Reimplemented from makVrf::DtSubMenuConfiguration.

Registers a menu object to the right click menu.

Menus registered in the DtVrfMainMenu do not need to be re-registered.

Reimplemented from makVrf::DtConfigurableMenuAssembler.

Unregisters a menu object from the right click menu.

Registers a menu item object to the right click menu.

Menus itmes registered in the DtVrfMainMenu do not need to be re-registered.

Unregisters a menu item object to the right click menu.

virtual void makVrf::DtVrfRightClickContextHandler::applyContext ( std::string  contextName,
makVrv::DtMenuConfiguration config 
) [protected, virtual]

Internally used function to apply contexts to the configuration.

Internally used function to apply registrations to the menu assembler.

Internally used function to handle right click at the time it happens.

The user's entry point into this is to call addContext() and add functions which will eventually be called.

Use registerItem() instead.

Reimplemented from makVrf::DtConfigurableMenuAssembler.

virtual void makVrf::DtVrfRightClickContextHandler::unregisterMenu ( makVrv::DtMenu ,
bool  deleteBuilder = true 
) [protected, virtual]

Use unregisterMenu() instead.

Reimplemented from makVrf::DtConfigurableMenuAssembler.

virtual void makVrf::DtVrfRightClickContextHandler::unregisterMenu ( makVrv::DtMenuItem ,
bool  deleteBuilder = true 
) [protected, virtual]

Use unregisterItem() instead.

Reimplemented from makVrf::DtConfigurableMenuAssembler.


Member Data Documentation

std::map<std::string, DtVrfRightClickChanges*> makVrf::DtVrfRightClickContextHandler::myChanges [protected]

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)