formdriver(3X) formdriver(3X)
NAME
formdriver - command-processing loop of the form system
SYNOPSIS
##include <>
int formdriver(FORM *form, int c);
DESCRIPTION
Once a form has been posted (displayed), you should funnel input events
to it through formdriver. This routine has two major input cases;
either the input is a form navigation request or it's a printable ASCI
character. The form driver requests are as follows:
REQNEXTPAGE
Move to the next page.
REQPREVPAGE
Move to the previous page.
REQFIRSTPAGE
Move to the first page.
REQLASTPAGE
Move to the last field.
REQNEXTFIELD
Move to the next field.
REQPREVFIELD
Move to the previous field.
REQFIRSTFIELD
Move to the first field.
REQLASTFIELD
Move to the last field.
REQSNEXTFIELD
Move to the sorted next field.
REQSPREVFIELD
Move to the sorted previous field.
REQSFIRSTFIELD
Move to the sorted first field.
REQSLASTFIELD
Move to the sorted last field.
REQLEFTFIELD
Move left to a field.
REQRIGHTFIELD
Move right to a field.
REQUPFIELD
Move up to a field.
REQDOWNFIELD
Move down to a field.
REQNEXTCHAR
Move to the next char.
REQPREVCHAR
Move to the previous char.
REQNEXTLINE
Move to the next line.
REQPREVLINE
Move to the previous line.
REQNEXTWORD
Move to the next word.
REQPREVWORD
Move to the previous word.
REQBEGFIELD
Move to the beginning of the field.
REQENDFIELD
Move to the end of the field.
REQBEGLINE
Move to the beginning of the line.
REQENDLINE
Move to the end of the line.
REQLEFTCHAR
Move left in the field.
REQRIGHTCHAR
Move right in the field.
REQUPCHAR
Move up in the field.
REQDOWNCHAR
Move down in the field.
REQNEWLINE
Insert or overlay a new line.
REQINSCHAR
Insert a blank at the cursor.
REQINSLINE
Insert a blank line at the cursor.
REQDELCHAR
Delete character at the cursor.
REQDELPREV
Delete character before the cursor.
REQDELINE
Delete line at the cursor.
REQDELWORD
Delete blank-delimited word at the cursor.
REQCLREOL
Clear to end of line from cursor.
REQCLREOF
Clear to end of field from cursor.
REQCLRFIELD
Clear the entire field.
REQOVLMODE
Enter overlay mode.
REQINSMODE
Enter insert mode.
REQSCRFLINE
Scroll the field forward a line.
REQSCRBLINE
Scroll the field backward a line.
REQSCRFPAGE
Scroll the field forward a page.
REQSCRBPAGE
Scroll the field backward a page.
REQSCRFHPAGE
Scroll the field forward half a page.
REQSCRBHPAGE
Scroll the field backward half a page.
REQSCRFCHAR
Scroll the field forward a character.
REQSCRBCHAR
Scroll the field backward a character.
REQSCRHFLINE
Horizontal scroll the field forward a line.
REQSCRHBLINE
Horizontal scroll the field backward a line.
REQSCRHFHALF
Horizontal scroll the field forward half a line.
REQSCRHBHALF
Horizontal scroll the field backward half a line.
REQVALIDATION
Validate field.
REQNEXTCHOICE
Display next field choice.
REQPREVCHOICE
Display previous field choice.
If the second argument is a printable ASCI character, the driver
places it in the current position in the current field. If it is one
of the forms requests listed above, that request is executed.
If the second argument is neither printable ASCI nor one of the above
pre-defined form requests, the driver assumes it is an application-spe-
cific command and returns EUNKNOWNCOMAND. Application-defined com-
mands should be defined relative to MAXCOMAND, the maximum value of
these pre-defined requests.
RETURN VALUE
formdriver return one of the following error codes:
EOK The routine succeeded.
ESYSTEMEROR
System error occurred (see errno).
EBADARGUMENT
Routine detected an incorrect or out-of-range argument.
EBADSTATE
Routine was called from an initialization or termination function.
ENOTPOSTED
The form has not been posted.
EUNKNOWNCOMAND
The form driver code saw an unknown request code.
EINVALIDFIELD
Contents of field is invalid.
EREQUESTDENIED
The form driver could not process the request.
SEE ALSO
curses(3X), form(3X).
NOTES
The header file <> automatically includes the header files
<>.
PORTABILITY
These routines emulate the System V forms library. They were not sup-
ported on Version 7 or BSD versions.
AUTHORS
Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S.
Raymond.
formdriver(3X)
|