1 .'" $Id: form_driver.3x,v 0.5 1997/12/14 01:26:33 tom Exp $
4 \fBform_driver\fR - command-processing loop of the form system
6 \fB#include <form.h>\fR
8 int form_driver(FORM *form, int c);
11 Once a form has been posted (displayed), you should funnel input events to it
12 through \fBform_driver\fR. This routine has two major input cases; either
13 the input is a form navigation request or it's a printable ASCII character.
14 The form driver requests are as follows:
17 Move to the next page.
20 Move to the previous page.
23 Move to the first page.
26 Move to the last field.
30 Move to the next field.
33 Move to the previous field.
36 Move to the first field.
39 Move to the last field.
42 Move to the sorted next field.
45 Move to the sorted previous field.
48 Move to the sorted first field.
51 Move to the sorted last field.
57 Move right to a field.
67 Move to the next char.
70 Move to the previous char.
73 Move to the next line.
76 Move to the previous line.
79 Move to the next word.
82 Move to the previous word.
85 Move to the beginning of the field.
88 Move to the end of the field.
91 Move to the beginning of the line.
94 Move to the end of the line.
97 Move left in the field.
100 Move right in the field.
103 Move up in the field.
106 Move down in the field.
110 Insert or overlay a new line.
113 Insert a blank at the cursor.
116 Insert a blank line at the cursor.
119 Delete character at the cursor.
122 Delete character before the cursor.
125 Delete line at the cursor.
128 Delete blank-delimited word at the cursor.
131 Clear to end of line from cursor.
134 Clear to end of field from cursor.
137 Clear the entire field.
147 Scroll the field forward a line.
150 Scroll the field backward a line.
153 Scroll the field forward a page.
156 Scroll the field backward a page.
159 Scroll the field forward half a page.
162 Scroll the field backward half a page.
166 Scroll the field forward a character.
169 Scroll the field backward a character.
172 Horizontal scroll the field forward a line.
175 Horizontal scroll the field backward a line.
178 Horizontal scroll the field forward half a line.
181 Horizontal scroll the field backward half a line.
188 Display next field choice.
191 Display previous field choice.
193 If the second argument is a printable ASCII character, the driver places it
194 in the current position in the current field. If it is one of the forms
195 requests listed above, that request is executed.
197 If the second argument is neither printable ASCII nor one of the above
198 pre-defined form requests, the drive assumes it is an application-specific
199 command and returns \fBE_UNKNOWN_COMMAND\fR. Application-defined commands
200 should be defined relative to \fBMAX_COMMAND\fR, the maximum value of these
201 pre-defined requests.
203 \fBform_driver\fR return one of the following error codes:
206 The routine succeeded.
209 System error occurred (see \fBerrno\fR).
212 Routine detected an incorrect or out-of-range argument.
215 Routine was called from an initialization or termination function.
218 The form has not been posted.
220 \fBE_UNKNOWN_COMMAND\fR
221 The form driver code saw an unknown request code.
223 \fBE_INVALID_FIELD\fR
224 Contents of field is invalid.
226 \fBE_REQUEST_DENIED\fR
227 The form driver could not process the request.
229 \fBcurses\fR(3X), \fBform\fR(3X).
231 The header file \fB<form.h>\fR automatically includes the header files
234 These routines emulate the System V forms library. They were not supported on
235 Version 7 or BSD versions.
237 Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
240 .\"# The following sets edit modes for GNU EMACS
241 .\"# Local Variables: