2 .\" Copyright 1989 AT&T
3 .\" Portions Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved.
4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH MENU_DRIVER 3CURSES "Dec 31, 1996"
9 menu_driver \- command processor for the menus subsystem
13 \fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-lmenu\fR \fB -lcurses \fR [ \fIlibrary\fR... ]
16 \fBint\fR \fBmenu_driver\fR(\fBMENU *\fR\fImenu\fR, \fBint\fR \fIc\fR);
22 \fBmenu_driver()\fR is the workhorse of the \fBmenus\fR subsystem. It checks to
23 determine whether the character \fIc\fR is a menu request or data. If \fIc\fR
24 is a request, the menu driver executes the request and reports the result. If
25 \fIc\fR is data (a printable \fBASCII\fR character), it enters the data into
26 the pattern buffer and tries to find a matching item. If no match is found, the
27 menu driver deletes the character from the pattern buffer and returns
28 \fBE_NO_MATCH\fR. If the character is not recognized, the menu driver assumes
29 it is an application-defined command and returns \fBE_UNKNOWN_COMMAND\fR.
111 Move to the first item.
120 Move to the last item.
129 Move to the next item.
138 Move to the previous item.
144 \fBREQ_TOGGLE_ITEM\fR
147 Select/de-select an item.
153 \fBREQ_CLEAR_PATTERN\fR
156 Clear the menu pattern buffer.
162 \fBREQ_BACK_PATTERN\fR
165 Delete the previous character from pattern buffer.
174 Move the next matching item.
183 Move to the previous matching item.
189 \fBmenu_driver()\fR returns one of the following:
196 The routine returned successfully.
214 An incorrect argument was passed to the routine.
223 The routine was called from an initialization or termination function.
232 The menu has not been posted.
238 \fBE_UNKNOWN_COMMAND\fR
241 An unknown request was passed to the menu driver.
250 The character failed to match.
256 \fBE_NOT_SELECTABLE\fR
259 The item cannot be selected.
265 \fBE_REQUEST_DENIED\fR
268 The menu driver could not process the request.
274 See \fBattributes\fR(5) for descriptions of the following attributes:
282 ATTRIBUTE TYPE ATTRIBUTE VALUE
290 \fBcurses\fR(3CURSES), \fBmenus\fR(3CURSES), \fBattributes\fR(5)
294 Application-defined commands should be defined relative to (greater than)
295 \fBMAX_COMMAND\fR, the maximum value of a request listed above.
298 The header \fB<menu.h>\fR automatically includes the headers \fB<eti.h>\fR and