Home | History | Annotate | Download | only in include

Lines Matching refs:menu

42 #  include <menu.h>
46 // This wraps the ITEM type of <menu.h>
142 // user supplied driver for a menu; you may derive from this class and
144 // If an action returns true, the menu will be exited. The default action
190 void _nc_xx_mnu_init(MENU *);
191 void _nc_xx_mnu_term(MENU *);
192 void _nc_xx_itm_init(MENU *);
193 void _nc_xx_itm_term(MENU *);
198 // This wraps the MENU type of <menu.h>
204 MENU *menu;
209 bool b_framed; // has the menu a border?
210 bool b_autoDelete; // Delete items when deleting menu?
212 NCursesMenuItem** my_items; // The array of items for this menu
214 // This structure is used for the menu's user data field to link the
215 // MENU* to the C++ object and to provide extra space for a user pointer.
219 const MENU* m_owner;
222 // Get the backward pointer to the C++ object from a MENU
223 static inline NCursesMenu* getHook(const MENU *m) {
229 friend void _nc_xx_mnu_init(MENU *);
230 friend void _nc_xx_mnu_term(MENU *);
231 friend void _nc_xx_itm_init(MENU *);
232 friend void _nc_xx_itm_term(MENU *);
234 // Calculate ITEM* array for the menu
240 UserHook* uptr = STATIC_CAST(UserHook*)(::menu_userptr (menu));
241 assert (uptr != 0 && uptr->m_back==this && uptr->m_owner==menu);
246 UserHook* uptr = STATIC_CAST(UserHook*)(::menu_userptr (menu));
247 assert (uptr != 0 && uptr->m_back==this && uptr->m_owner==menu);
251 void InitMenu (NCursesMenuItem* menu[],
263 // 'Internal' constructor to create a menu without association to
270 menu (STATIC_CAST(MENU*)(0)),
280 // Make a full window size menu
285 menu(0),
295 // Make a menu with a window of this size.
304 menu(0),
325 menu(rhs.menu),
345 // Set these items for the menu
347 OnError(::set_menu_items(menu,mapItems(Items)));
350 // Remove the menu from the screen
352 OnError (::unpost_menu (menu));
355 // Post the menu to the screen if flag is true, unpost it otherwise
357 flag ? OnError (::post_menu(menu)) : OnError (::unpost_menu (menu));
360 // Get the numer of rows and columns for this menu
362 OnError (::scale_menu (menu, &mrows, &mcols));
365 // Set the format of this menu
367 OnError (::set_menu_format(menu, mrows, mcols));
370 // Get the format of this menu
372 ::menu_format(menu,&rows,&ncols);
375 // Items of the menu
380 // Get the number of items in this menu
382 return ::item_count(menu);
387 return my_items[::item_index(::current_item(menu))];
392 return ::menu_mark(menu);
397 OnError (::set_menu_mark (menu, marker));
407 return ::menu_pattern(menu);
413 // set the default attributes for the menu
419 return ::menu_back(menu);
424 return ::menu_fore(menu);
429 return ::menu_grey(menu);
434 return ::set_menu_back(menu,a);
439 return ::set_menu_fore(menu,a);
444 return ::set_menu_grey(menu,a);
448 OnError (::menu_opts_on (menu,opts));
452 OnError (::menu_opts_off(menu,opts));
456 return ::menu_opts(menu);
460 OnError (::set_menu_opts (menu,opts));
464 return ::menu_pad(menu);
468 OnError (::set_menu_pad (menu, padch));
473 OnError (::pos_menu_cursor (menu));
478 OnError (::set_current_item(menu, I.item));
481 // Get the current top row of the menu
483 return ::top_row (menu);
486 // Set the current top row of the menu
488 OnError (::set_top_row (menu, row));
492 // Set the spacing for the menu
496 OnError(::set_menu_spacing(menu,
502 // Get the spacing info for the menu
506 OnError(::menu_spacing(menu,
538 // Called after the menu gets repositioned in its window.
539 // This is especially true if the menu is posted.
542 // Called before the menu gets repositioned in its window.
543 // This is especially true if the menu is unposted.
553 // code c into a menu request code.
555 // mapping for the most common keystrokes and menu requests.
561 if ( (i < 0) || (i >= ::item_count (menu)) )
566 // Perform the menu's operation
568 // selection menu, or NULL for a multivalued menu.
592 // user data to an item of a menu. Its assumed that the user
621 // The same mechanism is used to attach user data to a menu
633 if (menu)
643 if (menu)
655 if (menu)
667 if (menu)