MenuControl Class Reference
This class controlls the 3dMenu. More...
#include <MenuControl.h>

Static Public Member Functions | |
| static void | deleteAllMenus () |
| static void | deleteMenu (const char *name) |
| static SGPtr | getUniversalRootPtr () |
| static void | loadMenu (const char *xmlFile) |
| static void | menuButton (int state, Ray &ray) |
| static void | showWidget (const char *menu, const char *widget, bool show) |
| static void | showMenu (const char *menu, bool show) |
| static Menu * | getMenu (const char *menu) |
Static Private Member Functions | |
| static void | addMenu (Menu *m) |
Static Private Attributes | |
| static ObjectStore< Menu > | menus |
| static SceneGraph * | scene = NULL |
Detailed Description
This class controlls the 3dMenu.The setup of the 3dMenu is defined by an XML-file. This class provides static methods for loading these XML-files and modifying the loaded menus and widgets.
This class handles also the input-events, which should be passed to the 3dMenu-library, using the method MenuControl::menuButton( int state, Ray &ray).
The method MenuControl::getUniversalRootPtr() returns the root-node of all menus, which has to be added to the application scenegraph. The coordinate-system of the node, to which the menu-root-node has been added, has to match with the coordinate-system of the parameter ray of the method void MenuControl::menuButton( int state, Ray &ray).
- Date:
- 30rd of April 2007
Member Function Documentation
| void MenuControl::addMenu | ( | Menu * | m | ) | [static, private] |
| void MenuControl::deleteAllMenus | ( | ) | [static] |
This method removes all the menus and widgets.
| void MenuControl::deleteMenu | ( | const char * | name | ) | [static] |
This method removes the menu and all its widgets with the name equal to the parameter name.
- Parameters:
-
name The menu with this name will be removed including all widgets.
| Menu * MenuControl::getMenu | ( | const char * | menu | ) | [static] |
- Parameters:
-
menu the name of the menu
- Returns:
- pointer to the menu
| SGPtr MenuControl::getUniversalRootPtr | ( | ) | [static] |
This method returns the parent-node of all menus.
- Returns:
- the universal parent node
| void MenuControl::loadMenu | ( | const char * | xmlFile | ) | [static] |
The setup of a menu is stored in an XML-file. This method loads such XML-files and creates the menus.
- Parameters:
-
xmlFile the XML-file containing the menu.
| void MenuControl::menuButton | ( | int | state, | |
| Ray & | ray | |||
| ) | [static] |
This method handles input events.
- Parameters:
-
state The state indicates the position of the menu-button of the input-device. (0 means pressed and 1 means released) ray This ray will be intersected with the widgets. The first hit widget gets the pressed- and released-events.
| void MenuControl::showMenu | ( | const char * | menu, | |
| bool | show | |||
| ) | [static] |
This method makes a menu visible or unvisible.
- Parameters:
-
menu the name of the menu show true makes the menu visible, false makes it invisible
| void MenuControl::showWidget | ( | const char * | menu, | |
| const char * | widget, | |||
| bool | show | |||
| ) | [static] |
This method makes a widget visible or unvisible.
- Parameters:
-
menu the name of the menu which contains the widget widget the name of the widget show true makes the widget visible, false makes it invisible
Member Data Documentation
ObjectStore< Menu > MenuControl::menus [static, private] |
SceneGraph * MenuControl::scene = NULL [static, private] |
The documentation for this class was generated from the following files:
- tools/libraries/3DMenu/core/MenuControl.h
- tools/libraries/3DMenu/core/MenuControl.cpp
Generated on Wed Oct 20 16:11:58 2010 for inVRs by
1.5.8