Lines Matching defs:menu

10  *	DESCRIPTION:	code for popup menu handling
31 * DESCRIPTION: helper function to get a new menu slot
44 * DESCRIPTION: helper function to get a new menu slot
70 * DESCRIPTION: create a new menu
75 GlutMenu *menu;
79 menu = new GlutMenu(menuid, selectFunc); // constructor sets up members
80 menuList[menuid] = menu;
81 gState.currentMenu = menu;
89 * DESCRIPTION: set and get the current menu
104 GlutMenu *menu;
107 __glutWarning("glutSetMenu attempted on bogus menu.");
110 menu = menuList[menuid - 1];
111 if (!menu) {
112 __glutWarning("glutSetMenu attempted on bogus menu.");
115 gState.currentMenu = menu;
121 * DESCRIPTION: destroy the specified menu
126 GlutMenu *menu = __glutGetMenuByNum(menunum);
128 if (gState.currentMenu == menu) {
131 delete menu;
137 * DESCRIPTION: add a new menu item
151 glutAddSubMenu(const char *label, int menu)
153 new GlutMenuItem(gState.currentMenu, true, menu-1, label);
159 * DESCRIPTION: change menuitem into a menu entry
180 __glutWarning("Current menu has no %d item.", num);
189 glutChangeToSubMenu(int num, const char *label, int menu)
201 item->value = menu-1;
207 __glutWarning("Current menu has no %d item.", num);
213 * DESCRIPTION: remove a menu item
229 /* Patch up menu's item list. */
240 __glutWarning("Current menu has no %d item.", num);
247 * DESCRIPTION: attach and detach menu from view
252 gState.currentWindow->menu[button] = gState.currentMenu->id + 1;
258 gState.currentWindow->menu[button] = 0;
266 * DESCRIPTION: construct a BPopupMenu for this menu
282 bitem->menu = 0; // real menu items start at 1
286 bitem->menu = id + 1;
300 * DESCRIPTION: destroy the menu and its items (but not submenus!)
315 * DESCRIPTION: construct the new menu item and add to parent
319 menu = n_menu;
323 next = menu->list;
324 menu->list = this;
325 menu->num++;