1form(3X)                                                              form(3X)
2
3
4

NAME

6       form - curses extension for programming forms
7

SYNOPSIS

9       #include <form.h>
10

DESCRIPTION

12       The form library provides terminal-independent facilities for composing
13       form screens on character-cell terminals.  The library includes:  field
14       routines, which create and modify form fields; and form routines, which
15       group fields into forms, display forms on the screen, and handle inter‐
16       action with the user.
17
18       The  form  library uses the curses libraries.  To use the form library,
19       link with the options -lform -lcurses.
20
21       Your program should set up the locale, e.g.,
22
23            setlocale(LC_ALL, "");
24
25       so that input/output processing will work.
26
27       A curses initialization routine such as initscr must be  called  before
28       using any of these functions.
29
30   Current Default Values for Field Attributes
31       The  form  library maintains a default value for field attributes.  You
32       can get or  set  this  default  by  calling  the  appropriate  set_  or
33       retrieval  routine  with  a  NULL field pointer.  Changing this default
34       with a set_ function affects  future  field  creations,  but  does  not
35       change the rendering of fields already created.
36
37   Routine Name Index
38       The  following table lists each form routine and the name of the manual
39       page on which it is described.
40
41       curses Routine Name    Manual Page Name
42       ─────────────────────────────────────────────────
43       current_field          form_page(3X)
44       data_ahead             form_data(3X)
45       data_behind            form_data(3X)
46       dup_field              form_field_new(3X)
47       dynamic_field_info     form_field_info(3X)
48       field_arg              form_field_validation(3X)
49       field_back             form_field_attributes(3X)
50       field_buffer           form_field_buffer(3X)
51       field_count            form_field(3X)
52       field_fore             form_field_attributes(3X)
53       field_index            form_page(3X)
54       field_info             form_field_info(3X)
55       field_init             form_hook(3X)
56       field_just             form_field_just(3X)
57       field_opts             form_field_opts(3X)
58       field_opts_off         form_field_opts(3X)
59       field_opts_on          form_field_opts(3X)
60       field_pad              form_field_attributes(3X)
61       field_status           form_field_buffer(3X)
62       field_term             form_hook(3X)
63       field_type             form_field_validation(3X)
64       field_userptr          form_field_userptr(3X)
65       form_driver            form_driver(3X)
66
67       form_fields            form_field(3X)
68       form_init              form_hook(3X)
69       form_opts              form_opts(3X)
70       form_opts_off          form_opts(3X)
71       form_opts_on           form_opts(3X)
72       form_page              form_page(3X)
73       form_request_by_name   form_requestname(3X)
74       form_request_name      form_requestname(3X)
75       form_sub               form_win(3X)
76       form_term              form_hook(3X)
77       form_userptr           form_userptr(3X)
78       form_win               form_win(3X)
79       free_field             form_field_new(3X)
80       free_fieldtype         form_fieldtype(3X)
81       free_form              form_new(3X)
82       link_field             form_field_new(3X)
83       link_fieldtype         form_fieldtype(3X)
84       move_field             form_field(3X)
85       new_field              form_field_new(3X)
86       new_fieldtype          form_fieldtype(3X)
87       new_form               form_new(3X)
88       new_page               form_new_page(3X)
89       pos_form_cursor        form_cursor(3X)
90       post_form              form_post(3X)
91       scale_form             form_win(3X)
92       set_current_field      form_page(3X)
93       set_field_back         form_field_attributes(3X)
94       set_field_buffer       form_field_buffer(3X)
95       set_field_fore         form_field_attributes(3X)
96       set_field_init         form_hook(3X)
97       set_field_just         form_field_just(3X)
98       set_field_opts         form_field_opts(3X)
99       set_field_pad          form_field_attributes(3X)
100       set_field_status       form_field_buffer(3X)
101       set_field_term         form_hook(3X)
102       set_field_type         form_field_validation(3X)
103       set_field_userptr      form_field_userptr(3X)
104       set_fieldtype_arg      form_fieldtype(3X)
105       set_fieldtype_choice   form_fieldtype(3X)
106       set_form_fields        form_field(3X)
107       set_form_init          form_hook(3X)
108       set_form_opts          form_field_opts(3X)
109       set_form_page          form_page(3X)
110       set_form_sub           form_win(3X)
111       set_form_term          form_hook(3X)
112       set_form_userptr       form_userptr(3X)
113       set_form_win           form_win(3X)
114       set_max_field          form_field_buffer(3X)
115       set_new_page           form_new_page(3X)
116       unpost_form            form_post(3X)
117

RETURN VALUE

119       Routines that return pointers return NULL on error, and  set  errno  to
120       the  corresponding  error-code returned by functions returning an inte‐
121       ger.  Routines that return an integer return one of the following error
122       codes:
123
124       E_OK The routine succeeded.
125
126       E_BAD_ARGUMENT
127            Routine detected an incorrect or out-of-range argument.
128
129       E_BAD_STATE
130            Routine was called from an initialization or termination function.
131
132       E_CONNECTED
133            The field is already connected to a form.
134
135       E_INVALID_FIELD
136            Contents of a field are not valid.
137
138       E_NOT_CONNECTED
139            No fields are connected to the form.
140
141       E_NOT_POSTED
142            The form has not been posted.
143
144       E_NO_ROOM
145            Form is too large for its window.
146
147       E_POSTED
148            The form is already posted.
149
150       E_REQUEST_DENIED
151            The form driver could not process the request.
152
153       E_SYSTEM_ERROR
154            System error occurred (see errno).
155
156       E_UNKNOWN_COMMAND
157            The form driver code saw an unknown request code.
158

SEE ALSO

160       curses(3X)  and  related  pages  whose names begin "form_" for detailed
161       descriptions of the entry points.
162

NOTES

164       The header  file  <form.h>  automatically  includes  the  header  files
165       <curses.h> and <eti.h>.
166
167       In your library list, libform.a should be before libncurses.a; that is,
168       you want to say `-lform -lncurses', not the  other  way  around  (which
169       would give you a link error using most linkers).
170

PORTABILITY

172       These  routines emulate the System V forms library.  They were not sup‐
173       ported on Version 7 or BSD versions.
174

AUTHORS

176       Juergen Pfeifer.  Manual pages and adaptation for ncurses  by  Eric  S.
177       Raymond.
178

SEE ALSO

180       This describes ncurses version 5.9 (patch 20130511).
181
182
183
184                                                                      form(3X)
Impressum