4 <!-- Manpage converted by man2html 3.0.1 -->
8 <B>form_driver</B> - command-processing loop of the form system
12 <H2>SYNOPSIS</H2><PRE>
13 <B>#include</B> <B><form.h></B>
14 int form_driver(FORM *form, int c);
18 <H2>DESCRIPTION</H2><PRE>
19 Once a form has been posted (displayed), you should funnel
20 input events to it through <B>form_driver</B>. This routine has
21 two major input cases; either the input is a form naviga-
22 tion request or it's a printable ASCII character. The
23 form driver requests are as follows:
26 Move to the next page.
29 Move to the previous page.
32 Move to the first page.
35 Move to the last field.
39 Move to the next field.
42 Move to the previous field.
45 Move to the first field.
48 Move to the last field.
51 Move to the sorted next field.
54 Move to the sorted previous field.
57 Move to the sorted first field.
60 Move to the sorted last field.
66 Move right to a field.
76 Move to the next char.
79 Move to the previous char.
82 Move to the next line.
85 Move to the previous line.
88 Move to the next word.
91 Move to the previous word.
94 Move to the beginning of the field.
97 Move to the end of the field.
100 Move to the beginning of the line.
103 Move to the end of the line.
106 Move left in the field.
109 Move right in the field.
112 Move up in the field.
115 Move down in the field.
120 Insert or overlay a new line.
123 Insert a blank at the cursor.
126 Insert a blank line at the cursor.
129 Delete character at the cursor.
132 Delete character before the cursor.
135 Delete line at the cursor.
138 Delete blank-delimited word at the cursor.
141 Clear to end of line from cursor.
144 Clear to end of field from cursor.
147 Clear the entire field.
157 Scroll the field forward a line.
160 Scroll the field backward a line.
163 Scroll the field forward a page.
166 Scroll the field backward a page.
169 Scroll the field forward half a page.
172 Scroll the field backward half a page.
175 Scroll the field forward a character.
178 Scroll the field backward a character.
181 Horizontal scroll the field forward a line.
184 Horizontal scroll the field backward a line.
187 Horizontal scroll the field forward half a line.
190 Horizontal scroll the field backward half a line.
197 Display next field choice.
200 Display previous field choice.
202 If the second argument is a printable ASCII character, the
203 driver places it in the current position in the current
204 field. If it is one of the forms requests listed above,
205 that request is executed.
207 If the second argument is neither printable ASCII nor one
208 of the above pre-defined form requests, the driver assumes
209 it is an application-specific command and returns
210 <B>E_UNKNOWN_COMMAND</B>. Application-defined commands should be
211 defined relative to <B>MAX_COMMAND</B>, the maximum value of
212 these pre-defined requests.
216 <H2>RETURN VALUE</H2><PRE>
217 <B>form_driver</B> return one of the following error codes:
219 <B>E_OK</B> The routine succeeded.
221 <B>E_SYSTEM_ERROR</B>
222 System error occurred (see <B>errno</B>).
224 <B>E_BAD_ARGUMENT</B>
225 Routine detected an incorrect or out-of-range argu-
229 Routine was called from an initialization or
230 termination function.
233 The form has not been posted.
235 <B>E_UNKNOWN_COMMAND</B>
236 The form driver code saw an unknown request code.
238 <B>E_INVALID_FIELD</B>
239 Contents of field is invalid.
241 <B>E_REQUEST_DENIED</B>
242 The form driver could not process the request.
246 <H2>SEE ALSO</H2><PRE>
247 <B><A HREF="ncurses.3x.html">curses(3x)</A></B>, <B><A HREF="form.3x.html">form(3x)</A></B>.
252 The header file <B><form.h></B> automatically includes the header
253 files <B><curses.h></B>.
257 <H2>PORTABILITY</H2><PRE>
258 These routines emulate the System V forms library. They
259 were not supported on Version 7 or BSD versions.
263 <H2>AUTHORS</H2><PRE>
264 Juergen Pfeifer. Manual pages and adaptation for new
265 curses by Eric S. Raymond.
295 Man(1) output converted with
296 <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>