curs_border.3x 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. .\"***************************************************************************
  2. .\" Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
  3. .\" *
  4. .\" Permission is hereby granted, free of charge, to any person obtaining a *
  5. .\" copy of this software and associated documentation files (the *
  6. .\" "Software"), to deal in the Software without restriction, including *
  7. .\" without limitation the rights to use, copy, modify, merge, publish, *
  8. .\" distribute, distribute with modifications, sublicense, and/or sell *
  9. .\" copies of the Software, and to permit persons to whom the Software is *
  10. .\" furnished to do so, subject to the following conditions: *
  11. .\" *
  12. .\" The above copyright notice and this permission notice shall be included *
  13. .\" in all copies or substantial portions of the Software. *
  14. .\" *
  15. .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
  16. .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
  17. .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
  18. .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
  19. .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
  20. .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
  21. .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
  22. .\" *
  23. .\" Except as contained in this notice, the name(s) of the above copyright *
  24. .\" holders shall not be used in advertising or otherwise to promote the *
  25. .\" sale, use or other dealings in this Software without prior written *
  26. .\" authorization. *
  27. .\"***************************************************************************
  28. .\"
  29. .\" $Id: curs_border.3x,v 1.19 2007/02/24 16:15:38 tom Exp $
  30. .TH curs_border 3X ""
  31. .na
  32. .hy 0
  33. .SH NAME
  34. \fBborder\fR,
  35. \fBwborder\fR,
  36. \fBbox\fR,
  37. \fBhline\fR,
  38. \fBwhline\fR,
  39. \fBvline\fR,
  40. \fBwvline\fR,
  41. \fBmvhline\fR,
  42. \fBmvwhline\fR,
  43. \fBmvvline\fR,
  44. \fBmvwvline\fR - create \fBcurses\fR borders, horizontal and vertical lines
  45. .ad
  46. .hy
  47. .SH SYNOPSIS
  48. \fB#include <curses.h>\fR
  49. .br
  50. \fBint border(chtype ls, chtype rs, chtype ts, chtype bs,\fR
  51. \fBchtype tl, chtype tr, chtype bl, chtype br);\fR
  52. .br
  53. \fBint wborder(WINDOW *win, chtype ls, chtype rs,\fR
  54. \fBchtype ts, chtype bs, chtype tl, chtype tr,\fR
  55. \fBchtype bl, chtype br);\fR
  56. .br
  57. \fBint box(WINDOW *win, chtype verch, chtype horch);\fR
  58. .br
  59. \fBint hline(chtype ch, int n);\fR
  60. .br
  61. \fBint whline(WINDOW *win, chtype ch, int n);\fR
  62. .br
  63. \fBint vline(chtype ch, int n);\fR
  64. .br
  65. \fBint wvline(WINDOW *win, chtype ch, int n);\fR
  66. .br
  67. \fBint mvhline(int y, int x, chtype ch, int n);\fR
  68. .br
  69. \fBint mvwhline(WINDOW *, int y, int x, chtype ch, int n);\fR
  70. .br
  71. \fBint mvvline(int y, int x, chtype ch, int n);\fR
  72. .br
  73. \fBint mvwvline(WINDOW *, int y, int x, chtype ch, int n);\fR
  74. .br
  75. .SH DESCRIPTION
  76. The \fBborder\fR, \fBwborder\fR and \fBbox\fR routines
  77. draw a box around the edges of a window.
  78. Other than the window, each argument is a character with attributes:
  79. .sp
  80. .RS
  81. \fIls\fR - left side,
  82. .br
  83. \fIrs\fR - right side,
  84. .br
  85. \fIts\fR - top side,
  86. .br
  87. \fIbs\fR - bottom side,
  88. .br
  89. \fItl\fR - top left-hand corner,
  90. .br
  91. \fItr\fR - top right-hand corner,
  92. .br
  93. \fIbl\fR - bottom left-hand corner, and
  94. .br
  95. \fIbr\fR - bottom right-hand corner.
  96. .RE
  97. .PP
  98. If any of these arguments is zero, then the corresponding
  99. default values (defined in \fBcurses.h\fR) are used instead:
  100. .sp
  101. .RS
  102. \fBACS_VLINE\fR,
  103. .br
  104. \fBACS_VLINE\fR,
  105. .br
  106. \fBACS_HLINE\fR,
  107. .br
  108. \fBACS_HLINE\fR,
  109. .br
  110. \fBACS_ULCORNER\fR,
  111. .br
  112. \fBACS_URCORNER\fR,
  113. .br
  114. \fBACS_LLCORNER\fR,
  115. .br
  116. \fBACS_LRCORNER\fR.
  117. .RE
  118. .PP
  119. \fBbox(\fR\fIwin\fR\fB, \fR\fIverch\fR\fB, \fR\fIhorch\fR\fB)\fR is a shorthand
  120. for the following call: \fBwborder(\fR\fIwin\fR\fB,\fR \fIverch\fR\fB,\fR
  121. \fIverch\fR\fB,\fR \fIhorch\fR\fB,\fR \fIhorch\fR\fB, 0, 0, 0, 0)\fR.
  122. .PP
  123. The \fBhline\fR and \fBwhline\fR functions draw a horizontal (left to right)
  124. line using \fIch\fR starting at the current cursor position in the window. The
  125. current cursor position is not changed. The line is at most \fIn\fR characters
  126. long, or as many as fit into the window.
  127. .PP
  128. The \fBvline\fR and \fBwvline\fR functions draw a vertical (top to bottom) line
  129. using \fIch\fR starting at the current cursor position in the window. The
  130. current cursor position is not changed. The line is at most \fIn\fR characters
  131. long, or as many as fit into the window.
  132. .SH RETURN VALUE
  133. All routines return the integer \fBOK\fR. The SVr4.0 manual says "or a
  134. non-negative integer if \fBimmedok\fR is set", but this appears to be an error.
  135. .PP
  136. X/Open does not define any error conditions.
  137. This implementation returns an error
  138. if the window pointer is null.
  139. .SH NOTES
  140. The borders generated by these functions are \fIinside\fR borders (this
  141. is also true of SVr4 curses, though the fact is not documented).
  142. .PP
  143. Note that \fBborder\fR and \fBbox\fR may be macros.
  144. .SH PORTABILITY
  145. These functions are described in the XSI Curses standard, Issue 4.
  146. The standard specifies that they return \fBERR\fR on failure,
  147. but specifies no error conditions.
  148. .SH SEE ALSO
  149. \fBcurses\fR(3X), \fBcurs_outopts\fR(3X).
  150. .\"#
  151. .\"# The following sets edit modes for GNU EMACS
  152. .\"# Local Variables:
  153. .\"# mode:nroff
  154. .\"# fill-column:79
  155. .\"# End: