menus - character based menus package
#include <menu.h>
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.
Menus Routine Name | Manual Page Name |
current_item | menu_item_current(3X) |
free_item | |
free_menu | |
item_count | |
item_description | |
item_index | |
item_init | |
item_name | |
item_opts | |
item_opts_off | |
item_opts_on | |
item_term | |
item_userptr | |
item_value | |
item_visible | |
menu_back | |
menu_driver | |
menu_fore | |
menu_format | |
menu_grey | |
menu_init | |
menu_items | |
menu_mark | |
menu_opts | |
menu_opts_off | |
menu_opts_on | |
menu_pad | |
menu_pattern | |
menu_sub | |
menu_term | |
menu_userptr | |
menu_win | |
new_item | |
new_menu | |
pos_menu_cursor | |
post_menu | |
scale_menu | |
set_current_item | |
set_item_init | |
set_item_opts | |
set_item_term | |
set_item_userptr | |
set_item_value | |
set_menu_back | |
set_menu_fore | |
set_menu_format | |
set_menu_grey | |
set_menu_init | |
set_menu_items | |
set_menu_mark | |
set_menu_opts | |
set_menu_pad | |
set_menu_pattern | |
set_menu_sub | |
set_menu_term | |
set_menu_userptr | |
set_menu_win | |
set_top_row | |
top_row | |
unpost_menu |
Routines that return pointers always return NULL on error. Routines that return an integer return one of the following:
E_OK
E_SYSTEM_ERROR
E_BAD_ARGUMENT
E_POSTED
E_CONNECTED
E_BAD_STATE
E_NO_ROOM
E_NOT_POSTED
E_UNKNOWN_COMMAND
E_NO_MATCH
E_NOT_SELECTABLE
E_NOT_CONNECTED
E_REQUEST_DENIED
See attributes(5) for descriptions of the following attributes:
|
curses(3CURSES), attributes(5)
The header <menu.h> automatically includes the headers <eti.h> and <curses.h>.
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |