menus(3X) UNIX System V menus(3X)
NAME
menus - character based menus package
SYNOPSIS
#include <menu.h>
DESCRIPTION
The menu library is built using the curses library, and any program using
menus routines must call one of the curses initialization routines, such
as initscr. A program using these routines must be compiled with -lmenu
and -lcurses on the cc command line.
The menus package gives the applications programmer a terminal-
independent method of creating and customizing menus for user
interaction. The menus package includes: item routines, which are used
to create and customize menu items; and menu routines, which are used to
create and customize menus, assign pre- and post-processing routines, and
display and interact with menus.
Current Default Values for Item Attributes
The menus package establishes initial current default values for item
attributes. During item initialization, each item attribute is assigned
the current default value for that attribute. An application can change
or retrieve a current default attribute value by calling the appropriate
set or retrieve routine with a NULL item pointer. If an application
changes a current default item attribute value, subsequent items created
using newitem will have the new default attribute value. (The
attributes of previously created items are not changed if a current
default attribute value is changed.)
Routine Name Index
The following table lists each menus routine and the name of the manual
page on which it is described.
menus Routine Name Manual Page Name
____________________________________________
current_item menuitemcurrent(3X)
free_item menuitemnew(3X)
free_menu menunew(3X)
item_count menuitems(3X)
item_description menuitemname(3X)
item_index menuitemcurrent(3X)
item_init menuhook(3X)
item_name menuitemname(3X)
item_opts menuitemopts(3X)
item_opts_off menuitemopts(3X)
item_opts_on menuitemopts(3X)
item_term menuhook(3X)
item_userptr menuitemuserptr(3X)
item_value menuitemvalue(3X)
item_visible menuitemvisible(3X)
menu_back menuattributes(3X)
menu_driver menudriver(3X)
10/89 Page 1
menus(3X) UNIX System V menus(3X)
menus Routine Name Manual Page Name
____________________________________________
menu_fore menuattributes(3X)
menu_format menuformat(3X)
menu_grey menuattributes(3X)
menu_init menuhook(3X)
menu_items menuitems(3X)
menu_mark menumark(3X)
menu_opts menuopts(3X)
menu_opts_off menuopts(3X)
menu_opts_on menuopts(3X)
menu_pad menuattributes(3X)
menu_pattern menupattern(3X)
menu_sub menuwin(3X)
menu_term menuhook(3X)
menu_userptr menuuserptr(3X)
menu_win menuwin(3X)
new_item menuitemnew(3X)
new_menu menunew(3X)
pos_menu_cursor menucursor(3X)
post_menu menupost(3X)
scale_menu menuwin(3X)
set_current_item menuitemcurrent(3X)
set_item_init menuhook(3X)
set_item_opts menuitemopts(3X)
set_item_term menuhook(3X)
set_item_userptr menuitemuserptr(3X)
set_item_value menuitemvalue(3X)
set_menu_back menuattributes(3X)
set_menu_fore menuattributes(3X)
set_menu_format menuformat(3X)
set_menu_grey menuattributes(3X)
set_menu_init menuhook(3X)
set_menu_items menuitems(3X)
set_menu_mark menumark(3X)
set_menu_opts menuopts(3X)
set_menu_pad menuattributes(3X)
set_menu_pattern menupattern(3X)
set_menu_sub menuwin(3X)
set_menu_term menuhook(3X)
set_menu_userptr menuuserptr(3X)
set_menu_win menuwin(3X)
set_top_row menuitemcurrent(3X)
top_row menuitemcurrent(3X)
unpost_menu menupost(3X)
RETURN VALUE
Routines that return pointers always return NULL on error. Routines that
return an integer return one of the following:
E_OK - The routine returned successfully.
E_SYSTEM_ERROR - System error.
Page 2 10/89
menus(3X) UNIX System V menus(3X)
E_BAD_ARGUMENT - An incorrect argument was passed to the
routine.
E_POSTED - The menu is already posted.
E_CONNECTED - One or more items are already connected
to another menu.
E_BAD_STATE - The routine was called from an
initialization or termination function.
E_NO_ROOM - The menu does not fit within its subwindow.
E_NOT_POSTED - The menu has not been posted.
E_UNKNOWN_COMMAND - An unknown request was passed to the menu
driver.
E_NO_MATCH - The character failed to match.
E_NOT_SELECTABLE - The 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 <eti.h>
and <curses.h>.
SEE ALSO
curses(3X), and 3X pages whose names begin "menu" for detailed routine
descriptions.
10/89 Page 3