]> ncurses.scripts.mit.edu Git - ncurses.git/blob - Ada95/html/man/form_driver.3x.html
ncurses 5.0
[ncurses.git] / Ada95 / html / man / form_driver.3x.html
1 <HTML>
2 <BODY>
3 <PRE>
4        <STRONG>form_driver</STRONG> - command-processing loop of the form system
5
6
7 </PRE>
8 <H2>SYNOPSIS</H2><PRE>
9        <STRONG>#include</STRONG> <STRONG><form.h></STRONG>
10        int form_driver(FORM *form, int c);
11
12
13 </PRE>
14 <H2>DESCRIPTION</H2><PRE>
15        Once a form has been posted (displayed), you should funnel
16        input events to it through <STRONG>form_driver</STRONG>.  This routine  has
17        two  major input cases; either the input is a form naviga-
18        tion request or it's a  printable  ASCII  character.   The
19        form driver requests are as follows:
20
21        REQ_NEXT_PAGE
22             Move to the next page.
23
24        REQ_PREV_PAGE
25             Move to the previous page.
26
27        REQ_FIRST_PAGE
28             Move to the first page.
29
30        REQ_LAST_PAGE
31             Move to the last field.
32
33
34        REQ_NEXT_FIELD
35             Move to the next field.
36
37        REQ_PREV_FIELD
38             Move to the previous field.
39
40        REQ_FIRST_FIELD
41             Move to the first field.
42
43        REQ_LAST_FIELD
44             Move to the last field.
45
46        REQ_SNEXT_FIELD
47             Move to the sorted next field.
48
49        REQ_SPREV_FIELD
50             Move to the sorted previous field.
51
52        REQ_SFIRST_FIELD
53             Move to the sorted first field.
54
55        REQ_SLAST_FIELD
56             Move to the sorted last field.
57
58        REQ_LEFT_FIELD
59             Move left to a field.
60             Move right to a field.
61
62        REQ_UP_FIELD
63             Move up to a field.
64
65        REQ_DOWN_FIELD
66             Move down to a field.
67
68
69        REQ_NEXT_CHAR
70             Move to the next char.
71
72        REQ_PREV_CHAR
73             Move to the previous char.
74
75        REQ_NEXT_LINE
76             Move to the next line.
77
78        REQ_PREV_LINE
79             Move to the previous line.
80
81        REQ_NEXT_WORD
82             Move to the next word.
83
84        REQ_PREV_WORD
85             Move to the previous word.
86
87        REQ_BEG_FIELD
88             Move to the beginning of the field.
89
90        REQ_END_FIELD
91             Move to the end of the field.
92
93        REQ_BEG_LINE
94             Move to the beginning of the line.
95
96        REQ_END_LINE
97             Move to the end of the line.
98
99        REQ_LEFT_CHAR
100             Move left in the field.
101
102        REQ_RIGHT_CHAR
103             Move right in the field.
104
105        REQ_UP_CHAR
106             Move up in the field.
107
108        REQ_DOWN_CHAR
109             Move down in the field.
110
111
112             Insert or overlay a new line.
113
114        REQ_INS_CHAR
115             Insert a blank at the cursor.
116
117        REQ_INS_LINE
118             Insert a blank line at the cursor.
119
120        REQ_DEL_CHAR
121             Delete character at the cursor.
122
123        REQ_DEL_PREV
124             Delete character before the cursor.
125
126        REQ_DEL_LINE
127             Delete line at the cursor.
128
129        REQ_DEL_WORD
130             Delete blank-delimited word at the cursor.
131
132        REQ_CLR_EOL
133             Clear to end of line from cursor.
134
135        REQ_CLR_EOF
136             Clear to end of field from cursor.
137
138        REQ_CLR_FIELD
139             Clear the entire field.
140
141        REQ_OVL_MODE
142             Enter overlay mode.
143
144        REQ_INS_MODE
145             Enter insert mode.
146
147
148        REQ_SCR_FLINE
149             Scroll the field forward a line.
150
151        REQ_SCR_BLINE
152             Scroll the field backward a line.
153
154        REQ_SCR_FPAGE
155             Scroll the field forward a page.
156
157        REQ_SCR_BPAGE
158             Scroll the field backward a page.
159
160        REQ_SCR_FHPAGE
161             Scroll the field forward half a page.
162
163        REQ_SCR_BHPAGE
164             Scroll the field forward a character.
165
166        REQ_SCR_BCHAR
167             Scroll the field backward a character.
168
169        REQ_SCR_HFLINE
170             Horizontal scroll the field forward a line.
171
172        REQ_SCR_HBLINE
173             Horizontal scroll the field backward a line.
174
175        REQ_SCR_HFHALF
176             Horizontal scroll the field forward half a line.
177
178        REQ_SCR_HBHALF
179             Horizontal scroll the field backward half a line.
180
181
182        REQ_VALIDATION
183             Validate field.
184
185        REQ_NEXT_CHOICE
186             Display next field choice.
187
188        REQ_PREV_CHOICE
189             Display previous field choice.
190
191        If the second argument is a printable ASCII character, the
192        driver places it in the current position  in  the  current
193        field.   If  it is one of the forms requests listed above,
194        that request is executed.
195
196        If the second argument is neither printable ASCII nor  one
197        of  the above pre-defined form requests, the drive assumes
198        it  is  an  application-specific   command   and   returns
199        <STRONG>E_UNKNOWN_COMMAND</STRONG>.  Application-defined commands should be
200        defined relative to  <STRONG>MAX_COMMAND</STRONG>,  the  maximum  value  of
201        these pre-defined requests.
202
203
204 </PRE>
205 <H2>RETURN VALUE</H2><PRE>
206        <STRONG>form_driver</STRONG> return one of the following error codes:
207
208        <STRONG>E_OK</STRONG> The routine succeeded.
209
210        <STRONG>E_SYSTEM_ERROR</STRONG>
211             System error occurred (see <STRONG>errno</STRONG>).
212
213        <STRONG>E_BAD_ARGUMENT</STRONG>
214             Routine  detected  an incorrect or out-of-range argu-
215             ment.
216
217        <STRONG>E_BAD_STATE</STRONG>
218
219        <STRONG>E_NOT_POSTED</STRONG>
220             The form has not been posted.
221
222        <STRONG>E_UNKNOWN_COMMAND</STRONG>
223             The form driver code saw an unknown request code.
224
225        <STRONG>E_INVALID_FIELD</STRONG>
226             Contents of field is invalid.
227
228        <STRONG>E_REQUEST_DENIED</STRONG>
229             The form driver could not process the request.
230
231
232 </PRE>
233 <H2>SEE ALSO</H2><PRE>
234        <STRONG><A HREF="ncurses.3x.html">curses(3X)</A></STRONG>, <STRONG><A HREF="form.3x.html">form(3X)</A></STRONG>.
235
236
237 </PRE>
238 <H2>NOTES</H2><PRE>
239        The header file <STRONG><form.h></STRONG> automatically includes the header
240        files <STRONG><curses.h></STRONG>.
241
242
243 </PRE>
244 <H2>PORTABILITY</H2><PRE>
245        These routines emulate the System V forms  library.   They
246        were not supported on Version 7 or BSD versions.
247
248
249 </PRE>
250 <H2>AUTHORS</H2><PRE>
251        Juergen  Pfeifer.   Manual  pages  and  adaptation for new
252        curses by Eric S. Raymond.
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278 </PRE>
279 </BODY>
280 </HTML>