Curses Library Functions menudriver(3CURSES)
NAME
menudriver - command processor for the menus subsystem
SYNOPSIS
cc [ flag... ] file... -lmenu -lcurses [ library... ]
#include
int menudriver(MENU *menu, int c);
DESCRIPTION
menudriver() 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 print-
able ASCI 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 pat-
tern buffer and returns ENOMATCH. If the character is not
recognized, the menu driver assumes it is an application-
defined command and returns EUNKNOWNCOMAND.
Menu driver requests:
REQLEFTITEM Move left to an item.
REQRIGHTITEM Move right to an item
REQUPITEM Move up to an item.
REQDOWNITEM Move down to an item.
REQSCRULINE Scroll up a line.
REQSCRDLINE Scroll down a line.
REQSCRDPAGE Scroll up a page.
REQSCRUPAGE Scroll down a page.
REQFIRSTITEM Move to the first item.
SunOS 5.11 Last change: 31 Dec 1996 1
Curses Library Functions menudriver(3CURSES)
REQLASTITEM Move to the last item.
REQNEXTITEM Move to the next item.
REQPREVITEM Move to the previous item.
REQTOGLEITEM Select/de-select an item.
REQCLEARPATERN Clear the menu pattern buffer.
REQBACKPATERN Delete the previous character from pat-
tern buffer.
REQNEXTMATCH Move the next matching item.
REQPREVMATCH Move to the previous matching item.
RETURN VALUES
menudriver() returns one of the following:
EOK The routine returned successfully.
ESYSTEMEROR System error.
EBADARGUMENT An incorrect argument was passed to the
routine.
EBADSTATE The routine was called from an initial-
ization or termination function.
ENOTPOSTED The menu has not been posted.
EUNKNOWNCOMAND An unknown request was passed to the
menu driver.
ENOMATCH The character failed to match.
SunOS 5.11 Last change: 31 Dec 1996 2
Curses Library Functions menudriver(3CURSES)
ENOTSELECTABLE The item cannot be selected.
EREQUESTDENIED The menu driver could not process the
request.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
MT-Level Unsafe
SEE ALSO
curses(3CURSES), menus(3CURSES), attributes(5)
NOTES
Application-defined commands should be defined relative to
(greater than) MAXCOMAND, the maximum value of a request
listed above.
The header automatically includes the headers
and .
SunOS 5.11 Last change: 31 Dec 1996 3
|