Debian Codegraph @

upstream/debian-unstable/man3/field_opts.3form

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