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 FORMS 3CURSES "Dec 31, 1996"
9 forms \- character based forms package
13 \fB#include <form.h>\fR
19 The \fBform\fR library is built using the \fBcurses\fR library, and any program
20 using \fBforms\fR routines must call one of the \fBcurses\fR initialization
21 routines such as \fBinitscr\fR. A program using these routines must be compiled
22 with \fB-lform\fR and \fB-lcurses\fR on the \fBcc\fR command line.
25 The \fBforms\fR package gives the applications programmer a
26 terminal-independent method of creating and customizing forms for
27 user-interaction. The \fBforms\fR package includes: field routines, which are
28 used to create and customize fields, link fields and assign field types;
29 fieldtype routines, which are used to create new field types for validating
30 fields; and form routines, which are used to create and customize forms, assign
31 pre/post processing functions, and display and interact with forms.
32 .SS "Current Default Values for Field Attributes"
35 The \fBforms\fR package establishes initial current default values for field
36 attributes. During field initialization, each field attribute is assigned the
37 current default value for that attribute. An application can change or retrieve
38 a current default attribute value by calling the appropriate set or retrieve
39 routine with a \fINULL\fR field pointer. If an application changes a current
40 default field attribute value, subsequent fields created using
41 \fBnew_field()\fR will have the new default attribute value. (The attributes of
42 previously created fields are not changed if a current default attribute value
44 .SS "Routine Name Index"
47 The following table lists each \fBforms\fR routine and the name of the manual
48 page on which it is described.
52 \fBforms Routine Name\fR
55 \fBManual Page Name\fR
97 \fBdynamic_field_info\fR
109 form_field_validation(3X)
118 form_field_attributes(3X)
127 form_field_buffer(3X)
145 form_field_attributes(3X)
217 form_field_attributes(3X)
226 form_field_buffer(3X)
244 form_field_validation(3X)
253 form_field_userptr(3X)
448 \fBpos_form_cursor\fR
475 \fBset_current_field\fR
487 form_field_attributes(3X)
493 \fBset_field_buffer\fR
496 form_field_buffer(3X)
505 form_field_attributes(3X)
520 \fB set_field_just\fR
541 form_field_attributes(3X)
547 \fBset_field_status\fR
550 form_field_buffer(3X)
568 form_field_validation(3X)
574 \fBset_field_userptr\fR
577 form_field_userptr(3X)
583 \fBset_fieldtype_arg\fR
592 \fBset_fieldtype_choice\fR
601 \fBset_form_fields\fR
655 \fBset_form_userptr\fR
676 form_field_buffer(3X)
700 Routines that return a pointer always return \fINULL\fR on error. Routines that
701 return an integer return one of the following:
708 The function returned successfully.
714 \fB\fBE_CONNECTED\fR\fR
717 The field is already connected to a form.
723 \fB\fBE_SYSTEM_ERROR\fR\fR
732 \fB\fBE_BAD_ARGUMENT\fR\fR
735 An argument is incorrect.
741 \fB\fBE_CURRENT\fR\fR
744 The field is the current field.
759 \fB\fBE_NOT_POSTED\fR\fR
762 The form is not posted.
768 \fB\fBE_INVALID_FIELD\fR\fR
771 The field contents are invalid.
777 \fB\fBE_NOT_CONNECTED\fR\fR
780 The field is not connected to a form.
786 \fB\fBE_NO_ROOM\fR\fR
789 The form does not fit in the subwindow.
795 \fB\fBE_BAD_STATE\fR\fR
798 The routine was called from an initialization or termination function.
804 \fB\fBE_REQUEST_DENIED\fR\fR
807 The form driver request failed.
813 \fB\fBE_UNKNOWN_COMMAND\fR\fR
816 An unknown request was passed to the form driver.
822 See \fBattributes\fR(5) for descriptions of the following attributes:
830 ATTRIBUTE TYPE ATTRIBUTE VALUE
838 \fBcurses\fR(3CURSES), \fBattributes\fR(5)
842 The header \fB<form.h>\fR automatically includes the headers \fB<eti.h>\fR and