]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/form_field_opts.3x
ncurses 6.2 - patch 20201107
[ncurses.git] / man / form_field_opts.3x
1 '\" t
2 .\"***************************************************************************
3 .\" Copyright 2018-2019,2020 Thomas E. Dickey                                *
4 .\" Copyright 1998-2014,2015 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_field_opts.3x,v 1.27 2020/10/18 00:11:45 tom Exp $
32 .TH form_field_opts 3X ""
33 .SH NAME
34 \fBset_field_opts\fP,
35 \fBfield_opts_on\fP,
36 \fBfield_opts_off\fP,
37 \fBfield_opts\fP \- set and get field options
38 .SH SYNOPSIS
39 \fB#include <form.h>\fR
40 .sp
41 \fBint set_field_opts(FIELD *\fP\fIfield\fP\fB, Field_Options \fP\fIopts\fP\fB);\fP
42 .br
43 \fBField_Options field_opts(const FIELD *\fP\fIfield\fP\fB);\fP
44 .sp
45 \fBint field_opts_on(FIELD *\fP\fIfield\fP\fB, Field_Options \fP\fIopts\fP\fB);\fP
46 .br
47 \fBint field_opts_off(FIELD *\fP\fIfield\fP\fB, Field_Options \fP\fIopts\fP\fB);\fP
48 .br
49 .SH DESCRIPTION
50 The function \fBset_field_opts\fR sets all the given field's option bits (field
51 option bits may be logically-OR'ed together).
52 .PP
53 The function \fBfield_opts_on\fR turns on the given option bits, and leaves
54 others alone.
55 .PP
56 The function \fBfield_opts_off\fR turns off the given option bits, and leaves
57 others alone.
58 .PP
59 The function \fBfield_opts\fR returns the field's current option bits.
60 .PP
61 The following standard options are defined (all are on by default):
62 .TP 5
63 O_ACTIVE
64 The field is visited during processing.
65 If this option is off, the field will
66 not be reachable by navigation keys.
67 Please notice that an invisible field
68 appears to be inactive also.
69 .TP 5
70 O_AUTOSKIP
71 Skip to the next field when this one fills.
72 .TP 5
73 O_BLANK
74 The field is cleared whenever a character is entered at the first position.
75 .TP 5
76 O_EDIT
77 The field can be edited.
78 .TP 5
79 O_NULLOK
80 Allow a blank field.
81 .TP 5
82 O_PASSOK
83 Validate field only if modified by user.
84 .TP 5
85 O_PUBLIC
86 The field contents are displayed as data is entered.
87 .TP 5
88 O_STATIC
89 Field buffers are fixed to field's original size.
90 Turn this option off to create a dynamic field.
91 .TP 5
92 O_VISIBLE
93 The field is displayed.
94 If this option is off, display of the field is
95 suppressed.
96 .TP 5
97 O_WRAP
98 Words that do not fit on a line are wrapped to the next line.
99 Words are
100 blank-separated.
101 .PP
102 These extension options are defined (extensions are off by default):
103 .TP 5
104 O_DYNAMIC_JUSTIFY
105 Permit dynamic fields to be justified, like static fields.
106 .TP 5
107 O_NO_LEFT_STRIP
108 Preserve leading whitespace in the field buffer, which is normally discarded.
109 .TP 5
110 O_EDGE_INSERT_STAY
111 When inserting into a field up to the boundary position,
112 optionally delay the scrolling,
113 so that the last inserted character remains visible,
114 but advance the cursor to reflect the insertion.
115 This allows the form library to display the
116 inserted character in one-character fields
117 as well as allowing the library to maintain consistent state.
118 .TP 5
119 O_INPUT_FIELD
120 The \fBset_max_field\fP function checks for this extension,
121 which allows a dynamic field to shrink if the new
122 limit is smaller than the current field size.
123 .SH RETURN VALUE
124 Except for \fBfield_opts\fR, each routine returns one of the following:
125 .TP 5
126 .B E_OK
127 The routine succeeded.
128 .TP 5
129 .B E_BAD_ARGUMENT
130 Routine detected an incorrect or out-of-range argument.
131 .TP 5
132 .B E_CURRENT
133 The field is the current field.
134 .TP 5
135 .B E_SYSTEM_ERROR
136 System error occurred (see \fBerrno\fR(3)).
137 .SH SEE ALSO
138 \fBcurses\fR(3X),
139 \fBform\fR(3X).
140 \fBform_field_just\fR(3X).
141 .SH NOTES
142 The header file \fB<form.h>\fR automatically includes the header file
143 \fB<curses.h>\fR.
144 .SH PORTABILITY
145 These routines emulate the System V forms library.
146 They were not supported on
147 Version 7 or BSD versions.
148 .SH AUTHORS
149 Juergen Pfeifer.
150 Manual pages and adaptation for new curses by Eric S. Raymond.