]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/form_page.3x
ncurses 6.2 - patch 20200215
[ncurses.git] / man / form_page.3x
1 '\" t
2 .\"***************************************************************************
3 .\" Copyright 2018-2019,2020 Thomas E. Dickey                                *
4 .\" Copyright 1998-2010,2016 Free Software Foundation, Inc.                  *
5 .\"                                                                          *
6 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
7 .\" copy of this software and associated documentation files (the            *
8 .\" "Software"), to deal in the Software without restriction, including      *
9 .\" without limitation the rights to use, copy, modify, merge, publish,      *
10 .\" distribute, distribute with modifications, sublicense, and/or sell       *
11 .\" copies of the Software, and to permit persons to whom the Software is    *
12 .\" furnished to do so, subject to the following conditions:                 *
13 .\"                                                                          *
14 .\" The above copyright notice and this permission notice shall be included  *
15 .\" in all copies or substantial portions of the Software.                   *
16 .\"                                                                          *
17 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
18 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
19 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
20 .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
21 .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
22 .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
23 .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
24 .\"                                                                          *
25 .\" Except as contained in this notice, the name(s) of the above copyright   *
26 .\" holders shall not be used in advertising or otherwise to promote the     *
27 .\" sale, use or other dealings in this Software without prior written       *
28 .\" authorization.                                                           *
29 .\"***************************************************************************
30 .\"
31 .\" $Id: form_page.3x,v 1.17 2020/02/02 23:34:34 tom Exp $
32 .TH form_page 3X ""
33 .SH NAME
34 \fBform_page\fR \- set and get form page number
35 .SH SYNOPSIS
36 \fB#include <form.h>\fR
37 .br
38 int set_current_field(FORM *form, FIELD *field);
39 .br
40 FIELD *current_field(const FORM *);
41 .br
42 int unfocus_current_field(FORM *form);
43 .br
44 int set_form_page(FORM *form, int n);
45 .br
46 int form_page(const FORM *form);
47 .br
48 int field_index(const FIELD *field);
49 .br
50 .SH DESCRIPTION
51 The function \fBset_current_field\fR sets the current field of the given
52 form; \fBcurrent_field\fR returns the current field of the given form.
53 .PP
54 The function \fBunfocus_current_field\fR removes the focus from the current
55 field of the form.
56 In such state, inquiries via \fBcurrent_field\fR shall return a NULL pointer.
57 .PP
58 The function \fBset_form_page\fR sets the form's page number (goes to page
59 \fIn\fR of the form).
60 .PP
61 The function \fBform_page\fR returns the form's current page number.
62 .PP
63 The function \fBfield_index\fR returns the index of the field in the
64 field array of the form it is connected to.
65 It returns \fBERR\fR if
66 the argument is the null pointer or the field is not connected.
67 .SH RETURN VALUE
68 Except for \fBform_page\fR, each routine returns one of the following:
69 .TP 5
70 .B E_OK
71 The routine succeeded.
72 .TP 5
73 .B E_BAD_ARGUMENT
74 Routine detected an incorrect or out-of-range argument.
75 .TP 5
76 .B E_BAD_STATE
77 Routine was called from an initialization or termination function.
78 .TP 5
79 .B E_INVALID_FIELD
80 Contents of a field are not valid.
81 .TP 5
82 .B E_REQUEST_DENIED
83 The form driver could not process the request.
84 .TP 5
85 .B E_SYSTEM_ERROR
86 System error occurred (see \fBerrno\fR(3)).
87 .
88 .SH SEE ALSO
89 \fBcurses\fR(3X), \fBform\fR(3X).
90 .SH NOTES
91 The header file \fB<form.h>\fR automatically includes the header file
92 \fB<curses.h>\fR.
93 .SH PORTABILITY
94 These routines emulate the System V forms library.
95 They were not supported on
96 Version 7 or BSD versions.
97 .PP
98 The \fBunfocus_current_field\fP function is an ncurses extension.
99 .SH AUTHORS
100 Juergen Pfeifer.
101 Manual pages and adaptation for new curses by Eric S. Raymond.