| 1 |
.\"*************************************************************************** |
| 2 |
.\" Copyright 2018-2023,2024 Thomas E. Dickey * |
| 3 |
.\" Copyright 1998-2010,2016 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_page.3x,v 1.39 2024/12/28 21:26:21 tom Exp $ |
| 31 |
.TH page 3FORM 2024-12-28 "ncurses 6.6" "Library calls" |
| 32 |
.SH NAME |
| 33 |
\fBform_page\fP \- |
| 34 |
set and get form page number |
| 35 |
.SH SYNOPSIS |
| 36 |
.nf |
| 37 |
\fB#include <form.h> |
| 38 |
.PP |
| 39 |
\fBint set_current_field(FORM *\fIform\fP, FIELD *\fIfield\fP); |
| 40 |
\fBFIELD *current_field(const FORM *\fIform\fP); |
| 41 |
.PP |
| 42 |
\fBint unfocus_current_field(FORM *\fIform\fP); |
| 43 |
.PP |
| 44 |
\fBint set_form_page(FORM *\fIform\fP, int \fIn\fP); |
| 45 |
\fBint form_page(const FORM *\fIform\fP); |
| 46 |
.PP |
| 47 |
\fBint field_index(const FIELD *\fIfield\fP); |
| 48 |
.fi |
| 49 |
.SH DESCRIPTION |
| 50 |
The function \fBset_current_field\fP sets the current field of the given |
| 51 |
form; \fBcurrent_field\fP returns the current field of the given form. |
| 52 |
.PP |
| 53 |
The function \fBunfocus_current_field\fP removes the focus from the current |
| 54 |
field of the form. |
| 55 |
In such state, inquiries via \fBcurrent_field\fP shall return a |
| 56 |
.I NULL |
| 57 |
pointer. |
| 58 |
.PP |
| 59 |
The function \fBset_form_page\fP sets the form's page number (goes to page |
| 60 |
\fIn\fP of the form). |
| 61 |
.PP |
| 62 |
The function \fBform_page\fP returns the form's current page number. |
| 63 |
.PP |
| 64 |
The function \fBfield_index\fP returns the index of the field in the |
| 65 |
field array of the form it is connected to. |
| 66 |
It returns \fBERR\fP if |
| 67 |
the argument is the null pointer or the field is not connected. |
| 68 |
.SH RETURN VALUE |
| 69 |
Except for \fBform_page\fP, each routine returns one of the following: |
| 70 |
.TP 5 |
| 71 |
.B E_OK |
| 72 |
The routine succeeded. |
| 73 |
.TP 5 |
| 74 |
.B E_BAD_ARGUMENT |
| 75 |
Routine detected an incorrect or out-of-range argument. |
| 76 |
.TP 5 |
| 77 |
.B E_BAD_STATE |
| 78 |
Routine was called from an initialization or termination function. |
| 79 |
.TP 5 |
| 80 |
.B E_INVALID_FIELD |
| 81 |
Contents of a field are not valid. |
| 82 |
.TP 5 |
| 83 |
.B E_REQUEST_DENIED |
| 84 |
The form driver could not process the request. |
| 85 |
.TP 5 |
| 86 |
.B E_SYSTEM_ERROR |
| 87 |
System error occurred (see \fBerrno\fP(3)). |
| 88 |
.SH PORTABILITY |
| 89 |
These routines emulate the System V forms library. |
| 90 |
They were not supported on |
| 91 |
Version 7 or BSD versions. |
| 92 |
.PP |
| 93 |
The \fBunfocus_current_field\fP function is an \fI\%ncurses\fP |
| 94 |
extension. |
| 95 |
.SH AUTHORS |
| 96 |
Juergen Pfeifer. |
| 97 |
Manual pages and adaptation for new curses by Eric S. Raymond. |
| 98 |
.SH SEE ALSO |
| 99 |
\fB\%ncurses\fP(3NCURSES), |
| 100 |
\fB\%form\fP(3FORM) |