'\"!  tbl | mmdoc
'\"macro stdmacro
.if n .pH g3x.menus @(#)menus	40.3 of 12/15/89
.\" Copyright 1989 AT&T
.\" ident	"@(#)svid_ti:ti_env/menus	1.9"
.ds S ETI
.nr X
.if \nX=0 .ds x} menus 3X "" "\&"
.if \nX=1 .ds x} menus 3X ""
.if \nX=2 .ds x} menus 3X "" "\&"
.if \nX=3 .ds x} menus "" "" "\&"
.TH \*(x}
.SH NAME
\f4menus\fP \- character based menus package
.SH SYNOPSIS
\f4#include <menu.h>\f1
.SH DESCRIPTION
The \f4menu\f1 library is built using the \f4curses\f1
library, and any program using \f4menus\fP routines must
call one of the \f4curses\fP initialization routines, such as \f4initscr\f1.
A program using these routines must be compiled with
\f4\-lmenu\f1 and \f4\-lcurses\f1 on the \f4cc\f1 command line.
.PP
The \f4menus\fP package gives the applications programmer a terminal-independent
method of creating and customizing menus for user interaction.
The \f4menus\fP 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.
.SS Current Default Values for Item Attributes
The \f4menus\fP 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 \f4NULL\fP
item pointer.
If an application changes a current default item attribute value,
subsequent items created using \f4new_item\fP will have the new
default attribute value.
(The attributes of previously created items are not changed if a
current default attribute value is changed.)
.SS Routine Name Index
The following table lists each \f4menus\fP routine and the name of the
manual page on which it is described.
.TS H
lfHB lfHB
lfCWw(2i) lw(2i).
\f4menus\fP Routine Name	Manual Page Name
.sp 0.5
_
.TH
current_item	menu_item_current(3X)
free_item	menu_item_new(3X)
free_menu	menu_new(3X)
item_count	menu_items(3X)
item_description	menu_item_name(3X)
item_index	menu_item_current(3X)
item_init	menu_hook(3X)
item_name	menu_item_name(3X)
item_opts	menu_item_opts(3X)
item_opts_off	menu_item_opts(3X)
item_opts_on	menu_item_opts(3X)
item_term	menu_hook(3X)
item_userptr	menu_item_userptr(3X)
item_value	menu_item_value(3X)
item_visible	menu_item_visible(3X)
menu_back	menu_attributes(3X)
menu_driver	menu_driver(3X)
menu_fore	menu_attributes(3X)
menu_format	menu_format(3X)
menu_grey	menu_attributes(3X)
menu_init	menu_hook(3X)
menu_items	menu_items(3X)
menu_mark	menu_mark(3X)
menu_opts	menu_opts(3X)
menu_opts_off	menu_opts(3X)
menu_opts_on	menu_opts(3X)
menu_pad	menu_attributes(3X)
menu_pattern	menu_pattern(3X)
menu_sub	menu_win(3X)
menu_term	menu_hook(3X)
menu_userptr	menu_userptr(3X)
menu_win	menu_win(3X)
new_item	menu_item_new(3X)
new_menu	menu_new(3X)
pos_menu_cursor	menu_cursor(3X)
post_menu	menu_post(3X)
scale_menu	menu_win(3X)
set_current_item	menu_item_current(3X)
set_item_init	menu_hook(3X)
set_item_opts	menu_item_opts(3X)
set_item_term	menu_hook(3X)
set_item_userptr	menu_item_userptr(3X)
set_item_value	menu_item_value(3X)
set_menu_back	menu_attributes(3X)
set_menu_fore	menu_attributes(3X)
set_menu_format	menu_format(3X)
set_menu_grey	menu_attributes(3X)
set_menu_init	menu_hook(3X)
set_menu_items	menu_items(3X)
set_menu_mark	menu_mark(3X)
set_menu_opts	menu_opts(3X)
set_menu_pad	menu_attributes(3X)
set_menu_pattern	menu_pattern(3X)
set_menu_sub	menu_win(3X)
set_menu_term	menu_hook(3X)
set_menu_userptr	menu_userptr(3X)
set_menu_win	menu_win(3X)
set_top_row	menu_item_current(3X)
top_row	menu_item_current(3X)
unpost_menu	menu_post(3X)
.TE
.SH RETURN VALUE
Routines that return pointers always return \f4NULL\fP on error.
Routines that return an integer return one of the following:
.TS
lfCWw(1.25i)1 c1 l .
E_OK	\-	The routine returned successfully.
E_SYSTEM_ERROR	\-	System error.
E_BAD_ARGUMENT	\-	T{
An incorrect argument was passed to the routine.
T}
E_POSTED	\-	The menu is already posted.
E_CONNECTED	\-	One or more items are already connected
		to another menu.
E_BAD_STATE	\-	T{
The routine was called from an initialization or termination function.
T}
E_NO_ROOM	\-	The menu does not fit within its subwindow.
E_NOT_POSTED	\-	The menu has not been posted.
E_UNKNOWN_COMMAND	\-	T{
An unknown request was passed to the menu driver.
T}
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	\-	T{
The menu driver could not process the request.
T}
.TE
.SH NOTES
.PP
The header file \f4<menu.h>\fP automatically includes the header files
\f4<eti.h>\fP and \f4<curses.h>\fP.
.SH SEE ALSO
\f4curses\fP(3X), and 3X pages whose names begin "menu_" for
detailed routine descriptions.
