1 .\"***************************************************************************
2 .\" Copyright (c) 1998 Free Software Foundation, Inc. *
4 .\" Permission is hereby granted, free of charge, to any person obtaining a *
5 .\" copy of this software and associated documentation files (the *
6 .\" "Software"), to deal in the Software without restriction, including *
7 .\" without limitation the rights to use, copy, modify, merge, publish, *
8 .\" distribute, distribute with modifications, sublicense, and/or sell *
9 .\" copies of the Software, and to permit persons to whom the Software is *
10 .\" furnished to do so, subject to the following conditions: *
12 .\" The above copyright notice and this permission notice shall be included *
13 .\" in all copies or substantial portions of the Software. *
15 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
16 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
17 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
18 .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
19 .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
20 .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
21 .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
23 .\" Except as contained in this notice, the name(s) of the above copyright *
24 .\" holders shall not be used in advertising or otherwise to promote the *
25 .\" sale, use or other dealings in this Software without prior written *
27 .\"***************************************************************************
29 .'" $Id: form_driver.3x,v 1.7 1999/07/10 23:13:18 tom Exp $
32 \fBform_driver\fR - command-processing loop of the form system
34 \fB#include <form.h>\fR
36 int form_driver(FORM *form, int c);
39 Once a form has been posted (displayed), you should funnel input events to it
40 through \fBform_driver\fR. This routine has two major input cases; either
41 the input is a form navigation request or it's a printable ASCII character.
42 The form driver requests are as follows:
45 Move to the next page.
48 Move to the previous page.
51 Move to the first page.
54 Move to the last field.
58 Move to the next field.
61 Move to the previous field.
64 Move to the first field.
67 Move to the last field.
70 Move to the sorted next field.
73 Move to the sorted previous field.
76 Move to the sorted first field.
79 Move to the sorted last field.
85 Move right to a field.
95 Move to the next char.
98 Move to the previous char.
101 Move to the next line.
104 Move to the previous line.
107 Move to the next word.
110 Move to the previous word.
113 Move to the beginning of the field.
116 Move to the end of the field.
119 Move to the beginning of the line.
122 Move to the end of the line.
125 Move left in the field.
128 Move right in the field.
131 Move up in the field.
134 Move down in the field.
138 Insert or overlay a new line.
141 Insert a blank at the cursor.
144 Insert a blank line at the cursor.
147 Delete character at the cursor.
150 Delete character before the cursor.
153 Delete line at the cursor.
156 Delete blank-delimited word at the cursor.
159 Clear to end of line from cursor.
162 Clear to end of field from cursor.
165 Clear the entire field.
175 Scroll the field forward a line.
178 Scroll the field backward a line.
181 Scroll the field forward a page.
184 Scroll the field backward a page.
187 Scroll the field forward half a page.
190 Scroll the field backward half a page.
194 Scroll the field forward a character.
197 Scroll the field backward a character.
200 Horizontal scroll the field forward a line.
203 Horizontal scroll the field backward a line.
206 Horizontal scroll the field forward half a line.
209 Horizontal scroll the field backward half a line.
216 Display next field choice.
219 Display previous field choice.
221 If the second argument is a printable ASCII character, the driver places it
222 in the current position in the current field. If it is one of the forms
223 requests listed above, that request is executed.
225 If the second argument is neither printable ASCII nor one of the above
226 pre-defined form requests, the driver assumes it is an application-specific
227 command and returns \fBE_UNKNOWN_COMMAND\fR. Application-defined commands
228 should be defined relative to \fBMAX_COMMAND\fR, the maximum value of these
229 pre-defined requests.
231 \fBform_driver\fR return one of the following error codes:
234 The routine succeeded.
237 System error occurred (see \fBerrno\fR).
240 Routine detected an incorrect or out-of-range argument.
243 Routine was called from an initialization or termination function.
246 The form has not been posted.
248 \fBE_UNKNOWN_COMMAND\fR
249 The form driver code saw an unknown request code.
251 \fBE_INVALID_FIELD\fR
252 Contents of field is invalid.
254 \fBE_REQUEST_DENIED\fR
255 The form driver could not process the request.
257 \fBcurses\fR(3X), \fBform\fR(3X).
259 The header file \fB<form.h>\fR automatically includes the header files
262 These routines emulate the System V forms library. They were not supported on
263 Version 7 or BSD versions.
265 Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
268 .\"# The following sets edit modes for GNU EMACS
269 .\"# Local Variables: