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