Overview | All Modules | Tutorial | User's Guide | Programming Guide |
Previous | COVISE Online Documentation | Next |
This is the base class of all menu items. More...
#include <coMenuItem.h>
Public Member Functions | |
coMenuItem (const std::string &name) | |
Constructor. More... | |
virtual | ~coMenuItem () |
Destructor. Removes this menu item from the parent menu. More... | |
virtual void | setMenuListener (coMenuListener *listener) |
Set a new menu listener to receive menu item events. More... | |
virtual coMenuListener * | getMenuListener () |
Get the menu listener to receive menu item events. More... | |
virtual void | setParentMenu (coMenu *parent) |
Set the parent menu in which this menu item is listed. More... | |
virtual void | setVisible (bool visible) |
show or hide this menu item., just removes it from the scenegraph in the default implementation, should do something better in the real implementation More... | |
virtual bool | isVisible () const |
virtual void | setAttachment (int) |
sets the attachment border More... | |
virtual const char * | getName () const |
returns the symbolic name of this menu item. More... | |
virtual coUIElement * | getUIElement () |
return the actual UI Element that represents this menu. 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... | |
coMenu * | getParentMenu () |
get my parent menu More... | |
void | setName (const std::string &newName, bool updateTwins=true) |
set my name - items with labels must call this when changing label More... | |
virtual void | setActive (bool a) |
functions activates or deactivates the item More... | |
virtual bool | getActive () |
return if item is active More... | |
virtual void | setLabel (const std::string &newName) |
this function may be overloaded - it is called by setName() More... | |
virtual void | selected (bool select) |
MenuItem 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 () |
second Action for Item More... | |
virtual void | doSecondActionRelease () |
second Action for Item More... | |
Protected Attributes | |
bool | visible |
coMenu * | myMenu |
parent menu which contains More... | |
coMenuListener * | listener |
menu event listener, triggered More... | |
std::string | myName |
name of the item (internal More... | |
bool | active_ |
flag if item is active More... | |
This is the base class of all menu items.
It stores the action listener which is to be called when a menu item is selected by the user.
vrui::coMenuItem::coMenuItem | ( | const std::string & | name | ) |
Constructor.
Creates a new menu item.
name | text to appear on label |
|
virtual |
Destructor. Removes this menu item from the parent menu.
|
virtual |
Action is called via joystick.
if item should do any action if item is pressed via joystick, overwrite this function
Reimplemented in vrui::coPotiMenuItem, vrui::coPotiToolboxItem, vrui::coSliderMenuItem, and vrui::coSliderToolboxItem.
|
virtual |
Action is called via joystick.
if item should do any action if item is pressed via joystick, overwrite this function
Reimplemented in vrui::coButtonMenuItem, vrui::coCheckboxMenuItem, vrui::coIconButtonToolboxItem, vrui::coIconToggleButtonToolboxItem, vrui::coSliderMenuItem, vrui::coSubMenuItem, and vrui::coSubMenuToolboxItem.
|
virtual |
second Action for Item
if item should do any action if item is pressed second action via joystick, overwrite this function if not overwritten calls first action (doAction)
Reimplemented in vrui::coPotiMenuItem, vrui::coPotiToolboxItem, vrui::coSliderMenuItem, and vrui::coSliderToolboxItem.
|
virtual |
second Action for Item
if item should do any action if item is pressed second action via joystick, overwrite this function closes the menu if it has a parent menu
Reimplemented in vrui::coSliderMenuItem, vrui::coSubMenuItem, and vrui::coToolboxMenuItem.
|
inlinevirtual |
return if item is active
|
virtual |
get the Element's classname
Reimplemented in vrui::coButtonMenuItem, vrui::coCheckboxMenuItem, vrui::coIconButtonToolboxItem, vrui::coIconSubMenuToolboxItem, vrui::coIconToggleButtonToolboxItem, vrui::coLabelMenuItem, vrui::coLabelSubMenuToolboxItem, vrui::coMovableBackgroundMenuItem, vrui::coPotiMenuItem, vrui::coPotiToolboxItem, vrui::coProgressBarMenuItem, vrui::coSliderMenuItem, vrui::coSliderToolboxItem, vrui::coSubMenuItem, vrui::coToolboxMenuItem, vrui::coRowMenuItem, and vrui::coSubMenuToolboxItem.
|
virtual |
Get the menu listener to receive menu item events.
|
virtual |
returns the symbolic name of this menu item.
|
inline |
get my parent menu
|
virtual |
return the actual UI Element that represents this menu.
Reimplemented in vrui::coMovableBackgroundMenuItem, vrui::coToolboxMenuItem, and vrui::coRowMenuItem.
|
virtual |
check if the Element or any ancestor is this classname
Reimplemented in vrui::coButtonMenuItem, vrui::coCheckboxMenuItem, vrui::coIconButtonToolboxItem, vrui::coIconToggleButtonToolboxItem, vrui::coLabelMenuItem, vrui::coMovableBackgroundMenuItem, vrui::coPotiMenuItem, vrui::coPotiToolboxItem, vrui::coProgressBarMenuItem, vrui::coSliderMenuItem, vrui::coSliderToolboxItem, vrui::coSubMenuItem, vrui::coToolboxMenuItem, vrui::coRowMenuItem, vrui::coSubMenuToolboxItem, vrui::coIconSubMenuToolboxItem, and vrui::coLabelSubMenuToolboxItem.
|
virtual |
|
virtual |
MenuItem is selected via joystick.
if item should do any action if joystick selects the item, overwrite this function
Reimplemented in vrui::coButtonMenuItem, vrui::coCheckboxMenuItem, vrui::coIconButtonToolboxItem, vrui::coIconToggleButtonToolboxItem, vrui::coSliderMenuItem, vrui::coSliderToolboxItem, vrui::coSubMenuItem, vrui::coSubMenuToolboxItem, vrui::coRowMenuItem, vrui::coPotiMenuItem, and vrui::coPotiToolboxItem.
|
inlinevirtual |
functions activates or deactivates the item
Reimplemented in vrui::coButtonMenuItem, vrui::coCheckboxMenuItem, vrui::coIconButtonToolboxItem, vrui::coIconToggleButtonToolboxItem, vrui::coSliderMenuItem, vrui::coSliderToolboxItem, vrui::coSubMenuItem, vrui::coToolboxMenuItem, vrui::coRowMenuItem, and vrui::coSubMenuToolboxItem.
|
inlinevirtual |
sets the attachment border
Reimplemented in vrui::coSubMenuItem, vrui::coSubMenuToolboxItem, vrui::coIconSubMenuToolboxItem, and vrui::coLabelSubMenuToolboxItem.
|
virtual |
this function may be overloaded - it is called by setName()
Reimplemented in vrui::coSliderToolboxItem, vrui::coLabelSubMenuToolboxItem, and vrui::coRowMenuItem.
|
virtual |
Set a new menu listener to receive menu item events.
void vrui::coMenuItem::setName | ( | const std::string & | newName, |
bool | updateTwins = true |
||
) |
set my name - items with labels must call this when changing label
|
virtual |
Set the parent menu in which this menu item is listed.
|
virtual |
show or hide this menu item., just removes it from the scenegraph in the default implementation, should do something better in the real implementation
Reimplemented in vrui::coRowMenuItem.
|
protected |
flag if item is active
|
protected |
menu event listener, triggered
on menu selection
|
protected |
parent menu which contains
this menu item
|
protected |
name of the item (internal
symbolic name, or displayed as label)
|
protected |
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
|