menus(3X) SDK R4.11 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
---------------------------------------------
currentitem menu_item_current(3X)
freeitem menu_item_new(3X)
freemenu menu_new(3X)
itemcount menu_items(3X)
itemdescription menu_item_name(3X)
itemindex menu_item_current(3X)
iteminit menu_hook(3X)
itemname menu_item_name(3X)
itemopts menu_item_opts(3X)
itemoptsoff menu_item_opts(3X)
itemoptson menu_item_opts(3X)
itemterm menu_hook(3X)
itemuserptr menu_item_userptr(3X)
itemvalue menu_item_value(3X)
itemvisible menu_item_visible(3X)
menuback menu_attributes(3X)
menudriver menu_driver(3X)
menufore menu_attributes(3X)
menuformat menu_format(3X)
menugrey menu_attributes(3X)
menuinit menu_hook(3X)
menuitems menu_items(3X)
menumark menu_mark(3X)
menuopts menu_opts(3X)
menuoptsoff menu_opts(3X)
menuoptson menu_opts(3X)
menupad menu_attributes(3X)
menupattern menu_pattern(3X)
menusub menu_win(3X)
menuterm menu_hook(3X)
menuuserptr menu_userptr(3X)
menuwin menu_win(3X)
newitem menu_item_new(3X)
newmenu menu_new(3X)
posmenucursor menu_cursor(3X)
postmenu menu_post(3X)
scalemenu menu_win(3X)
setcurrentitem menu_item_current(3X)
setiteminit menu_hook(3X)
setitemopts menu_item_opts(3X)
setitemterm menu_hook(3X)
setitemuserptr menu_item_userptr(3X)
setitemvalue menu_item_value(3X)
setmenuback menu_attributes(3X)
setmenufore menu_attributes(3X)
setmenuformat menu_format(3X)
setmenugrey menu_attributes(3X)
setmenuinit menu_hook(3X)
setmenuitems menu_items(3X)
setmenumark menu_mark(3X)
setmenuopts menu_opts(3X)
setmenupad menu_attributes(3X)
setmenupattern menu_pattern(3X)
setmenusub menu_win(3X)
setmenuterm menu_hook(3X)
setmenuuserptr menu_userptr(3X)
setmenuwin menu_win(3X)
settoprow menu_item_current(3X)
toprow menu_item_current(3X)
unpostmenu menu_post(3X)
RETURN VALUE
Routines that return pointers always return NULL on error. Routines
that return an integer return one of the following:
EOK - The routine returned successfully.
ESYSTEMERROR - System error.
EBADARGUMENT - An incorrect argument was passed to the
routine.
EPOSTED - The menu is already posted.
ECONNECTED - One or more items are already connected
to another menu.
EBADSTATE - The routine was called from an
initialization or termination function.
ENOROOM - The menu does not fit within its subwindow.
ENOTPOSTED - The menu has not been posted.
EUNKNOWNCOMMAND - An unknown request was passed to the menu
driver.
ENOMATCH - The character failed to match.
ENOTSELECTABLE - The item cannot be selected.
ENOTCONNECTED - No items are connected to the menu.
EREQUESTDENIED - 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.
Licensed material--property of copyright holder(s)