1form_page(3X) form_page(3X)
2
3
4
6 form_page - set and get form page number
7
9 #include <form.h>
10
11 int set_current_field(FORM *form, FIELD *field);
12 FIELD *current_field(const FORM *form);
13
14 int unfocus_current_field(FORM *form);
15
16 int set_form_page(FORM *form, int n);
17 int form_page(const FORM *form);
18
19 int field_index(const FIELD *field);
20
22 The function set_current_field sets the current field of the given
23 form; current_field returns the current field of the given form.
24
25 The function unfocus_current_field removes the focus from the current
26 field of the form. In such state, inquiries via current_field shall
27 return a NULL pointer.
28
29 The function set_form_page sets the form's page number (goes to page n
30 of the form).
31
32 The function form_page returns the form's current page number.
33
34 The function field_index returns the index of the field in the field
35 array of the form it is connected to. It returns ERR if the argument
36 is the null pointer or the field is not connected.
37
39 Except for form_page, each routine returns one of the following:
40
41 E_OK The routine succeeded.
42
43 E_BAD_ARGUMENT
44 Routine detected an incorrect or out-of-range argument.
45
46 E_BAD_STATE
47 Routine was called from an initialization or termination function.
48
49 E_INVALID_FIELD
50 Contents of a field are not valid.
51
52 E_REQUEST_DENIED
53 The form driver could not process the request.
54
55 E_SYSTEM_ERROR
56 System error occurred (see errno(3)).
57
59 curses(3X), form(3X).
60
62 The header file <form.h> automatically includes the header file
63 <curses.h>.
64
66 These routines emulate the System V forms library. They were not sup‐
67 ported on Version 7 or BSD versions.
68
69 The unfocus_current_field function is an ncurses extension.
70
72 Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S.
73 Raymond.
74
75
76
77 form_page(3X)