'\" 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_NEW 3CURSES "Dec 31, 1996"
.SH NAME
form_field_new, new_field, dup_field, link_field, free_field \- create and
destroy forms fields
.SH SYNOPSIS
.LP
.nf
\fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-lform\fR \fB -lcurses \fR [ \fIlibrary\fR... ]
#include
\fBFIELD *\fR\fBnew_field\fR(\fBint\fR \fIr\fR, \fBint\fR \fIc\fR, \fBint\fR \fIfrow\fR, \fBint\fR \fIfcol\fR, \fBint\fR \fInrow\fR, \fBint\fR \fIncol\fR);
.fi
.LP
.nf
\fBFIELD *\fR\fBdup_field\fR(\fBFIELD *\fR\fIfield\fR, \fBint\fR \fIfrow\fR, \fBint\fR \fIfcol\fR);
.fi
.LP
.nf
\fBFIELD *\fR\fBlink_field\fR(\fBFIELD *\fR\fIfield\fR, \fBint\fR \fIfrow\fR, \fBint\fR \fIfcol\fR);
.fi
.LP
.nf
\fBint\fR \fBfree_field\fR(\fBFIELD *\fR\fIfield\fR);
.fi
.SH DESCRIPTION
.LP
\fBnew_field()\fR creates a new field with \fIr\fR rows and \fIc\fR columns,
starting at \fIfrow\fR, \fIfcol\fR, in the subwindow of a form. \fInrow\fR is
the number of off-screen rows and \fInbuf\fR is the number of additional
working buffers. This routine returns a pointer to the new field.
.sp
.LP
\fBdup_field()\fR duplicates \fIfield\fR at the specified location. All field
attributes are duplicated, including the current contents of the field buffers.
.sp
.LP
\fBlink_field()\fR also duplicates \fIfield\fR at the specified location.
However, unlike \fBdup_field()\fR, the new field shares the field buffers with
the original field. After creation, the attributes of the new field can be
changed without affecting the original field.
.sp
.LP
\fBfree_field()\fR frees the storage allocated for \fIfield\fR.
.SH RETURN VALUES
.LP
Routines that return pointers return \fINULL\fR on error. \fBfree_field()\fR
returns one of the following:
.sp
.ne 2
.na
\fBE_OK\fR
.ad
.RS 18n
The function returned successfully.
.RE
.sp
.ne 2
.na
\fBE_CONNECTED\fR
.ad
.RS 18n
The field is already connected to a form.
.RE
.sp
.ne 2
.na
\fBE_SYSTEM_ERROR\fR
.ad
.RS 18n
System error.
.RE
.sp
.ne 2
.na
\fBE_BAD_ARGUMENT\fR
.ad
.RS 18n
An argument is incorrect.
.RE
.SH ATTRIBUTES
.LP
See \fBattributes\fR(5) 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
.LP
\fBcurses\fR(3CURSES), \fBforms\fR(3CURSES), \fBattributes\fR(5)
.SH NOTES
.LP
The header \fB\fR automatically includes the headers \fB\fR and
\fB\fR\&.