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