Overview | All Modules | Tutorial | User's Guide | Programming Guide
Previous

COVISE Online Documentation

Next

Public Member Functions | Protected Attributes | List of all members
vrui::coToolboxMenu Class Reference

A Toolbox Menu contains Toolbox Menu Item and offers different organization modes (horizontal or vertical) The Handle, Items and submenus are organized respectively to this setting. More...

#include <coToolboxMenu.h>

Inheritance diagram for vrui::coToolboxMenu:
vrui::coMenu vrui::coButtonActor vrui::coMenuListener vrui::coAction vrui::coUpdateable

Public Member Functions

 coToolboxMenu (const std::string &name="Toolbox", coMenu *parent=0, coRowContainer::Orientation orientation=coRowContainer::HORIZONTAL, int attachment=coUIElement::BOTTOM, int maxItems=0)
 handle More...
 
virtual ~coToolboxMenu ()
 
void add (coMenuItem *)
 Add a new menu item to this menu. More...
 
void insert (coMenuItem *, int)
 Insert a menu item into the linked menu item list. More...
 
void remove (coMenuItem *)
 Remove a menu item from the linked list. More...
 
void removeAll ()
 Remove all menu items from the linked list. More...
 
int getItemCount () const
 Return the number of menu items in the linked list. More...
 
virtual void setScale (float s)
 Sets the menu size by applying a scaling factor to the default size. More...
 
virtual float getScale () const
 Gets the current scaling factor. More...
 
virtual void setTransformMatrix (vruiMatrix *mat)
 
virtual void setTransformMatrix (vruiMatrix *mat, float scale)
 of the menu. More...
 
virtual void setVisible (bool newState)
 
vruiTransformNodegetDCS ()
 Get Transformation Node. More...
 
virtual coUIElementgetUIElement ()
 return the actual UI Element that represents this menu. More...
 
virtual void buttonEvent (coButton *)
 
bool update ()
 This function frequently updates the menu scale when activated. More...
 
void show ()
 makes the menu visible More...
 
void hide ()
 hides this menu More...
 
virtual void setAttachment (int)
 
virtual int getAttachment () const
 
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 fixPos (bool doFix)
 fix mmy menu's position More...
 
virtual void selected (bool select)
 Menu is selected via joystick. More...
 
virtual void makeVisible (coMenuItem *item)
 makes the item visible for joystick interaction More...
 
- Public Member Functions inherited from vrui::coMenu
 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 coUIElementgetUIElement ()
 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 vruiTransformNodegetDCS ()=0
 Get Transformation Node. More...
 
virtual bool isInteractionActive () const
 
coCombinedButtonInteractiongetInteraction () const
 
coCombinedButtonInteractiongetMoveInteraction () 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...
 
coGenericSubMenuItemgetSubMenuItem ()
 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 ()
 
coMenuItemgetItemByName (const char *name)
 
int index (const coMenuItem *item)
 
void setParent (coMenu *newParent)
 
const coMenugetParent ()
 
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...
 
- Public Member Functions inherited from vrui::coButtonActor
virtual ~coButtonActor ()
 
virtual void buttonEvent (coButton *button)=0
 
- Public Member Functions inherited from vrui::coMenuListener
virtual ~coMenuListener ()
 Action listener for events triggered by coMenuItem. More...
 
virtual void menuEvent (coMenuItem *menuItem)
 
virtual void menuPressEvent (coMenuItem *menuItem)
 
virtual void menuReleaseEvent (coMenuItem *menuItem)
 

Protected Attributes

coRowContaineritemsContainer
 menu items (anything below title bar) More...
 
coFrameitemsFrame
 
coToolboxMenuHandlehandle
 surrounding frame More...
 
- Protected Attributes inherited from vrui::coMenu
std::list< coMenuItem * > items
 list of menu items which can be accessed from this menu More...
 
coMenuparent
 parent menu, NULL if this is the topmost menu More...
 
coGenericSubMenuItemmyMenuItem
 
coMenuFocusListenerlistener
 menu event listener, triggered on menu selection More...
 
int showMode
 how to show and hide this Menu More...
 
bool visible
 
std::string name
 
coCombinedButtonInteractioninteraction
 
coCombinedButtonInteractionmoveInteraction
 
coCombinedButtonInteractionwheelInteraction
 interaction for preventing accidental global wheel interaction More...
 
float scale_
 
vruiMatrixmatrix_
 
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...
 

Additional Inherited Members

- Public Types inherited from vrui::coMenu
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 }
 

Detailed Description

A Toolbox Menu contains Toolbox Menu Item and offers different organization modes (horizontal or vertical) The Handle, Items and submenus are organized respectively to this setting.

Constructor & Destructor Documentation

◆ coToolboxMenu()

vrui::coToolboxMenu::coToolboxMenu ( const std::string &  name = "Toolbox",
coMenu parent = 0,
coRowContainer::Orientation  orientation = coRowContainer::HORIZONTAL,
int  attachment = coUIElement::BOTTOM,
int  maxItems = 0 
)

handle

◆ ~coToolboxMenu()

vrui::coToolboxMenu::~coToolboxMenu ( )
virtual

Member Function Documentation

◆ add()

void vrui::coToolboxMenu::add ( coMenuItem item)
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 from vrui::coMenu.

◆ buttonEvent()

virtual void vrui::coToolboxMenu::buttonEvent ( coButton )
inlinevirtual

Implements vrui::coButtonActor.

◆ fixPos()

void vrui::coToolboxMenu::fixPos ( bool  doFix)

fix mmy menu's position

◆ getAttachment()

int vrui::coToolboxMenu::getAttachment ( ) const
virtual

Reimplemented from vrui::coMenu.

◆ getClassName()

const char * vrui::coToolboxMenu::getClassName ( ) const
virtual

get the Element's classname

Reimplemented from vrui::coMenu.

◆ getDCS()

vruiTransformNode * vrui::coToolboxMenu::getDCS ( )
virtual

Get Transformation Node.

Implements vrui::coMenu.

◆ getItemCount()

int vrui::coToolboxMenu::getItemCount ( ) const
virtual

Return the number of menu items in the linked list.

Reimplemented from vrui::coMenu.

◆ getScale()

float vrui::coToolboxMenu::getScale ( ) const
virtual

Gets the current scaling factor.

Implements vrui::coMenu.

◆ getUIElement()

coUIElement * vrui::coToolboxMenu::getUIElement ( )
virtual

return the actual UI Element that represents this menu.

Reimplemented from vrui::coMenu.

◆ hide()

void vrui::coToolboxMenu::hide ( )
virtual

hides this menu

Implements vrui::coMenu.

◆ insert()

void vrui::coToolboxMenu::insert ( coMenuItem item,
int  pos 
)
virtual

Insert a menu item into the linked menu item list.

Parameters
itemmenu item to insert
posmenu item index before which to insert the new item

Reimplemented from vrui::coMenu.

◆ isOfClassName()

bool vrui::coToolboxMenu::isOfClassName ( const char *  classname) const
virtual

check if the Element or any ancestor is this classname

Reimplemented from vrui::coMenu.

◆ makeVisible()

void vrui::coToolboxMenu::makeVisible ( coMenuItem item)
virtual

makes the item visible for joystick interaction

scrolls to the correct Item

Reimplemented from vrui::coMenu.

◆ remove()

void vrui::coToolboxMenu::remove ( coMenuItem item)
virtual

Remove a menu item from the linked list.

Reimplemented from vrui::coMenu.

◆ removeAll()

void vrui::coToolboxMenu::removeAll ( )
virtual

Remove all menu items from the linked list.

Reimplemented from vrui::coMenu.

◆ selected()

void vrui::coToolboxMenu::selected ( bool  select)
virtual

Menu is selected via joystick.

select is called if the menu is selected via joystick highlight the handle

Reimplemented from vrui::coMenu.

◆ setAttachment()

void vrui::coToolboxMenu::setAttachment ( int  newatt)
virtual

Reimplemented from vrui::coMenu.

◆ setScale()

void vrui::coToolboxMenu::setScale ( float  s)
virtual

Sets the menu size by applying a scaling factor to the default size.

Implements vrui::coMenu.

◆ setTransformMatrix() [1/2]

void vrui::coToolboxMenu::setTransformMatrix ( vruiMatrix mat)
virtual

Implements vrui::coMenu.

◆ setTransformMatrix() [2/2]

void vrui::coToolboxMenu::setTransformMatrix ( vruiMatrix matrix,
float  scale 
)
virtual

of the menu.

Sets the matrix which defines location orientation and scale of the menu and the scale factor included in the matrix.

Implements vrui::coMenu.

◆ setVisible()

void vrui::coToolboxMenu::setVisible ( bool  newState)
virtual

Reimplemented from vrui::coMenu.

◆ show()

void vrui::coToolboxMenu::show ( )
virtual

makes the menu visible

Implements vrui::coMenu.

◆ update()

bool vrui::coToolboxMenu::update ( )
virtual

This function frequently updates the menu scale when activated.

Implements vrui::coUpdateable.

Member Data Documentation

◆ handle

coToolboxMenuHandle* vrui::coToolboxMenu::handle
protected

surrounding frame

◆ itemsContainer

coRowContainer* vrui::coToolboxMenu::itemsContainer
protected

menu items (anything below title bar)

◆ itemsFrame

coFrame* vrui::coToolboxMenu::itemsFrame
protected

The documentation for this class was generated from the following files:
PreviousNext

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