Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

GlutMenu Class Reference
[GLUT Master]

GLUT Menu Class. More...

#include <menu.h>

List of all members.

Public Methods

 GlutMenu (int button=GLUT_LEFT_BUTTON)
 Constructor.

 ~GlutMenu ()
 Destructor.

void addEntry (const std::string &name, int value=-1)
 Add a menu entry with a menu event ID.

GlutMenu & subMenu ()
 Create a sub-menu.

void addEntry (const std::string &name, GlutMenu &menu)
 Add a sub-menu.

void reset ()
 Clear the contents of the menu.

void attach ()
 Bind the menu to the mouse button.

void detach ()
 Dettach the menu from the mouse button.


Protected Methods

void resetList ()
 Free all resources.


Protected Attributes

int _button
 Mouse button to attach/detach.

int _menuID
 GLUT menu ID.

std::list< GlutMenu * > _subMenu
 List of child menus.


Detailed Description

GLUT Menu Class.

Note:
GLUT menu handles are managed automatically by this wrapper.

Definition at line 51 of file menu.h.


Constructor & Destructor Documentation

GlutMenu::GlutMenu int    button = GLUT_LEFT_BUTTON
 

Constructor.

Parameters:
button  Optional mouse-button to bind to.
GLUT_LEFT_BUTTON, GLUT_MIDDLE_BUTTON or GLUT_RIGHT_BUTTON

Definition at line 11 of file menu.cpp.

Referenced by subMenu().


Member Function Documentation

GlutMenu & GlutMenu::subMenu  
 

Create a sub-menu.

Note:
Submenus are deleted when the parent menu is destroyed

Definition at line 22 of file menu.cpp.

References _button, _subMenu, and GlutMenu().


The documentation for this class was generated from the following files:
Generated on Tue Nov 5 11:11:47 2002 for GLT by doxygen1.2.18