OpenCOVER
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vrui::coRowMenu Class Reference

#include <coRowMenu.h>

Inheritance diagram for vrui::coRowMenu:
Inheritance graph
[legend]
Collaboration diagram for vrui::coRowMenu:
Collaboration graph
[legend]

Public Member Functions

 coRowMenu (const char *title, coMenu *=0, int maxItems=0, bool inScene=false)
 
virtual ~coRowMenu ()
 
virtual void add (coMenuItem *item)
 
virtual void insert (coMenuItem *item, int position)
 
virtual void remove (coMenuItem *item)
 
virtual int hit (vruiHit *hit)
 
virtual void miss ()
 
virtual void selected (bool select)
 Menu is selected via joystick. More...
 
virtual void makeVisible (coMenuItem *item)
 makes the item visible for joystick interaction More...
 
virtual void setTransformMatrix (vruiMatrix *matrix)
 
virtual void setTransformMatrix (vruiMatrix *matrix, float scalefactor)
 
vruiTransformNodegetDCS ()
 Get Transformation Node. More...
 
bool update ()
 
virtual coUIElementgetUIElement ()
 
virtual void setVisible (bool visible)
 
virtual void setScale (float scale)
 Sets the menu size by applying a scaling factor to the default size. More...
 
virtual float getScale () const
 Gets the current scaling factor. More...
 
void show ()
 makes the menu visible More...
 
void hide ()
 hides 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...
 
virtual void updateTitle (const char *newTitle)
 update the Title bar More...
 
virtual int getMaxItems ()
 
virtual int getStartPos ()
 
- Public Member Functions inherited from vrui::coMenu
 coMenu (coMenu *parentMenu, const std::string &name)
 
virtual ~coMenu ()
 Sets the matrix which defines location and orientation. More...
 
virtual void setMenuListener (coMenuFocusListener *listener)
 
virtual void setMenuChangeListener (coMenuChangeListener *listener)
 
virtual void positionAllSubmenus ()
 reposition all submenus, for example after the main menu was repositioned with setTransform matrix More...
 
virtual void removeAll ()
 
virtual int getItemCount () const
 
virtual void closeMenu ()
 
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 bool isInteractionActive () const
 
coCombinedButtonInteractiongetInteraction () const
 
coCombinedButtonInteractiongetMoveInteraction () const
 
void setShowMode (int mode)
 
int getShowMode () const
 
virtual void setSubMenuItem (coGenericSubMenuItem *item)
 
coGenericSubMenuItemgetSubMenuItem ()
 
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...
 
void itemRenamed (coMenuItem *item)
 this menu item changed - if it's one of mine, alert the menuChangeListenet 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
 
- Public Member Functions inherited from vrui::coAction
 coAction ()
 Constructor. More...
 
virtual ~coAction ()
 Destructor. 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 ()
 Destructor. More...
 
- Public Member Functions inherited from vrui::coButtonActor
virtual ~coButtonActor ()
 
- Public Member Functions inherited from vrui::coMenuListener
virtual ~coMenuListener ()
 
virtual void menuPressEvent (coMenuItem *menuItem)
 
virtual void menuReleaseEvent (coMenuItem *menuItem)
 

Protected Member Functions

virtual void buttonEvent (coButton *source)
 

Protected Attributes

coRowContaineritemsContainer
 menu items (anything below title bar) More...
 
coFrameitemsFrame
 all menu items are framed by this frame More...
 
coRowMenuHandlehandle
 the titlebar More...
 
coGenericSubMenuItemmyMenuItem
 parent submenu, NULL if this is the topmost menu 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...
 
coMenuChangeListenerchangeListener
 menu event listeners, triggered on menu changes 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_
 
- Protected Attributes inherited from vrui::coAction
std::string actionName
 

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

This class provides a simple menu for use in 3D space. The MenuItems are layed out in a row. It has a title bar (coMenuHandle) that shows the menu's name and can be used to reposition and scale the menu. There are buttons in the Menu to show, hide and close the menu.

Constructor & Destructor Documentation

vrui::coRowMenu::coRowMenu ( const char *  title,
coMenu = 0,
int  maxItems = 0,
bool  inScene = false 
)
virtual vrui::coRowMenu::~coRowMenu ( )
virtual

Member Function Documentation

virtual void vrui::coRowMenu::add ( coMenuItem item)
virtual

Reimplemented from vrui::coMenu.

virtual void vrui::coRowMenu::buttonEvent ( coButton source)
protectedvirtual

Implements vrui::coButtonActor.

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

get the Element's classname

Reimplemented from vrui::coMenu.

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

Get Transformation Node.

Implements vrui::coMenu.

virtual int vrui::coRowMenu::getMaxItems ( )
inlinevirtual
virtual float vrui::coRowMenu::getScale ( ) const
virtual

Gets the current scaling factor.

Implements vrui::coMenu.

virtual int vrui::coRowMenu::getStartPos ( )
inlinevirtual
virtual coUIElement* vrui::coRowMenu::getUIElement ( )
virtual

Reimplemented from vrui::coMenu.

void vrui::coRowMenu::hide ( )
virtual

hides this menu

Implements vrui::coMenu.

virtual int vrui::coRowMenu::hit ( vruiHit hit)
virtual

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

Reimplemented from vrui::coMenu.

virtual void vrui::coRowMenu::insert ( coMenuItem item,
int  position 
)
virtual

Reimplemented from vrui::coMenu.

virtual bool vrui::coRowMenu::isOfClassName ( const char *  ) const
virtual

check if the Element or any ancestor is this classname

Reimplemented from vrui::coMenu.

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

makes the item visible for joystick interaction

Reimplemented from vrui::coMenu.

virtual void vrui::coRowMenu::miss ( )
virtual

miss is called once after a hit, if the node is not intersected anymore

Reimplemented from vrui::coMenu.

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

Reimplemented from vrui::coMenu.

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

Menu is selected via joystick.

Reimplemented from vrui::coMenu.

virtual void vrui::coRowMenu::setScale ( float  scale)
virtual

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

Implements vrui::coMenu.

virtual void vrui::coRowMenu::setTransformMatrix ( vruiMatrix matrix)
virtual

Implements vrui::coMenu.

virtual void vrui::coRowMenu::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.

virtual void vrui::coRowMenu::setVisible ( bool  visible)
virtual

Reimplemented from vrui::coMenu.

void vrui::coRowMenu::show ( )
virtual

makes the menu visible

Implements vrui::coMenu.

bool vrui::coRowMenu::update ( )
virtual

this method is called once per frame as long as it returns true. as soon as it returns false, it is removed from the update manager and not called again. the update method is called prior to preFrame();

Implements vrui::coUpdateable.

virtual void vrui::coRowMenu::updateTitle ( const char *  newTitle)
virtual

update the Title bar

Member Data Documentation

coRowMenuHandle* vrui::coRowMenu::handle
protected

the titlebar

coRowContainer* vrui::coRowMenu::itemsContainer
protected

menu items (anything below title bar)

coFrame* vrui::coRowMenu::itemsFrame
protected

all menu items are framed by this frame

coGenericSubMenuItem* vrui::coRowMenu::myMenuItem
protected

parent submenu, NULL if this is the topmost menu


The documentation for this class was generated from the following file: