form_field_new.3x 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. '\" t
  2. .\"***************************************************************************
  3. .\" Copyright (c) 1998-2006,2007 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.16 2007/06/02 20:40:07 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. .PP
  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. .PP
  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. .PP
  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. They set errno according to their success:
  66. .TP 5
  67. .B E_OK
  68. The routine succeeded.
  69. .TP 5
  70. .B E_BAD_ARGUMENT
  71. Routine detected an incorrect or out-of-range argument.
  72. .TP 5
  73. .B E_SYSTEM_ERROR
  74. System error occurred, e.g., malloc failure.
  75. .PP
  76. The function \fBfree_field\fR returns one of the following:
  77. .TP 5
  78. .B E_OK
  79. The routine succeeded.
  80. .TP 5
  81. .B E_BAD_ARGUMENT
  82. Routine detected an incorrect or out-of-range argument.
  83. .TP 5
  84. .B E_CONNECTED
  85. field is connected.
  86. .SH SEE ALSO
  87. \fBcurses\fR(3X), \fBform\fR(3X).
  88. .SH NOTES
  89. The header file \fB<form.h>\fR automatically includes the header file
  90. \fB<curses.h>\fR.
  91. .SH PORTABILITY
  92. These routines emulate the System V forms library. They were not supported on
  93. Version 7 or BSD versions.
  94. .PP
  95. It may be unwise to count on the set of attributes copied by
  96. \fBdup_field\fR being portable; the System V forms library documents are
  97. not very explicit about what gets copied and what does not.
  98. .SH AUTHORS
  99. Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
  100. S. Raymond.
  101. .\"#
  102. .\"# The following sets edit modes for GNU EMACS
  103. .\"# Local Variables:
  104. .\"# mode:nroff
  105. .\"# fill-column:79
  106. .\"# End: