'\" te
.\" Copyright 1989 AT&T
.\" Portions Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH FORM_FIELD_OPTS 3CURSES "Dec 31, 1996"
.SH NAME
form_field_opts, set_field_opts, field_opts_on, field_opts_off, field_opts \-
forms field option routines
.SH SYNOPSIS
.LP
.nf
\fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-lform\fR \fB -lcurses \fR [ \fIlibrary\fR... ]
#include
\fBint\fR \fBset_field_opts\fR(\fBFIELD *\fR\fIfield\fR, \fBOPTIONS\fR \fIopts\fR);
.fi
.LP
.nf
\fBint\fR \fBset_field_opts\fR(\fBFIELD *\fR\fIfield\fR, \fBOPTIONS\fR \fIopts\fR);
.fi
.LP
.nf
\fBint\fR \fBfield_opts_on\fR(\fBFIELD *\fR\fIfield\fR, \fBOPTIONS\fR \fIopts\fR);
.fi
.LP
.nf
\fBint\fR \fBfield_opts_off\fR(\fBFIELD *\fR\fIfield\fR, \fBOPTIONS\fR \fIopts\fR);
.fi
.LP
.nf
\fBOPTIONS\fR \fBfield_opts\fR(\fBFIELD *\fR\fIfield\fR);
.fi
.SH DESCRIPTION
.sp
.LP
\fBset_field_opts()\fR turns on the named options of \fIfield\fR and turns off
all remaining options. Options are boolean values that can be OR-ed together.
.sp
.LP
\fBfield_opts_on()\fR turns on the named options; no other options are changed.
.sp
.LP
\fBfield_opts_off()\fR turns off the named options; no other options are
changed.
.sp
.LP
\fBfield_opts()\fR returns the options set for \fIfield\fR.
.sp
.ne 2
.na
\fBO_VISIBLE\fR
.ad
.RS 14n
The field is displayed.
.RE
.sp
.ne 2
.na
\fBO_ACTIVE\fR
.ad
.RS 14n
The field is visited during processing.
.RE
.sp
.ne 2
.na
\fBO_PUBLIC\fR
.ad
.RS 14n
The field contents are displayed as data is entered.
.RE
.sp
.ne 2
.na
\fBO_EDIT\fR
.ad
.RS 14n
The field can be edited.
.RE
.sp
.ne 2
.na
\fBO_WRAP\fR
.ad
.RS 14n
Words not fitting on a line are wrapped to the next line.
.RE
.sp
.ne 2
.na
\fBO_BLANK\fR
.ad
.RS 14n
The whole field is cleared if a character is entered in the first position.
.RE
.sp
.ne 2
.na
\fBO_AUTOSKIP\fR
.ad
.RS 14n
Skip to the next field when the current field becomes full.
.RE
.sp
.ne 2
.na
\fBO_NULLOK\fR
.ad
.RS 14n
A blank field is considered valid.
.RE
.sp
.ne 2
.na
\fBO_STATIC\fR
.ad
.RS 14n
The field buffers are fixed in size.
.RE
.sp
.ne 2
.na
\fBO_PASSOK\fR
.ad
.RS 14n
Validate field only if modified by user.
.RE
.SH RETURN VALUES
.sp
.LP
\fBset_field_opts\fR, \fBfield_opts_on\fR and \fBfield_opts_off\fR return one
of the following:
.sp
.ne 2
.na
\fBE_OK\fR
.ad
.RS 18n
The function returned successfully.
.RE
.sp
.ne 2
.na
\fBE_SYSTEM_ERROR\fR
.ad
.RS 18n
System error.
.RE
.sp
.ne 2
.na
\fBE_CURRENT\fR
.ad
.RS 18n
The field is the current field.
.RE
.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(7) for descriptions of the following attributes:
.sp
.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE ATTRIBUTE VALUE
_
MT-Level Unsafe
.TE
.SH SEE ALSO
.sp
.LP
.BR curses (3CURSES),
.BR forms (3CURSES),
.BR attributes (7)
.SH NOTES
.sp
.LP
The header \fB\fR automatically includes the headers \fB\fR and
\fB\fR\&.