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, and a curses initialization
19       routine such as initscr must be called before using any of these  func‐
20       tions.  To use the form library, link with the options -lform -lcurses.
21
22   Current Default Values for Field Attributes
23       The  form  library maintains a default value for field attributes.  You
24       can get or  set  this  default  by  calling  the  appropriate  set_  or
25       retrieval  routine  with  a  NULL field pointer.  Changing this default
26       with a set_ function affects  future  field  creations,  but  does  not
27       change the rendering of fields already created.
28
29   Routine Name Index
30       The  following table lists each form routine and the name of the manual
31       page on which it is described.
32
33       curses Routine Name    Manual Page Name
34       ─────────────────────────────────────────────────
35       current_field          form_page(3X)
36       data_ahead             form_data(3X)
37       data_behind            form_data(3X)
38       dup_field              form_field_new(3X)
39       dynamic_fieldinfo      form_field_info(3X)
40       field_arg              form_field_validation(3X)
41       field_back             form_field_attributes(3X)
42       field_buffer           form_field_buffer(3X)
43       field_count            form_field(3X)
44       field_fore             form_field_attributes(3X)
45       field_index            form_page(3X)
46       field_info             form_field_info(3X)
47       field_init             form_hook(3X)
48       field_just             form_field_just(3X)
49       field_opts             form_field_opts(3X)
50       field_opts_off         form_field_opts(3X)
51       field_opts_on          form_field_opts(3X)
52       field_pad              form_field_attributes(3X)
53       field_status           form_field_buffer(3X)
54       field_term             form_hook(3X)
55       field_type             form_field_validation(3X)
56       field_userptr          form_field_userptr(3X)
57       form_driver            form_driver(3X)
58       form_fields            form_field(3X)
59       form_init              form_hook(3X)
60       form_opts              form_opts(3X)
61       form_opts_off          form_opts(3X)
62       form_opts_on           form_opts(3X)
63       form_page              form_page(3X)
64       form_request_by_name   form_requestname(3X)
65       form_request_name      form_requestname(3X)
66
67       form_sub               form_win(3X)
68       form_term              form_hook(3X)
69       form_userptr           form_userptr(3X)
70       form_win               form_win(3X)
71       free_field             form_field_new(3X)
72       free_fieldtype         form_fieldtype(3X)
73       free_form              form_new(3X)
74       link_field             form_field_new(3X)
75       link_fieldtype         form_fieldtype(3X)
76       move_field             form_field(3X)
77       new_field              form_field_new(3X)
78       new_fieldtype          form_fieldtype(3X)
79       new_form               form_new(3X)
80       new_page               form_new_page(3X)
81       pos_form_cursor        form_cursor(3X)
82       post_form              form_post(3X)
83       scale_form             form_win(3X)
84       set_current_field      form_page(3X)
85       set_field_back         form_field_attributes(3X)
86       set_field_buffer       form_field_buffer(3X)
87       set_field_fore         form_field_attributes(3X)
88       set_field_init         form_hook(3X)
89       set_field_just         form_field_just(3X)
90       set_field_opts         form_field_opts(3X)
91       set_field_pad          form_field_attributes(3X)
92       set_field_status       form_field_buffer(3X)
93       set_field_term         form_hook(3X)
94       set_field_type         form_field_validation(3X)
95       set_field_userptr      form_field_userptr(3X)
96       set_fieldtype_arg      form_fieldtype(3X)
97       set_fieldtype_choice   form_fieldtype(3X)
98       set_form_fields        form_field(3X)
99       set_form_init          form_hook(3X)
100       set_form_opts          form_field_opts(3X)
101       set_form_page          form_page(3X)
102       set_form_sub           form_win(3X)
103       set_form_term          form_hook(3X)
104       set_form_userptr       form_userptr(3X)
105       set_form_win           form_win(3X)
106       set_max_field          form_field_buffer(3X)
107       set_new_page           form_new_page(3X)
108       unpost_form            form_post(3X)
109

RETURN VALUE

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

SEE ALSO

152       curses(3X)  and  related  pages  whose names begin "form_" for detailed
153       descriptions of the entry points.
154

NOTES

156       The header  file  <form.h>  automatically  includes  the  header  files
157       <curses.h> and <eti.h>.
158
159       In your library list, libform.a should be before libncurses.a; that is,
160       you want to say `-lform -lncurses', not the  other  way  around  (which
161       would give you a link error using most linkers).
162

PORTABILITY

164       These  routines emulate the System V forms library.  They were not sup‐
165       ported on Version 7 or BSD versions.
166

AUTHORS

168       Juergen Pfeifer.  Manual pages and adaptation for ncurses  by  Eric  S.
169       Raymond.
170

SEE ALSO

172       This describes ncurses version 5.6 (patch 20070812).
173
174
175
176                                                                      form(3X)
Impressum