]> ncurses.scripts.mit.edu Git - ncurses.git/blob - doc/html/man/form_driver.3x.html
ncurses 5.2
[ncurses.git] / doc / html / man / form_driver.3x.html
1 <HTML>
2 <BODY>
3 <PRE>
4 <!-- Manpage converted by man2html 3.0.1 -->
5
6 </PRE>
7 <H2>NAME</H2><PRE>
8        <B>form_driver</B> - command-processing loop of the form system
9
10
11 </PRE>
12 <H2>SYNOPSIS</H2><PRE>
13        <B>#include</B> <B>&lt;form.h&gt;</B>
14        int form_driver(FORM *form, int c);
15
16
17 </PRE>
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:
24
25        REQ_NEXT_PAGE
26             Move to the next page.
27
28        REQ_PREV_PAGE
29             Move to the previous page.
30
31        REQ_FIRST_PAGE
32             Move to the first page.
33
34        REQ_LAST_PAGE
35             Move to the last field.
36
37
38        REQ_NEXT_FIELD
39             Move to the next field.
40
41        REQ_PREV_FIELD
42             Move to the previous field.
43
44        REQ_FIRST_FIELD
45             Move to the first field.
46
47        REQ_LAST_FIELD
48             Move to the last field.
49
50        REQ_SNEXT_FIELD
51             Move to the sorted next field.
52
53        REQ_SPREV_FIELD
54             Move to the sorted previous field.
55
56        REQ_SFIRST_FIELD
57             Move to the sorted first field.
58
59        REQ_SLAST_FIELD
60             Move to the sorted last field.
61
62        REQ_LEFT_FIELD
63             Move left to a field.
64
65        REQ_RIGHT_FIELD
66             Move right to a field.
67
68        REQ_UP_FIELD
69             Move up to a field.
70
71        REQ_DOWN_FIELD
72             Move down to a field.
73
74
75        REQ_NEXT_CHAR
76             Move to the next char.
77
78        REQ_PREV_CHAR
79             Move to the previous char.
80
81        REQ_NEXT_LINE
82             Move to the next line.
83
84        REQ_PREV_LINE
85             Move to the previous line.
86
87        REQ_NEXT_WORD
88             Move to the next word.
89
90        REQ_PREV_WORD
91             Move to the previous word.
92
93        REQ_BEG_FIELD
94             Move to the beginning of the field.
95
96        REQ_END_FIELD
97             Move to the end of the field.
98
99        REQ_BEG_LINE
100             Move to the beginning of the line.
101
102        REQ_END_LINE
103             Move to the end of the line.
104
105        REQ_LEFT_CHAR
106             Move left in the field.
107
108        REQ_RIGHT_CHAR
109             Move right in the field.
110
111        REQ_UP_CHAR
112             Move up in the field.
113
114        REQ_DOWN_CHAR
115             Move down in the field.
116
117
118
119        REQ_NEW_LINE
120             Insert or overlay a new line.
121
122        REQ_INS_CHAR
123             Insert a blank at the cursor.
124
125        REQ_INS_LINE
126             Insert a blank line at the cursor.
127
128        REQ_DEL_CHAR
129             Delete character at the cursor.
130
131        REQ_DEL_PREV
132             Delete character before the cursor.
133
134        REQ_DEL_LINE
135             Delete line at the cursor.
136
137        REQ_DEL_WORD
138             Delete blank-delimited word at the cursor.
139
140        REQ_CLR_EOL
141             Clear to end of line from cursor.
142
143        REQ_CLR_EOF
144             Clear to end of field from cursor.
145
146        REQ_CLR_FIELD
147             Clear the entire field.
148
149        REQ_OVL_MODE
150             Enter overlay mode.
151
152        REQ_INS_MODE
153             Enter insert mode.
154
155
156        REQ_SCR_FLINE
157             Scroll the field forward a line.
158
159        REQ_SCR_BLINE
160             Scroll the field backward a line.
161
162        REQ_SCR_FPAGE
163             Scroll the field forward a page.
164
165        REQ_SCR_BPAGE
166             Scroll the field backward a page.
167
168        REQ_SCR_FHPAGE
169             Scroll the field forward half a page.
170
171        REQ_SCR_BHPAGE
172             Scroll the field backward half a page.
173
174        REQ_SCR_FCHAR
175             Scroll the field forward a character.
176
177        REQ_SCR_BCHAR
178             Scroll the field backward a character.
179
180        REQ_SCR_HFLINE
181             Horizontal scroll the field forward a line.
182
183        REQ_SCR_HBLINE
184             Horizontal scroll the field backward a line.
185
186        REQ_SCR_HFHALF
187             Horizontal scroll the field forward half a line.
188
189        REQ_SCR_HBHALF
190             Horizontal scroll the field backward half a line.
191
192
193        REQ_VALIDATION
194             Validate field.
195
196        REQ_NEXT_CHOICE
197             Display next field choice.
198
199        REQ_PREV_CHOICE
200             Display previous field choice.
201
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.
206
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.
213
214
215 </PRE>
216 <H2>RETURN VALUE</H2><PRE>
217        <B>form_driver</B> return one of the following error codes:
218
219        <B>E_OK</B> The routine succeeded.
220
221        <B>E_SYSTEM_ERROR</B>
222             System error occurred (see <B>errno</B>).
223
224        <B>E_BAD_ARGUMENT</B>
225             Routine  detected  an incorrect or out-of-range argu-
226             ment.
227
228        <B>E_BAD_STATE</B>
229             Routine  was  called  from   an   initialization   or
230             termination function.
231
232        <B>E_NOT_POSTED</B>
233             The form has not been posted.
234
235        <B>E_UNKNOWN_COMMAND</B>
236             The form driver code saw an unknown request code.
237
238        <B>E_INVALID_FIELD</B>
239             Contents of field is invalid.
240
241        <B>E_REQUEST_DENIED</B>
242             The form driver could not process the request.
243
244
245 </PRE>
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>.
248
249
250 </PRE>
251 <H2>NOTES</H2><PRE>
252        The header file <B>&lt;form.h&gt;</B> automatically includes the header
253        files <B>&lt;curses.h&gt;</B>.
254
255
256 </PRE>
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.
260
261
262 </PRE>
263 <H2>AUTHORS</H2><PRE>
264        Juergen  Pfeifer.   Manual  pages  and  adaptation for new
265        curses by Eric S. Raymond.
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292 </PRE>
293 <HR>
294 <ADDRESS>
295 Man(1) output converted with
296 <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
297 </ADDRESS>
298 </BODY>
299 </HTML>