DESCRIPTION
The
form library provides a terminal independent form system using the
curses(3) library. Before using the
form functions the terminal must be set up by
curses(3) using the
initscr() function or similar. Programs using
form functions must be linked with the
curses(3) library
-lcurses.
The form library provides facilities for defining form fields, placing a form on the terminal screen, assign pre and post change operations and setting the attributes of both the form and its fields.
Defining default attributes for forms and fields
The
form library allows any settable attribute or option of both the form and field objects to be defined such that any new form or field automatically inherits the value as default. Setting the default value will not affect any field or form that has already been created but will be applied to subsequent objects. To set the default attribute or option the set routine is passed a
NULL pointer in the field or form parameter when calling the set routine. The current default value can be retrieved by calling the get routine with a
NULL pointer for the field or form parameter.
RETURN VALUES
Any function returning a string pointer will return
NULL if an error occurs. Functions returning an integer will return one of the following:
E_OK |
The function was successful. |
E_SYSTEM_ERROR |
There was a system error during the call. |
E_BAD_ARGUMENT |
One or more of the arguments passed to the function was incorrect. |
E_POSTED |
The form is already posted. |
E_CONNECTED |
A field was already connected to a form. |
E_BAD_STATE |
The function was called from within an initialization or termination routine. |
E_NO_ROOM |
The form does not fit within the subwindow. |
E_NOT_POSTED |
The form is not posted. |
E_UNKNOWN_COMMAND |
The form driver does not recognize the request passed to it. |
E_NOT_SELECTABLE |
The field could not be selected. |
E_NOT_CONNECTED |
The field is not connected to a form. |
E_REQUEST_DENIED |
The form driver could not process the request. |
E_INVALID_FIELD |
The field is invalid. |
E_CURRENT |
The field is the active one on the form. |