]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/form_field_new.3x
ncurses 4.2
[ncurses.git] / man / form_field_new.3x
1 .'" $Id: form_field_new.3x,v 0.6 1997/12/06 22:07:19 tom Exp $
2 '\" t
3 .TH form_field_new 3X ""
4 .SH NAME
5 \fBform_field_new\fR - create and destroy form fields
6 .SH SYNOPSIS
7 \fB#include <form.h>\fR
8 .br
9 FIELD *new_field(int height, int width, 
10                  int toprow, int leftcol, 
11                  int offscreen, int nbuffers);
12 .br
13 FIELD *dup_field(FIELD *field, int toprow, int leftcol);
14 .br
15 FIELD *link_field(FIELD *field, int toprow, int leftcol);
16 .br
17 int free_field(FIELD *field);
18 .br
19 .SH DESCRIPTION
20 The function \fBnew_field\fR allocates a new field and initializes it from the
21 parameters given: height, width, row of upper-left corner, column of upper-left
22 corner, number off-screen rows, and number of additional working buffers.
23
24 The function \fBdup_field\fR duplicates a field at a new location.  Most
25 attributes (including current contents, size, validation type, buffer count,
26 growth threshold, justification, foreground, background, pad character,
27 options, and user pointer) are copied.  Field status and the field page bit are
28 not copied.
29
30 The function \fBlink_field\fR acts like \fBdup_field\fR, but the new field
31 shares buffers with its parent.  Attribute data is separate.
32
33 The function \fBfree_field\fR de-allocates storage associated with a field.
34 .SH RETURN VALUE
35 The function, \fBnew_field\fR, \fBdup_field\fR, \fBlink_field\fR return
36 \fBNULL\fR on error.
37
38 The function \fBfree_field\fR returns one of the following:
39 .TP 5
40 \fBE_OK\fR
41 The routine succeeded.
42 .TP 5
43 \fBE_SYSTEM_ERROR\fR
44 System error occurred (see \fBerrno\fR).
45 .TP 5
46 \fBE_BAD_ARGUMENT\fR
47 Routine detected an incorrect or out-of-range argument.
48 .SH SEE ALSO
49 \fBcurses\fR(3X), \fBform\fR(3X).
50 .SH NOTES
51 The header file \fB<form.h>\fR automatically includes the header file
52 \fB<curses.h>\fR.
53 .SH PORTABILITY
54 These routines emulate the System V forms library.  They were not supported on
55 Version 7 or BSD versions.
56
57 It may be unwise to count on the set of attributes copied by
58 \fBdup_field\fR(3X) being portable; the System V forms library documents are
59 not very explicit on what gets copied and was not.
60 .SH AUTHORS
61 Juergen Pfeifer.  Manual pages and adaptation for new curses by Eric
62 S. Raymond.
63 .\"#
64 .\"# The following sets edit modes for GNU EMACS
65 .\"# Local Variables:
66 .\"# mode:nroff
67 .\"# fill-column:79
68 .\"# End: