menu_driver(3X) DG/UX 5.4.2 menu_driver(3X)
NAME
menudriver - command processor for the menus subsystem
SYNOPSIS
#include <menu.h>
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 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 ENOMATCH. If the character is not
recognized, the menu driver assumes it is an application-defined
command and returns EUNKNOWNCOMMAND.
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.
REQLASTITEM Move to the last item.
REQNEXTITEM Move to the next item.
REQPREVITEM Move to the previous item.
REQTOGGLEITEM Select/de-select an item.
REQCLEARPATTERN Clear the menu pattern buffer.
REQBACKPATTERN Delete the previous character from pattern buffer.
REQNEXTMATCH Move the next matching item.
REQPREVMATCH Move to the previous matching item.
RETURN VALUE
menudriver returns one of the following:
EOK - The routine returned successfully.
ESYSTEMERROR - System error.
EBADARGUMENT - An incorrect argument was passed to the routine.
EBADSTATE - The routine was called from an initialization or
termination function.
ENOTPOSTED - The menu has not been posted.
EUNKNOWNCOMMAND - An unknown request was passed to the menu
driver.
ENOMATCH - The character failed to match.
ENOTSELECTABLE - The item cannot be selected.
EREQUESTDENIED - The menu driver could not process the request.
NOTES
Application defined commands should be defined relative to (greater
Licensed material--property of copyright holder(s) 1
menu_driver(3X) DG/UX 5.4.2 menu_driver(3X)
than) MAXCOMMAND, the maximum value of a request listed above.
The header file <menu.h> automatically includes the header files
<eti.h> and <curses.h>.
SEE ALSO
curses(3X), menus(3X).
Licensed material--property of copyright holder(s) 2