|Skip Navigation Links|
|Exit Print View|
|man pages section 3: Curses Library Functions Oracle Solaris 11 Express 11/10|
- character based menus package
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.
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 new_item() will have the new default attribute value. The attributes of previously created items are not changed if a current default attribute value is changed.
The following table lists each menus routine and the name of the manual page on which it is described.
Routines that return pointers always return NULL on error. Routines that return an integer return one of the following:
The routine returned successfully.
An incorrect argument was passed to the routine.
The menu is already posted.
One or more items are already connected to another menu.
The routine was called from an initialization or termination function.
The menu does not fit within its subwindow.
The menu has not been posted.
An unknown request was passed to the menu driver.
The character failed to match.
The item cannot be selected.
No items are connected to the menu.
The menu driver could not process the request.
See attributes(5) for descriptions of the following attributes:
The header <menu.h> automatically includes the headers <eti.h> and <curses.h>.