]> ncurses.scripts.mit.edu Git - ncurses.git/blob - doc/html/man/form_driver.3x.html
0d9efcfde7d2f0ccb252167860da85e500e69941
[ncurses.git] / doc / html / man / form_driver.3x.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
2 <!-- 
3   ****************************************************************************
4   * Copyright (c) 1998-2002,2006 Free Software Foundation, Inc.              *
5   *                                                                          *
6   * Permission is hereby granted, free of charge, to any person obtaining a  *
7   * copy of this software and associated documentation files (the            *
8   * "Software"), to deal in the Software without restriction, including      *
9   * without limitation the rights to use, copy, modify, merge, publish,      *
10   * distribute, distribute with modifications, sublicense, and/or sell       *
11   * copies of the Software, and to permit persons to whom the Software is    *
12   * furnished to do so, subject to the following conditions:                 *
13   *                                                                          *
14   * The above copyright notice and this permission notice shall be included  *
15   * in all copies or substantial portions of the Software.                   *
16   *                                                                          *
17   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
18   * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
19   * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
20   * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
21   * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
22   * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
23   * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
24   *                                                                          *
25   * Except as contained in this notice, the name(s) of the above copyright   *
26   * holders shall not be used in advertising or otherwise to promote the     *
27   * sale, use or other dealings in this Software without prior written       *
28   * authorization.                                                           *
29   ****************************************************************************
30   * @Id: form_driver.3x,v 1.12 2006/11/04 18:51:00 tom Exp @
31 -->
32 <HTML>
33 <HEAD>
34 <TITLE>form_driver 3x</TITLE>
35 <link rev=made href="mailto:bug-ncurses@gnu.org">
36 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
37 </HEAD>
38 <BODY>
39 <H1>form_driver 3x</H1>
40 <HR>
41 <PRE>
42 <!-- Manpage converted by man2html 3.0.1 -->
43 <STRONG><A HREF="form_driver.3x.html">form_driver(3x)</A></STRONG>                                         <STRONG><A HREF="form_driver.3x.html">form_driver(3x)</A></STRONG>
44
45
46
47
48 </PRE>
49 <H2>NAME</H2><PRE>
50        <STRONG>form_driver</STRONG> - command-processing loop of the form system
51
52
53 </PRE>
54 <H2>SYNOPSIS</H2><PRE>
55        <STRONG>#include</STRONG> <STRONG>&lt;form.h&gt;</STRONG>
56        int form_driver(FORM *form, int c);
57
58
59 </PRE>
60 <H2>DESCRIPTION</H2><PRE>
61        Once a form has been posted (displayed), you should funnel
62        input events to it through <STRONG>form_driver</STRONG>.  This routine  has
63        two  major input cases; either the input is a form naviga-
64        tion request or it's a  printable  ASCII  character.   The
65        form driver requests are as follows:
66
67        REQ_NEXT_PAGE
68             Move to the next page.
69
70        REQ_PREV_PAGE
71             Move to the previous page.
72
73        REQ_FIRST_PAGE
74             Move to the first page.
75
76        REQ_LAST_PAGE
77             Move to the last field.
78
79
80        REQ_NEXT_FIELD
81             Move to the next field.
82
83        REQ_PREV_FIELD
84             Move to the previous field.
85
86        REQ_FIRST_FIELD
87             Move to the first field.
88
89        REQ_LAST_FIELD
90             Move to the last field.
91
92        REQ_SNEXT_FIELD
93             Move to the sorted next field.
94
95        REQ_SPREV_FIELD
96             Move to the sorted previous field.
97
98        REQ_SFIRST_FIELD
99             Move to the sorted first field.
100
101        REQ_SLAST_FIELD
102             Move to the sorted last field.
103
104        REQ_LEFT_FIELD
105             Move left to a field.
106
107        REQ_RIGHT_FIELD
108             Move right to a field.
109
110        REQ_UP_FIELD
111             Move up to a field.
112
113        REQ_DOWN_FIELD
114             Move down to a field.
115
116
117        REQ_NEXT_CHAR
118             Move to the next char.
119
120        REQ_PREV_CHAR
121             Move to the previous char.
122
123        REQ_NEXT_LINE
124             Move to the next line.
125
126        REQ_PREV_LINE
127             Move to the previous line.
128
129        REQ_NEXT_WORD
130             Move to the next word.
131
132        REQ_PREV_WORD
133             Move to the previous word.
134
135        REQ_BEG_FIELD
136             Move to the beginning of the field.
137
138        REQ_END_FIELD
139             Move to the end of the field.
140
141        REQ_BEG_LINE
142             Move to the beginning of the line.
143
144        REQ_END_LINE
145             Move to the end of the line.
146
147        REQ_LEFT_CHAR
148             Move left in the field.
149
150        REQ_RIGHT_CHAR
151             Move right in the field.
152
153        REQ_UP_CHAR
154             Move up in the field.
155
156        REQ_DOWN_CHAR
157             Move down in the field.
158
159
160        REQ_NEW_LINE
161             Insert or overlay a new line.
162
163        REQ_INS_CHAR
164             Insert a blank at the cursor.
165
166        REQ_INS_LINE
167             Insert a blank line at the cursor.
168
169        REQ_DEL_CHAR
170             Delete character at the cursor.
171
172        REQ_DEL_PREV
173             Delete character before the cursor.
174
175        REQ_DEL_LINE
176             Delete line at the cursor.
177
178        REQ_DEL_WORD
179             Delete blank-delimited word at the cursor.
180
181        REQ_CLR_EOL
182             Clear to end of line from cursor.
183
184        REQ_CLR_EOF
185             Clear to end of field from cursor.
186
187        REQ_CLR_FIELD
188             Clear the entire field.
189
190        REQ_OVL_MODE
191             Enter overlay mode.
192
193        REQ_INS_MODE
194             Enter insert mode.
195
196
197        REQ_SCR_FLINE
198             Scroll the field forward a line.
199
200        REQ_SCR_BLINE
201             Scroll the field backward a line.
202
203        REQ_SCR_FPAGE
204             Scroll the field forward a page.
205
206        REQ_SCR_BPAGE
207             Scroll the field backward a page.
208
209        REQ_SCR_FHPAGE
210             Scroll the field forward half a page.
211
212        REQ_SCR_BHPAGE
213             Scroll the field backward half a page.
214
215
216        REQ_SCR_FCHAR
217             Scroll the field forward a character.
218
219        REQ_SCR_BCHAR
220             Scroll the field backward a character.
221
222        REQ_SCR_HFLINE
223             Horizontal scroll the field forward a line.
224
225        REQ_SCR_HBLINE
226             Horizontal scroll the field backward a line.
227
228        REQ_SCR_HFHALF
229             Horizontal scroll the field forward half a line.
230
231        REQ_SCR_HBHALF
232             Horizontal scroll the field backward half a line.
233
234
235        REQ_VALIDATION
236             Validate field.
237
238        REQ_NEXT_CHOICE
239             Display next field choice.
240
241        REQ_PREV_CHOICE
242             Display previous field choice.
243
244        If the second argument is a printable ASCII character, the
245        driver places it in the current position  in  the  current
246        field.   If  it is one of the forms requests listed above,
247        that request is executed.
248
249        If the second argument is neither printable ASCII nor  one
250        of the above pre-defined form requests, the driver assumes
251        it  is  an  application-specific   command   and   returns
252        <STRONG>E_UNKNOWN_COMMAND</STRONG>.  Application-defined commands should be
253        defined relative to  <STRONG>MAX_COMMAND</STRONG>,  the  maximum  value  of
254        these pre-defined requests.
255
256
257 </PRE>
258 <H2>RETURN VALUE</H2><PRE>
259        <STRONG>form_driver</STRONG> returns one of the following error codes:
260
261        <STRONG>E_OK</STRONG> The routine succeeded.
262
263        <STRONG>E_BAD_ARGUMENT</STRONG>
264             Routine  detected  an incorrect or out-of-range argu-
265             ment.
266
267        <STRONG>E_BAD_STATE</STRONG>
268             Routine was called from an initialization or termina-
269             tion function.
270
271        <STRONG>E_NOT_POSTED</STRONG>
272             The form has not been posted.
273
274        <STRONG>E_INVALID_FIELD</STRONG>
275             Contents of field is invalid.
276
277        <STRONG>E_REQUEST_DENIED</STRONG>
278             The form driver could not process the request.
279
280        <STRONG>E_SYSTEM_ERROR</STRONG>
281             System error occurred (see <STRONG>errno</STRONG>).
282
283        <STRONG>E_UNKNOWN_COMMAND</STRONG>
284             The form driver code saw an unknown request code.
285
286
287 </PRE>
288 <H2>SEE ALSO</H2><PRE>
289        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="form.3x.html">form(3x)</A></STRONG>.
290
291
292 </PRE>
293 <H2>NOTES</H2><PRE>
294        The header file <STRONG>&lt;form.h&gt;</STRONG> automatically includes the header
295        files <STRONG>&lt;curses.h&gt;</STRONG>.
296
297
298 </PRE>
299 <H2>PORTABILITY</H2><PRE>
300        These routines emulate the System V forms  library.   They
301        were not supported on Version 7 or BSD versions.
302
303
304 </PRE>
305 <H2>AUTHORS</H2><PRE>
306        Juergen  Pfeifer.   Manual  pages  and  adaptation for new
307        curses by Eric S. Raymond.
308
309
310
311                                                         <STRONG><A HREF="form_driver.3x.html">form_driver(3x)</A></STRONG>
312 </PRE>
313 <HR>
314 <ADDRESS>
315 Man(1) output converted with
316 <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
317 </ADDRESS>
318 </BODY>
319 </HTML>