menu_driver - command processor for the menus subsystem
cc [ flag... ] file... -lmenu -lcurses [ library... ] #include <menu.h> int menu_driver(MENU *menu, int c);
menu_driver() is the workhorse of the menus subsystem. It checks to determine whether the character c is a menu request or data. If c is a request, the menu driver executes the request and reports the result. If c is data (a printable ASCII character), it enters the data into the pattern buffer and tries to find a matching item. If no match is found, the menu driver deletes the character from the pattern buffer and returns E_NO_MATCH. If the character is not recognized, the menu driver assumes it is an application-defined command and returns E_UNKNOWN_COMMAND.
Menu driver requests:
REQ_LEFT_ITEM
REQ_RIGHT_ITEM
REQ_UP_ITEM
REQ_DOWN_ITEM
REQ_SCR_ULINE
REQ_SCR_DLINE
REQ_SCR_DPAGE
REQ_SCR_UPAGE
REQ_FIRST_ITEM
REQ_LAST_ITEM
REQ_NEXT_ITEM
REQ_PREV_ITEM
REQ_TOGGLE_ITEM
REQ_CLEAR_PATTERN
REQ_BACK_PATTERN
REQ_NEXT_MATCH
REQ_PREV_MATCH
menu_driver() returns one of the following:
E_OK
E_SYSTEM_ERROR
E_BAD_ARGUMENT
E_BAD_STATE
E_NOT_POSTED
E_UNKNOWN_COMMAND
E_NO_MATCH
E_NOT_SELECTABLE
E_REQUEST_DENIED
See attributes(5) for descriptions of the following attributes:
|
curses(3CURSES), menus(3CURSES), attributes(5)
Application-defined commands should be defined relative to (greater than) MAX_COMMAND, the maximum value of a request listed above.
The header <menu.h> automatically includes the headers <eti.h> and <curses.h>.
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |