Update ncurses to version 5.4.
[dragonfly.git] / lib / libncurses / man / form.3
1 '\" t
2 .\"***************************************************************************
3 .\" Copyright (c) 1998,2002 Free Software Foundation, Inc.                   *
4 .\"                                                                          *
5 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
6 .\" copy of this software and associated documentation files (the            *
7 .\" "Software"), to deal in the Software without restriction, including      *
8 .\" without limitation the rights to use, copy, modify, merge, publish,      *
9 .\" distribute, distribute with modifications, sublicense, and/or sell       *
10 .\" copies of the Software, and to permit persons to whom the Software is    *
11 .\" furnished to do so, subject to the following conditions:                 *
12 .\"                                                                          *
13 .\" The above copyright notice and this permission notice shall be included  *
14 .\" in all copies or substantial portions of the Software.                   *
15 .\"                                                                          *
16 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
17 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
18 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
19 .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
20 .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
21 .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
22 .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
23 .\"                                                                          *
24 .\" Except as contained in this notice, the name(s) of the above copyright   *
25 .\" holders shall not be used in advertising or otherwise to promote the     *
26 .\" sale, use or other dealings in this Software without prior written       *
27 .\" authorization.                                                           *
28 .\"***************************************************************************
29 .\"
30 .\" $Id: form.3x,v 1.15 2002/01/19 22:48:05 tom Exp $
31 .\" $DragonFly: src/lib/libncurses/man/form.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $
32 .TH form 3X ""
33 .SH NAME
34 \fBform\fR - curses extension for programming forms
35 .SH SYNOPSIS
36 \fB#include <form.h>\fR
37 .br
38 .SH DESCRIPTION
39 The \fBform\fR library provides terminal-independent facilities for composing
40 form screens on character-cell terminals.  The library includes: field
41 routines, which create and modify form fields; and form routines, which group
42 fields into forms, display forms on the screen, and handle interaction with the
43 user.
44
45 The \fBform\fR library uses the \fBcurses\fR libraries, and a curses
46 initialization routine such as \fBinitscr\fR must be called before using any of
47 these functions.  To use the \fBform\fR library, link with the options
48 \fB-lform -lcurses\fR.
49
50 .SS Current Default Values for Field Attributes
51
52 The \fBform\fR library maintains a default value for field attributes.  You
53 can get or set this default by calling the appropriate \fBset_\fR
54 or retrieval
55 routine with a \fBNULL\fR field pointer.  Changing this default with a
56 \fBset_\fR function affects future field creations, but does not change the
57 rendering of fields already created.
58
59 .SS Routine Name Index
60
61 The following table lists each \fBform\fR routine and the name of
62 the manual page on which it is described.
63
64 .TS
65 l l
66 l l .
67 \fBcurses\fR Routine Name       Manual Page Name
68 =
69 current_field   \fBform_page\fR(3X)
70 data_ahead      \fBform_data\fR(3X)
71 data_behind     \fBform_data\fR(3X)
72 dup_field       \fBform_field_new\fR(3X)
73 dynamic_fieldinfo       \fBform_field_info\fR(3X)
74 field_arg       \fBform_field_validation\fR(3X)
75 field_back      \fBform_field_attributes\fR(3X)
76 field_buffer    \fBform_field_buffer\fR(3X)
77 field_count     \fBform_field\fR(3X)
78 field_fore      \fBform_field_attributes\fR(3X)
79 field_index     \fBform_page\fR(3X)
80 field_info      \fBform_field_info\fR(3X)
81 field_init      \fBform_hook\fR(3X)
82 field_just      \fBform_field_just\fR(3X)
83 field_opts      \fBform_field_opts\fR(3X)
84 field_opts_off  \fBform_field_opts\fR(3X)
85 field_opts_on   \fBform_field_opts\fR(3X)
86 field_pad       \fBform_field_attributes\fR(3X)
87 field_status    \fBform_field_buffer\fR(3X)
88 field_term      \fBform_hook\fR(3X)
89 field_type      \fBform_field_validation\fR(3X)
90 field_userptr   \fBform_field_userptr\fR(3X)
91 form_driver     \fBform_driver\fR(3X)
92 form_fields     \fBform_field\fR(3X)
93 form_init       \fBform_hook\fR(3X)
94 form_opts       \fBform_opts\fR(3X)
95 form_opts_off   \fBform_opts\fR(3X)
96 form_opts_on    \fBform_opts\fR(3X)
97 form_page       \fBform_page\fR(3X)
98 form_request_by_name    \fBform_requestname\fR(3X)
99 form_request_name       \fBform_requestname\fR(3X)
100 form_sub        \fBform_win\fR(3X)
101 form_term       \fBform_hook\fR(3X)
102 form_userptr    \fBform_userptr\fR(3X)
103 form_win        \fBform_win\fR(3X)
104 free_field      \fBform_field_new\fR(3X)
105 free_form       \fBform_new\fR(3X)
106 link_field      \fBform_field_new\fR(3X)
107 link_fieldtype  \fBform_fieldtype\fR(3X)
108 move_field      \fBform_field\fR(3X)
109 new_field       \fBform_field_new\fR(3X)
110 new_form        \fBform_new\fR(3X)
111 new_page        \fBform_new_page\fR(3X)
112 pos_form_cursor \fBform_cursor\fR(3X)
113 post_form       \fBform_post\fR(3X)
114 scale_form      \fBform_win\fR(3X)
115 set_current_field       \fBform_page\fR(3X)
116 set_field_back  \fBform_field_attributes\fR(3X)
117 set_field_buffer        \fBform_field_buffer\fR(3X)
118 set_field_fore  \fBform_field_attributes\fR(3X)
119 set_field_init  \fBform_hook\fR(3X)
120 set_field_just  \fBform_field_just\fR(3X)
121 set_field_opts  \fBform_field_opts\fR(3X)
122 set_field_pad   \fBform_field_attributes\fR(3X)
123 set_field_status        \fBform_field_buffer\fR(3X)
124 set_field_term  \fBform_hook\fR(3X)
125 set_field_type  \fBform_field_validation\fR(3X)
126 set_field_userptr       \fBform_field_userptr\fR(3X)
127 set_fieldtype_arg       \fBform_fieldtype\fR(3X)
128 set_fieldtype_choice    \fBform_fieldtype\fR(3X)
129 set_form_fields \fBform_field\fR(3X)
130 set_form_init   \fBform_hook\fR(3X)
131 set_form_opts   \fBform_field_opts\fR(3X)
132 set_form_page   \fBform_page\fR(3X)
133 set_form_sub    \fBform_win\fR(3X)
134 set_form_term   \fBform_hook\fR(3X)
135 set_form_userptr        \fBform_userptr\fR(3X)
136 set_form_win    \fBform_win\fR(3X)
137 set_max_field   \fBform_field_buffer\fR(3X)
138 set_new_page    \fBform_new_page\fR(3X)
139 unpost_form     \fBform_post\fR(3X)
140 .TE
141 .SH RETURN VALUE
142 Routines that return pointers return \fBNULL\fR on error.  Routines that return
143 an integer return one of the following error codes:
144 .TP 5
145 \fBE_OK\fR
146 The routine succeeded.
147 .TP 5
148 \fBE_CONNECTED\fR
149 The field is already connected to a form.
150 .TP 5
151 \fBE_SYSTEM_ERROR\fR
152 System error occurred (see \fBerrno\fR).
153 .TP 5
154 \fBE_BAD_ARGUMENT\fR
155 Routine detected an incorrect or out-of-range argument.
156 .TP 5
157 \fBE_POSTED\fR
158 The form is already posted.
159 .TP 5
160 \fBE_BAD_STATE\fR
161 Routine was called from an initialization or termination function.
162 .TP 5
163 \fBE_NO_ROOM\fR
164 Form is too large for its window.
165 .TP 5
166 \fBE_NOT_POSTED\fR
167 The form has not been posted.
168 .TP 5
169 \fBE_UNKNOWN_COMMAND\fR
170 The form driver code saw an unknown request code.
171 .TP 5
172 \fBE_INVALID_FIELD\fR
173 Contents of a field are not valid.
174 .TP 5
175 \fBE_NOT_CONNECTED\fR
176 No fields are connected to the form.
177 .TP 5
178 \fBE_REQUEST_DENIED\fR
179 The form driver could not process the request.
180 .SH SEE ALSO
181 \fBcurses\fR(3X) and related pages whose names begin "form_" for detailed
182 descriptions of the entry points.
183 .SH NOTES
184 The header file \fB<form.h>\fR automatically includes the header files
185 \fB<curses.h>\fR and \fB<eti.h>\fR.
186
187 In your library list, libform.a should be before libncurses.a; that is,
188 you want to say `-lform -lncurses', not the other way around (which would
189 give you a link error using GNU \fBld\fR(1) and many other linkers).
190 .SH PORTABILITY
191 These routines emulate the System V forms library.  They were not supported on
192 Version 7 or BSD versions.
193 .SH AUTHORS
194 Juergen Pfeifer.  Manual pages and adaptation for ncurses by Eric
195 S. Raymond.
196 .\"#
197 .\"# The following sets edit modes for GNU EMACS
198 .\"# Local Variables:
199 .\"# mode:nroff
200 .\"# fill-column:79
201 .\"# End: