Overview | All Modules | Tutorial | User's Guide | Programming Guide |
Previous | COVISE Online Documentation | Next |
This class provides a general menu for use in 3D space. More...
#include <coMenu.h>
Public Types | |
enum | { MENU_ONOFF = 0 , MENU_SLIDE } |
Public Types inherited from vrui::coAction | |
enum | Result { ACTION_DONE = 0x00 , ACTION_CALL_ON_MISS = 0x01 , ACTION_UNDEF = 0x02 } |
Public Member Functions | |
coMenu (coMenu *parentMenu, const std::string &name) | |
Constructor. More... | |
virtual | ~coMenu () |
Sets the matrix which defines location and orientation. More... | |
virtual void | setTransformMatrix (vruiMatrix *matrix)=0 |
virtual void | setTransformMatrix (vruiMatrix *matrix, float scale)=0 |
of the menu. More... | |
virtual void | setScale (float s)=0 |
Returns the matrix which defines location and orientation of the menu. More... | |
virtual float | getScale () const =0 |
Gets the current scaling factor. More... | |
virtual void | add (coMenuItem *item) |
Add a new menu item to this menu. More... | |
virtual void | insert (coMenuItem *item, int location) |
Insert a menu item into the linked menu item list. More... | |
virtual void | setMenuListener (coMenuFocusListener *listener) |
Set a new menu listener to receive menu item events. More... | |
virtual int | hit (vruiHit *hit) |
Hit is called whenever the menu is intersected by the input device. More... | |
virtual void | miss () |
Miss is called once after a hit, if the menu is not intersected anymore. More... | |
virtual coUIElement * | getUIElement () |
return the actual UI Element that represents this menu. More... | |
virtual void | setVisible (bool) |
virtual void | positionAllSubmenus () |
reposition all submenus, for example after the main menu was repositioned with setTransform matrix More... | |
virtual void | remove (coMenuItem *item) |
Remove a menu item from the linked list. More... | |
virtual void | removeAll () |
Remove all menu items from the linked list. More... | |
virtual int | getItemCount () const |
Return the number of menu items in the linked list. More... | |
virtual void | closeMenu () |
This method is called when the menu is closed. More... | |
virtual void | selected (bool select) |
Menu is selected via joystick. More... | |
virtual void | doActionPress () |
Action is called via joystick. More... | |
virtual void | doActionRelease () |
Action is called via joystick. More... | |
virtual void | doSecondActionPress () |
Action is called via joystick. More... | |
virtual void | doSecondActionRelease () |
Action is called via joystick. More... | |
virtual void | makeVisible (coMenuItem *) |
makes the item visible for joystick interaction More... | |
virtual vruiTransformNode * | getDCS ()=0 |
Get Transformation Node. More... | |
virtual bool | isInteractionActive () const |
coCombinedButtonInteraction * | getInteraction () const |
coCombinedButtonInteraction * | getMoveInteraction () const |
virtual void | show ()=0 |
makes the menu visible More... | |
virtual void | hide ()=0 |
hides this menu More... | |
void | setShowMode (int mode) |
This methode sets the desired showMode. More... | |
int | getShowMode () const |
This methode returns the showMode currently set. More... | |
virtual void | setSubMenuItem (coGenericSubMenuItem *item) |
Set submenu item from which this menu can be accessed. More... | |
coGenericSubMenuItem * | getSubMenuItem () |
Get submenu item from which this menu can be accessed. More... | |
virtual const char * | getClassName () const |
get the Element's classname More... | |
virtual bool | isOfClassName (const char *) const |
check if the Element or any ancestor is this classname More... | |
void | closeAllOtherMenus (coMenuItem *leave=0) |
close all menus: optionally leave one open More... | |
void | removeAllAfter (coMenuItem *last) |
remove all items behind a given one More... | |
bool | isVisible () const |
check whether menu is currently visible More... | |
const char * | getName () const |
get my menu's name More... | |
coMenuItemVector | getAllItems () |
coMenuItem * | getItemByName (const char *name) |
int | index (const coMenuItem *item) |
void | setParent (coMenu *newParent) |
const coMenu * | getParent () |
virtual void | setAttachment (int att) |
virtual int | getAttachment () const |
bool | wasMoved () const |
void | setMoved (bool flag) |
Public Member Functions inherited from vrui::coAction | |
coAction () | |
Constructor. More... | |
virtual | ~coAction () |
Destructor. More... | |
virtual int | hit (vruiHit *hit)=0 |
hit is called whenever the node, or any node underneath the node with this action is intersected return ACTION_CALL_ON_MISS if you want miss to be called otherwise return ACTION_DONE More... | |
virtual void | miss () |
miss is called once after a hit, if the node is not intersected anymore More... | |
void | setFrame (unsigned int frame) |
INTERNAL set the framecounter (used to produce the miss call) More... | |
unsigned int | getFrame () const |
INTERNAL get the framecounter (used to produce the miss call) More... | |
void | setNode (vruiNode *) |
INTERNAL set the node this action belongs to. More... | |
void | addChild (coAction *) |
INTERNAL add a child action. More... | |
virtual int | hitAll (vruiHit *hit) |
INTERNAL same as miss/hit, but do it for all children as well. More... | |
virtual void | missAll () |
INTERNAL same as miss/hit, but do it for all children as well. More... | |
Public Member Functions inherited from vrui::coUpdateable | |
coUpdateable () | |
Constructor. More... | |
virtual | ~coUpdateable () |
you should adds this object to the update manager in your constructor More... | |
virtual bool | update ()=0 |
this method is called once per frame as long as it returns true. More... | |
Protected Attributes | |
std::list< coMenuItem * > | items |
list of menu items which can be accessed from this menu More... | |
coMenu * | parent |
parent menu, NULL if this is the topmost menu More... | |
coGenericSubMenuItem * | myMenuItem |
coMenuFocusListener * | listener |
menu event listener, triggered on menu selection More... | |
int | showMode |
how to show and hide this Menu More... | |
bool | visible |
std::string | name |
coCombinedButtonInteraction * | interaction |
coCombinedButtonInteraction * | moveInteraction |
coCombinedButtonInteraction * | wheelInteraction |
interaction for preventing accidental global wheel interaction More... | |
float | scale_ |
vruiMatrix * | matrix_ |
int | attachment_ |
bool | wasMoved_ = false |
Protected Attributes inherited from vrui::coAction | |
std::string | actionName |
name of this action this can be used to distinguish betwenn different types of actions like touch and intersection actions More... | |
This class provides a general menu for use in 3D space.
It does not impose any restrictions on the layout of the menu items. A possible layout is defined in the subclass coRowMenu.
vrui::coMenu::coMenu | ( | coMenu * | parentMenu, |
const std::string & | namePtr | ||
) |
Constructor.
parentMenu | pointer to parent menu class, NULL if this is the topmost menu |
|
virtual |
Sets the matrix which defines location and orientation.
Destructor.
|
virtual |
Add a new menu item to this menu.
The menu item is appended to the end of the local linked list of menu items.
Reimplemented in vrui::coToolboxMenu, and vrui::coRowMenu.
void vrui::coMenu::closeAllOtherMenus | ( | coMenuItem * | leave = 0 | ) |
close all menus: optionally leave one open
close all menus except a given item
|
virtual |
This method is called when the menu is closed.
If this menu is not the topmost menu, it closes the submenu entry by which it was opened previously.
|
virtual |
Action is called via joystick.
the menu is pressed via joystick
|
virtual |
Action is called via joystick.
the menu is pressed via joystick
|
virtual |
Action is called via joystick.
the menu is pressed via joystick
|
virtual |
Action is called via joystick.
the menu is pressed via joystick
coMenuItemVector vrui::coMenu::getAllItems | ( | ) |
|
inlinevirtual |
Reimplemented in vrui::coToolboxMenu.
|
virtual |
get the Element's classname
Reimplemented in vrui::coRowMenu, and vrui::coToolboxMenu.
|
pure virtual |
Get Transformation Node.
Implemented in vrui::coRowMenu, and vrui::coToolboxMenu.
coCombinedButtonInteraction * vrui::coMenu::getInteraction | ( | ) | const |
coMenuItem * vrui::coMenu::getItemByName | ( | const char * | name | ) |
|
virtual |
Return the number of menu items in the linked list.
Reimplemented in vrui::coToolboxMenu.
coCombinedButtonInteraction * vrui::coMenu::getMoveInteraction | ( | ) | const |
const char * vrui::coMenu::getName | ( | ) | const |
get my menu's name
|
inline |
|
pure virtual |
Gets the current scaling factor.
Implemented in vrui::coRowMenu, and vrui::coToolboxMenu.
int vrui::coMenu::getShowMode | ( | ) | const |
This methode returns the showMode currently set.
coGenericSubMenuItem * vrui::coMenu::getSubMenuItem | ( | ) |
Get submenu item from which this menu can be accessed.
|
virtual |
return the actual UI Element that represents this menu.
Reimplemented in vrui::coRowMenu, and vrui::coToolboxMenu.
|
pure virtual |
hides this menu
Implemented in vrui::coRowMenu, and vrui::coToolboxMenu.
|
virtual |
Hit is called whenever the menu is intersected by the input device.
Implements vrui::coAction.
Reimplemented in vrui::coRowMenu.
int vrui::coMenu::index | ( | const coMenuItem * | item | ) |
|
virtual |
Insert a menu item into the linked menu item list.
item | menu item to insert |
pos | menu item index before which to insert the new item |
Reimplemented in vrui::coToolboxMenu, and vrui::coRowMenu.
|
virtual |
|
virtual |
check if the Element or any ancestor is this classname
Reimplemented in vrui::coRowMenu, and vrui::coToolboxMenu.
bool vrui::coMenu::isVisible | ( | ) | const |
check whether menu is currently visible
|
virtual |
makes the item visible for joystick interaction
Reimplemented in vrui::coRowMenu, and vrui::coToolboxMenu.
|
virtual |
Miss is called once after a hit, if the menu is not intersected anymore.
Reimplemented from vrui::coAction.
Reimplemented in vrui::coRowMenu.
|
virtual |
reposition all submenus, for example after the main menu was repositioned with setTransform matrix
|
virtual |
Remove a menu item from the linked list.
Reimplemented in vrui::coToolboxMenu, and vrui::coRowMenu.
|
virtual |
Remove all menu items from the linked list.
Reimplemented in vrui::coToolboxMenu.
void vrui::coMenu::removeAllAfter | ( | coMenuItem * | last | ) |
remove all items behind a given one
close all menus below a given item
|
virtual |
Menu is selected via joystick.
select is called if the menu is selected via joystick overwrite this function for RowMenu and ToolboxMenu
Reimplemented in vrui::coRowMenu, and vrui::coToolboxMenu.
|
virtual |
Reimplemented in vrui::coToolboxMenu.
|
virtual |
Set a new menu listener to receive menu item events.
void vrui::coMenu::setMoved | ( | bool | flag | ) |
|
inline |
|
pure virtual |
Returns the matrix which defines location and orientation of the menu.
Sets an offset matrix which is added to the current transformation Sets the menu size by applying a scaling factor to the default size.
Implemented in vrui::coToolboxMenu, and vrui::coRowMenu.
void vrui::coMenu::setShowMode | ( | int | mode | ) |
This methode sets the desired showMode.
|
virtual |
Set submenu item from which this menu can be accessed.
|
pure virtual |
Implemented in vrui::coToolboxMenu, and vrui::coRowMenu.
|
pure virtual |
of the menu.
Sets the matrix which defines location orientation and scale of the menu and the scale factor included in the matrix.
Implemented in vrui::coToolboxMenu, and vrui::coRowMenu.
|
virtual |
Reimplemented in vrui::coToolboxMenu, and vrui::coRowMenu.
|
pure virtual |
makes the menu visible
Implemented in vrui::coRowMenu, and vrui::coToolboxMenu.
bool vrui::coMenu::wasMoved | ( | ) | const |
|
protected |
|
protected |
|
protected |
list of menu items which can be accessed from this menu
|
protected |
menu event listener, triggered on menu selection
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
parent menu, NULL if this is the topmost menu
|
protected |
|
protected |
how to show and hide this Menu
|
protected |
|
protected |
|
protected |
interaction for preventing accidental global wheel interaction
Previous | Next |
Authors: Martin Aumüller, Ruth Lang, Daniela Rainer, Jürgen Schulze-Döbold, Andreas Werner, Peter Wolf, Uwe Wössner |
Copyright © 1993-2009 HLRS, 2004-2009 RRZK, 2005-2009 Visenso |
COVISE Version 6.5 Academic
|