1 .\"***************************************************************************
2 .\" Copyright (c) 1998,2002 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.9 2002/02/16 22:39:52 tom Exp $
30 .\" $DragonFly: src/lib/libncurses/man/form_driver.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $
33 \fBform_driver\fR - command-processing loop of the form system
35 \fB#include <form.h>\fR
37 int form_driver(FORM *form, int c);
40 Once a form has been posted (displayed), you should funnel input events to it
41 through \fBform_driver\fR. This routine has two major input cases; either
42 the input is a form navigation request or it's a printable ASCII character.
43 The form driver requests are as follows:
46 Move to the next page.
49 Move to the previous page.
52 Move to the first page.
55 Move to the last field.
59 Move to the next field.
62 Move to the previous field.
65 Move to the first field.
68 Move to the last field.
71 Move to the sorted next field.
74 Move to the sorted previous field.
77 Move to the sorted first field.
80 Move to the sorted last field.
86 Move right to a field.
96 Move to the next char.
99 Move to the previous char.
102 Move to the next line.
105 Move to the previous line.
108 Move to the next word.
111 Move to the previous word.
114 Move to the beginning of the field.
117 Move to the end of the field.
120 Move to the beginning of the line.
123 Move to the end of the line.
126 Move left in the field.
129 Move right in the field.
132 Move up in the field.
135 Move down in the field.
139 Insert or overlay a new line.
142 Insert a blank at the cursor.
145 Insert a blank line at the cursor.
148 Delete character at the cursor.
151 Delete character before the cursor.
154 Delete line at the cursor.
157 Delete blank-delimited word at the cursor.
160 Clear to end of line from cursor.
163 Clear to end of field from cursor.
166 Clear the entire field.
176 Scroll the field forward a line.
179 Scroll the field backward a line.
182 Scroll the field forward a page.
185 Scroll the field backward a page.
188 Scroll the field forward half a page.
191 Scroll the field backward half a page.
195 Scroll the field forward a character.
198 Scroll the field backward a character.
201 Horizontal scroll the field forward a line.
204 Horizontal scroll the field backward a line.
207 Horizontal scroll the field forward half a line.
210 Horizontal scroll the field backward half a line.
217 Display next field choice.
220 Display previous field choice.
222 If the second argument is a printable ASCII character, the driver places it
223 in the current position in the current field. If it is one of the forms
224 requests listed above, that request is executed.
226 If the second argument is neither printable ASCII nor one of the above
227 pre-defined form requests, the driver assumes it is an application-specific
228 command and returns \fBE_UNKNOWN_COMMAND\fR. Application-defined commands
229 should be defined relative to \fBMAX_COMMAND\fR, the maximum value of these
230 pre-defined requests.
232 \fBform_driver\fR return one of the following error codes:
235 The routine succeeded.
238 System error occurred (see \fBerrno\fR).
241 Routine detected an incorrect or out-of-range argument.
244 Routine was called from an initialization or termination function.
247 The form has not been posted.
249 \fBE_UNKNOWN_COMMAND\fR
250 The form driver code saw an unknown request code.
252 \fBE_INVALID_FIELD\fR
253 Contents of field is invalid.
255 \fBE_REQUEST_DENIED\fR
256 The form driver could not process the request.
258 \fBcurses\fR(3X), \fBform\fR(3X).
260 The header file \fB<form.h>\fR automatically includes the header files
263 These routines emulate the System V forms library. They were not supported on
264 Version 7 or BSD versions.
266 Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
269 .\"# The following sets edit modes for GNU EMACS
270 .\"# Local Variables: