SYNOPSIS
#include <menu.h>
DESCRIPTION
The menus library provides terminal-independent facilities for composing menu systems on character-cell terminals. The library includes: item routines, which create and modify menu items; and menu routines, which group items into menus, display menus on the screen, and handle interaction with the user.
The menus library uses the curses libraries, and a curses
initialization routine such as
The menus library maintains a default value for item attributes. You can get or set this default by calling the appropriate get_ or set_ routine with a NULL item pointer. Changing this default with a set_ char affects future item creations, but does not change the rendering of items already created.
Routine Name Index
The following table lists each menu routine and the name of the manual page on which it is described.
curses Routine Name Manual Page Name ----------------------------------------- current_itemmitem_current() free_itemmitem_new() free_menumenu_new() item_countmenu_items() item_descriptionmitem_name() item_indexmitem_current() item_initmenu_hook() item_namemitem_name() item_optsmitem_opts() item_opts_offmitem_opts() item_opts_onmitem_opts() item_termmenu_hook() item_userptrmitem_userptr() item_valuemitem_value() item_visiblemitem_visible() menu_backmenu_attribs() menu_drivermenu_driver() menu_foremenu_attribs() menu_formatmenu_format() menu_greymenu_attribs() menu_initmenu_hook() menu_itemsmenu_items() menu_markmenu_mark() menu_optsmenu_opts() menu_opts_offmenu_opts() menu_opts_onmenu_opts() menu_padmenu_attribs() menu_patternmenu_pattern() menu_request_by_namemenu_requestname() menu_request_namemenu_requestname() menu_spacingmenu_spacing() menu_submenu_win() menu_termmenu_hook() menu_userptrmenu_userptr() menu_winmenu_win() new_itemmitem_new() new_menumenu_new() pos_menu_cursormenu_cursor() post_menumenu_post() scale_menumenu_win() set_current_itemmenu_current_item() set_item_initmenu_hook() set_item_optsmitem_opts() set_item_termmenu_hook() set_item_userptrmitem_userptr() set_item_valuemitem_value() set_menu_backmenu_attribs() set_menu_foremenu_attribs() set_menu_formatmenu_format() set_menu_greymenu_attribs() set_menu_initmenu_hook() set_menu_itemsmenu_items() set_menu_markmenu_mark() set_menu_optsmitem_opts() set_menu_padmenu_attribs() set_menu_patternmenu_pattern() set_menu_spacingmenu_spacing() set_menu_submenu_win() set_menu_termmenu_hook() set_menu_userptrmenu_userptr() set_menu_winmenu_win() set_top_rowmitem_current() top_rowmitem_current() unpost_menumenu_post()
RETURN VALUES
Routines that return pointers return NULL on error. Routines that return an integer return one of the following error codes:
- E_OK
-
The routine succeeded.
- E_SYSTEM_ERROR
-
System error occurred.
- E_BAD_ARGUMENT
-
Routine detected an incorrect or out-of-range argument.
- E_POSTED
-
The menu is already posted.
- E_BAD_STATE
-
Routine was called from an initialization or termination function.
- E_NO_ROOM
-
Menu is too large for its window.
- E_NOT_POSTED
-
The menu has not been posted.
- E_UNKNOWN_COMMAND
-
The menu driver code saw an unknown request code.
- E_NO_MATCH
-
Character failed to match.
- E_NOT_SELECTABLE
-
The designated item cannot be selected.
- E_NOT_CONNECTED
-
No items are connected to the menu.
- E_REQUEST_DENIED
-
The menu driver could not process the request.
NOTES
The header file <menu.h> automatically includes the header files <curses.h> and <eti.h>.
In your library list, libmenu.a should be before libncurses.a; that is, you want to say -lmenu -lncurses, not the other way around (which would give you a link error using GNU ld and many other linkers).
PORTABILITY
These routines emulate the System V menu library. They were not supported on Version 7 or BSD versions.
AUTHORS
Juergen Pfeifer. Manual pages and adaptation for ncurses by Eric S. Raymond.
AVAILABILITY
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
- Functions:
curses() ,menu_attribs() ,menu_cursor() ,menu_driver() ,menu_format() ,menu_hook() ,menu_items() ,menu_mark() ,menu_new() ,menu_opts() ,menu_pattern() ,menu_post() ,menu_requestname() ,menu_spacing() ,menu_userptr() ,menu_win()
PTC MKS Toolkit 10.5 Documentation Build 40.