2 <BODY BGCOLOR="#99ccbb" TEXT="#000000" LINK="#4060b0" VLINK="#000080" ALINK="#ff4040">
4 <STRONG>form_field_new</STRONG> - create and destroy form fields
9 <STRONG>#include</STRONG> <STRONG><form.h></STRONG>
10 FIELD *new_field(int height, int width,
11 int toprow, int leftcol,
12 int offscreen, int nbuffers);
13 FIELD *dup_field(FIELD *field, int toprow, int leftcol);
14 FIELD *link_field(FIELD *field, int toprow, int leftcol);
15 int free_field(FIELD *field);
19 <H2>DESCRIPTION</H2><PRE>
20 The function <STRONG>new_field</STRONG> allocates a new field and initial-
21 izes it from the parameters given: height, width, row of
22 upper-left corner, column of upper-left corner, number
23 off-screen rows, and number of additional working buffers.
25 The function <STRONG>dup_field</STRONG> duplicates a field at a new loca-
26 tion. Most attributes (including current contents, size,
27 validation type, buffer count, growth threshold, justifi-
28 cation, foreground, background, pad character, options,
29 and user pointer) are copied. Field status and the field
30 page bit are not copied.
32 The function <STRONG>link_field</STRONG> acts like <STRONG>dup_field</STRONG>, but the new
33 field shares buffers with its parent. Attribute data is
36 The function <STRONG>free_field</STRONG> de-allocates storage associated
41 <H2>RETURN VALUE</H2><PRE>
42 The function, <STRONG>new_field</STRONG>, <STRONG>dup_field</STRONG>, <STRONG>link_field</STRONG> return <STRONG>NULL</STRONG>
45 The function <STRONG>free_field</STRONG> returns one of the following:
47 <STRONG>E_OK</STRONG> The routine succeeded.
49 <STRONG>E_SYSTEM_ERROR</STRONG>
50 System error occurred (see <STRONG>errno</STRONG>).
52 <STRONG>E_BAD_ARGUMENT</STRONG>
53 Routine detected an incorrect or out-of-range argu-
58 <H2>SEE ALSO</H2><PRE>
59 <STRONG><A HREF="ncurses.3x.html">curses(3X)</A></STRONG>, <STRONG><A HREF="form.3x.html">form(3X)</A></STRONG>.
64 The header file <STRONG><form.h></STRONG> automatically includes the header
65 file <STRONG><curses.h></STRONG>.
66 These routines emulate the System V forms library. They
67 were not supported on Version 7 or BSD versions.
69 It may be unwise to count on the set of attributes copied
70 by <STRONG><A HREF="dup_field.3x.html">dup_field(3X)</A></STRONG> being portable; the System V forms
71 library documents are not very explicit on what gets
77 Juergen Pfeifer. Manual pages and adaptation for new
78 curses by Eric S. Raymond.