1502 Remove conversion cruft from manpages
[unleashed.git] / usr / src / man / man3curses / form_driver.3curses
blob5bd5e9c9a95768f21fa95312f46e9e7f2805cf6d
1 '\" te
2 .\" Copyright 1989 AT&T
3 .\" Portions Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved.
4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH FORM_DRIVER 3CURSES "Dec 31, 1996"
8 .SH NAME
9 form_driver \- command processor for the forms subsystem
10 .SH SYNOPSIS
11 .LP
12 .nf
13 \fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-lform\fR \fB -lcurses \fR [ \fIlibrary\fR... ]
14 #include <form.h>
16 \fBint\fR \fBform_driver\fR(\fBFORM *\fR\fIform\fR, \fBint\fR \fIc\fR);
17 .fi
19 .SH DESCRIPTION
20 .sp
21 .LP
22 The \fBform_driver()\fR function is the workhorse of the \fBforms\fR subsystem;
23 it checks to determine whether the character \fIc\fR is a \fBforms\fR request
24 or data. If it is a request, the form driver executes the request and reports
25 the result. If it is data (a printable \fBASCII\fR character), it enters the
26 data into the current position in the current field. If it is not recognized,
27 the form driver assumes it is an application-defined command and returns
28 \fBE_UNKNOWN_COMMAND\fR. Application defined commands should be defined
29 relative to \fBMAX_COMMAND\fR, the maximum value of a request listed below.
30 .sp
31 .LP
32 Form driver requests:
33 .sp
34 .ne 2
35 .na
36 \fBREQ_NEXT_PAGE\fR
37 .ad
38 .RS 20n
39 Move to the next page.
40 .RE
42 .sp
43 .ne 2
44 .na
45 \fBREQ_PREV_PAGE\fR
46 .ad
47 .RS 20n
48 Move to the previous page.
49 .RE
51 .sp
52 .ne 2
53 .na
54 \fBREQ_FIRST_PAGE\fR
55 .ad
56 .RS 20n
57 Move to the first page.
58 .RE
60 .sp
61 .ne 2
62 .na
63 \fBREQ_LAST_PAGE\fR
64 .ad
65 .RS 20n
66 Move to the last page.
67 .RE
69 .sp
70 .ne 2
71 .na
72 \fBREQ_NEXT_FIELD\fR
73 .ad
74 .RS 20n
75 Move to the next field.
76 .RE
78 .sp
79 .ne 2
80 .na
81 \fBREQ_PREV_FIELD\fR
82 .ad
83 .RS 20n
84 Move to the previous field.
85 .RE
87 .sp
88 .ne 2
89 .na
90 \fBREQ_FIRST_FIELD\fR
91 .ad
92 .RS 20n
93 Move to the first field.
94 .RE
96 .sp
97 .ne 2
98 .na
99 \fBREQ_LAST_FIELD\fR
101 .RS 20n
102 Move to the last field.
106 .ne 2
108 \fBREQ_SNEXT_FIELD\fR
110 .RS 20n
111 Move to the sorted next field.
115 .ne 2
117 \fBREQ_SPREV_FIELD\fR
119 .RS 20n
120 Move to the sorted prev field.
124 .ne 2
126 \fBREQ_SFIRST_FIELD\fR
128 .RS 20n
129 Move to the sorted first field.
133 .ne 2
135 \fBREQ_SLAST_FIELD\fR
137 .RS 20n
138 Move to the sorted last field.
142 .ne 2
144 \fBREQ_LEFT_FIELD\fR
146 .RS 20n
147 Move left to field.
151 .ne 2
153 \fBREQ_RIGHT_FIELD\fR
155 .RS 20n
156 Move right to field.
160 .ne 2
162 \fBREQ_UP_FIELD\fR
164 .RS 20n
165 Move up to field.
169 .ne 2
171 \fBREQ_DOWN_FIELD\fR
173 .RS 20n
174 Move down to field.
178 .ne 2
180 \fBREQ_NEXT_CHAR\fR
182 .RS 20n
183 Move to the next character in the field.
187 .ne 2
189 \fBREQ_PREV_CHAR\fR
191 .RS 20n
192 Move to the previous character in the field.
196 .ne 2
198 \fBREQ_NEXT_LINE\fR
200 .RS 20n
201 Move to the next line in the field.
205 .ne 2
207 \fBREQ_PREV_LINE\fR
209 .RS 20n
210 Move to the previous line in the field.
214 .ne 2
216 \fBREQ_NEXT_WORD\fR
218 .RS 20n
219 Move to the next word in the field.
223 .ne 2
225 \fBREQ_PREV_WORD\fR
227 .RS 20n
228 Move to the previous word in the field.
232 .ne 2
234 \fBREQ_BEG_FIELD\fR
236 .RS 20n
237 Move to the first char in the field.
241 .ne 2
243 \fBREQ_END_FIELD\fR
245 .RS 20n
246 Move after the last char in the field.
250 .ne 2
252 \fBREQ_BEG_LINE\fR
254 .RS 20n
255 Move to the beginning of the line.
259 .ne 2
261 \fBREQ_END_LINE\fR
263 .RS 20n
264 Move after the last char in the line.
268 .ne 2
270 \fBREQ_LEFT_CHAR\fR
272 .RS 20n
273 Move left in the field.
277 .ne 2
279 \fBREQ_RIGHT_CHAR\fR
281 .RS 20n
282 Move right in the field.
286 .ne 2
288 \fBREQ_UP_CHAR\fR
290 .RS 20n
291 Move up in the field.
295 .ne 2
297 \fBREQ_DOWN_CHAR\fR
299 .RS 20n
300 Move down in the field.
304 .ne 2
306 \fBREQ_NEW_LINE\fR
308 .RS 20n
309 Insert/overlay a new line.
313 .ne 2
315 \fBREQ_INS_CHAR\fR
317 .RS 20n
318 Insert the blank character at the cursor.
322 .ne 2
324 \fBREQ_INS_LINE\fR
326 .RS 20n
327 Insert a blank line at the cursor.
331 .ne 2
333 \fBREQ_DEL_CHAR\fR
335 .RS 20n
336 Delete the character at the cursor.
340 .ne 2
342 \fBREQ_DEL_PREV\fR
344 .RS 20n
345 Delete the character before the cursor.
349 .ne 2
351 \fBREQ_DEL_LINE\fR
353 .RS 20n
354 Delete the line at the cursor.
358 .ne 2
360 \fBREQ_DEL_WORD\fR
362 .RS 20n
363 Delete the word at the cursor.
367 .ne 2
369 \fBREQ_CLR_EOL\fR
371 .RS 20n
372 Clear to the end of the line.
376 .ne 2
378 \fBREQ_CLR_EOF\fR
380 .RS 20n
381 Clear to the end of the field.
385 .ne 2
387 \fBREQ_CLR_FIELD\fR
389 .RS 20n
390 Clear the entire field.
394 .ne 2
396 \fBREQ_OVL_MODE\fR
398 .RS 20n
399 Enter overlay mode.
403 .ne 2
405 \fBREQ_INS_MODE\fR
407 .RS 20n
408 Enter insert mode.
412 .ne 2
414 \fBREQ_SCR_FLINE\fR
416 .RS 20n
417 Scroll the field forward a line.
421 .ne 2
423 \fBREQ_SCR_BLINE\fR
425 .RS 20n
426 Scroll the field backward a line.
430 .ne 2
432 \fBREQ_SCR_FPAGE\fR
434 .RS 20n
435 Scroll the field forward a page.
439 .ne 2
441 \fBREQ_SCR_BPAGE \fR
443 .RS 20n
444 Scroll the field backward a page.
448 .ne 2
450 \fBREQ_SCR_FHPAGE\fR
452 .RS 20n
453 Scroll the field forward half a page.
457 .ne 2
459 \fBREQ_SCR_BHPAGE\fR
461 .RS 20n
462 Scroll the field backward half a page.
466 .ne 2
468 \fBREQ_SCR_FCHAR\fR
470 .RS 20n
471 Horizontal scroll forward a character.
475 .ne 2
477 \fBREQ_SCR_BCHAR\fR
479 .RS 20n
480 Horizontal scroll backward a character
484 .ne 2
486 \fBREQ_SCR_HFLINE\fR
488 .RS 20n
489 Horizontal scroll forward a line.
493 .ne 2
495 \fBREQ_SCR_HBLINE\fR
497 .RS 20n
498 Horizontal scroll backward a line.
502 .ne 2
504 \fBREQ_SCR_HFHALF\fR
506 .RS 20n
507 Horizontal scroll forward half a line.
511 .ne 2
513 \fBREQ_SCR_HBHALF\fR
515 .RS 20n
516 Horizontal scroll backward half a line.
520 .ne 2
522 \fBREQ_VALIDATION\fR
524 .RS 20n
525 Validate field.
529 .ne 2
531 \fBREQ_PREV_CHOICE\fR
533 .RS 20n
534 Display the previous field choice.
538 .ne 2
540 \fBREQ_NEXT_CHOICE\fR
542 .RS 20n
543 Display the next field choice.
546 .SH RETURN VALUES
549 The \fBform_driver()\fR function returns one of the following:
551 .ne 2
553 \fBE_OK\fR
555 .RS 21n
556 The function returned successfully.
560 .ne 2
562 \fBE_SYSTEM_ERROR\fR
564 .RS 21n
565 System error.
569 .ne 2
571 \fBE_BAD_ARGUMENT\fR
573 .RS 21n
574 An argument is incorrect.
578 .ne 2
580 \fBE_NOT_POSTED\fR
582 .RS 21n
583 The form is not posted.
587 .ne 2
589 \fBE_INVALID_FIELD\fR
591 .RS 21n
592 The field contents are invalid.
596 .ne 2
598 \fBE_BAD_STATE\fR
600 .RS 21n
601 The routine was called from an initialization or termination function.
605 .ne 2
607 \fBE_REQUEST_DENIED\fR
609 .RS 21n
610 The form driver request failed.
614 .ne 2
616 \fBE_UNKNOWN_COMMAND\fR
618 .RS 21n
619 An unknown request was passed to the form driver.
622 .SH ATTRIBUTES
625 See \fBattributes\fR(5) for descriptions of the following attributes:
630 box;
631 c | c
632 l | l .
633 ATTRIBUTE TYPE  ATTRIBUTE VALUE
635 MT-Level        Unsafe
638 .SH SEE ALSO
641 \fBcurses\fR(3CURSES), \fBforms\fR(3CURSES), \fBattributes\fR(5)
642 .SH NOTES
645 The header <\fBform.h\fR> automatically includes the headers <\fBeti.h\fR> and
646 <\fBcurses.h\fR>.