Lines Matching defs:item
137 * DESCRIPTION: add a new menu item
164 GlutMenuItem *item;
168 item = gState.currentMenu->list;
169 while (item) {
171 free(item->label);
172 item->label = strdup(label);
173 item->isTrigger = false;
174 item->value = value;
178 item = item->next;
180 __glutWarning("Current menu has no %d item.", num);
191 GlutMenuItem *item;
195 item = gState.currentMenu->list;
196 while (item) {
198 free(item->label);
199 item->label = strdup(label);
200 item->isTrigger = true;
201 item->value = menu-1;
205 item = item->next;
207 __glutWarning("Current menu has no %d item.", num);
213 * DESCRIPTION: remove a menu item
218 GlutMenuItem *item, **prev;
223 item = gState.currentMenu->list;
225 while (item) {
229 /* Patch up menu's item list. */
230 *prev = item->next;
232 free(item->label);
233 delete item;
237 prev = &item->next;
238 item = item->next;
240 __glutWarning("Current menu has no %d item.", num);
275 GlutMenuItem *item = list;
276 while (item) {
278 if(item->isTrigger) {
280 bitem = new GlutBMenuItem(menuList[item->value]->CreateBMenu(false));
281 bitem->SetLabel(item->label);
285 bitem = new GlutBMenuItem(item->label);
287 bitem->value = item->value;
290 item = item->next;
315 * DESCRIPTION: construct the new menu item and add to parent