]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/form_field_new.3x
969152057d6d9cb4abc93d3abe2c00092ebd4d60
[ncurses.git] / man / form_field_new.3x
1 '\" t
2 .\"***************************************************************************
3 .\" Copyright (c) 1998,2002 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_new.3x,v 1.11 2002/02/16 22:39:52 tom Exp $
31 .TH form_field_new 3X ""
32 .SH NAME
33 \fBform_field_new\fR - create and destroy form fields
34 .SH SYNOPSIS
35 \fB#include <form.h>\fR
36 .br
37 FIELD *new_field(int height, int width,
38                  int toprow, int leftcol,
39                  int offscreen, int nbuffers);
40 .br
41 FIELD *dup_field(FIELD *field, int toprow, int leftcol);
42 .br
43 FIELD *link_field(FIELD *field, int toprow, int leftcol);
44 .br
45 int free_field(FIELD *field);
46 .br
47 .SH DESCRIPTION
48 The function \fBnew_field\fR allocates a new field and initializes it from the
49 parameters given: height, width, row of upper-left corner, column of upper-left
50 corner, number off-screen rows, and number of additional working buffers.
51
52 The function \fBdup_field\fR duplicates a field at a new location.  Most
53 attributes (including current contents, size, validation type, buffer count,
54 growth threshold, justification, foreground, background, pad character,
55 options, and user pointer) are copied.  Field status and the field page bit are
56 not copied.
57
58 The function \fBlink_field\fR acts like \fBdup_field\fR, but the new field
59 shares buffers with its parent.  Attribute data is separate.
60
61 The function \fBfree_field\fR de-allocates storage associated with a field.
62 .SH RETURN VALUE
63 The function, \fBnew_field\fR, \fBdup_field\fR, \fBlink_field\fR return
64 \fBNULL\fR on error.
65
66 The function \fBfree_field\fR returns one of the following:
67 .TP 5
68 \fBE_OK\fR
69 The routine succeeded.
70 .TP 5
71 \fBE_SYSTEM_ERROR\fR
72 System error occurred (see \fBerrno\fR).
73 .TP 5
74 \fBE_BAD_ARGUMENT\fR
75 Routine detected an incorrect or out-of-range argument.
76 .SH SEE ALSO
77 \fBcurses\fR(3X), \fBform\fR(3X).
78 .SH NOTES
79 The header file \fB<form.h>\fR automatically includes the header file
80 \fB<curses.h>\fR.
81 .SH PORTABILITY
82 These routines emulate the System V forms library.  They were not supported on
83 Version 7 or BSD versions.
84
85 It may be unwise to count on the set of attributes copied by
86 \fBdup_field\fR(3X) being portable; the System V forms library documents are
87 not very explicit on what gets copied and was not.
88 .SH AUTHORS
89 Juergen Pfeifer.  Manual pages and adaptation for new curses by Eric
90 S. Raymond.
91 .\"#
92 .\"# The following sets edit modes for GNU EMACS
93 .\"# Local Variables:
94 .\"# mode:nroff
95 .\"# fill-column:79
96 .\"# End: