1form_field_opts(3X) form_field_opts(3X)
2
3
4
6 set_field_opts, field_opts_on, field_opts_off, field_opts - set and get
7 field options
8
10 #include <form.h>
11 int set_field_opts(FIELD *field, Field_Options opts);
12 int field_opts_on(FIELD *field, Field_Options opts);
13 int field_opts_off(FIELD *field, Field_Options opts);
14 Field_Options field_opts(const FIELD *field);
15
17 The function set_field_opts sets all the given field's option bits
18 (field option bits may be logically-OR'ed together).
19
20 The function field_opts_on turns on the given option bits, and leaves
21 others alone.
22
23 The function field_opts_off turns off the given option bits, and leaves
24 others alone.
25
26 The function field_opts returns the field's current option bits.
27
28 The following standard options are defined (all are on by default):
29
30 O_ACTIVE
31 The field is visited during processing. If this option is off,
32 the field will not be reachable by navigation keys. Please notice
33 that an invisible field appears to be inactive also.
34
35 O_AUTOSKIP
36 Skip to the next field when this one fills.
37
38 O_BLANK
39 The field is cleared whenever a character is entered at the first
40 position.
41
42 O_EDIT
43 The field can be edited.
44
45 O_NULLOK
46 Allow a blank field.
47
48 O_PASSOK
49 Validate field only if modified by user.
50
51 O_PUBLIC
52 The field contents are displayed as data is entered.
53
54 O_STATIC
55 Field buffers are fixed to field's original size. Turn this
56 option off to create a dynamic field.
57
58 O_VISIBLE
59 The field is displayed. If this option is off, display of the
60 field is suppressed.
61
62 O_WRAP
63 Words that do not fit on a line are wrapped to the next line.
64 Words are blank-separated.
65
66 These extension options are defined (extensions are off by default):
67
68 O_DYNAMIC_JUSTIFY
69 Permit dynamic fields to be justified, like static fields.
70
71 O_NO_LEFT_STRIP
72 Preserve leading whitespace in the field buffer, which is normally
73 discarded.
74
75 O_EDGE_INSERT_STAY
76 When inserting into a field up to the boundary position, option‐
77 ally delay the scrolling, so that the last inserted character
78 remains visible, but advance the cursor to reflect the insertion.
79 This allows the form library to display the inserted character in
80 one-character fields as well as allowing the library to maintain
81 consistent state.
82
84 Except for field_opts, each routine returns one of the following:
85
86 E_OK The routine succeeded.
87
88 E_BAD_ARGUMENT
89 Routine detected an incorrect or out-of-range argument.
90
91 E_CURRENT
92 The field is the current field.
93
94 E_SYSTEM_ERROR
95 System error occurred (see errno).
96
98 curses(3X), form(3X). form_field_just(3X).
99
101 The header file <form.h> automatically includes the header file
102 <curses.h>.
103
105 These routines emulate the System V forms library. They were not sup‐
106 ported on Version 7 or BSD versions.
107
109 Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S.
110 Raymond.
111
112
113
114 form_field_opts(3X)