| MENUS(3) | Library Functions Manual | MENUS(3) |
menus — menu
library
Curses Menu Library (libmenu, -lmenu)
#include
<menu.h>
The menus library provides a terminal
independent menu system using the
curses(3) library. Before
using the menus functions the terminal must be set
up by curses(3) using the
initscr()
function or similar. Programs using menus functions
must be linked with the
curses(3) library.
The menus library provides facilities for
defining menu items, placing a menu on the terminal screen, assign pre- and
post-change operations and setting the attributes of both the menu and its
items.
The menus library allows any settable
attribute or option of both the menu and item objects to be defined such
that any new menu or item automatically inherits the value as default.
Setting the default value will not affect any item or menu that has already
been created but will be applied to subsequent objects. To set the default
attribute or option the set routine is passed a NULL pointer in the item or
menu parameter when calling the set routine. The current default value can
be retrieved by calling the get routine with a NULL pointer for the item or
menu parameter.
Any function returning a string pointer will return NULL if an error occurs. Functions returning an integer will return one of the following:
E_OKE_SYSTEM_ERRORE_BAD_ARGUMENTE_POSTEDE_CONNECTEDE_BAD_STATEE_NO_ROOME_NOT_POSTEDE_UNKNOWN_COMMANDE_NO_MATCHE_NOT_SELECTABLEE_NOT_CONNECTEDE_REQUEST_DENIEDcurses(3), menu_attributes(3), menu_cursor(3), menu_driver(3), menu_format(3), menu_hook(3), menu_item_current(3), menu_item_name(3), menu_item_new(3), menu_item_opts(3), menu_item_userptr(3), menu_item_value(3), menu_item_visible(3), menu_items(3), menu_mark(3), menu_new(3), menu_opts(3), menu_pattern(3), menu_post(3), menu_userptr(3), menu_win(3)
This implementation of the menus library does depart in behaviour subtly from the original AT & T implementation. Some of the more notable departures are:
The option O_RADIO and the function
item_selected()
are NetBSD extensions and must not be used in
portable code.
| September 10, 1999 | NetBSD 11.0 |