curs_border.3x.html 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
  2. <!--
  3. ****************************************************************************
  4. * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
  5. * *
  6. * Permission is hereby granted, free of charge, to any person obtaining a *
  7. * copy of this software and associated documentation files (the *
  8. * "Software"), to deal in the Software without restriction, including *
  9. * without limitation the rights to use, copy, modify, merge, publish, *
  10. * distribute, distribute with modifications, sublicense, and/or sell *
  11. * copies of the Software, and to permit persons to whom the Software is *
  12. * furnished to do so, subject to the following conditions: *
  13. * *
  14. * The above copyright notice and this permission notice shall be included *
  15. * in all copies or substantial portions of the Software. *
  16. * *
  17. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
  18. * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
  19. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
  20. * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
  21. * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
  22. * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
  23. * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
  24. * *
  25. * Except as contained in this notice, the name(s) of the above copyright *
  26. * holders shall not be used in advertising or otherwise to promote the *
  27. * sale, use or other dealings in this Software without prior written *
  28. * authorization. *
  29. ****************************************************************************
  30. * @Id: curs_border.3x,v 1.19 2007/02/24 16:15:38 tom Exp @
  31. -->
  32. <HTML>
  33. <HEAD>
  34. <TITLE>curs_border 3x</TITLE>
  35. <link rev=made href="mailto:bug-ncurses@gnu.org">
  36. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  37. </HEAD>
  38. <BODY>
  39. <H1>curs_border 3x</H1>
  40. <HR>
  41. <PRE>
  42. <!-- Manpage converted by man2html 3.0.1 -->
  43. <STRONG><A HREF="curs_border.3x.html">curs_border(3x)</A></STRONG> <STRONG><A HREF="curs_border.3x.html">curs_border(3x)</A></STRONG>
  44. </PRE>
  45. <H2>NAME</H2><PRE>
  46. <STRONG>border</STRONG>, <STRONG>wborder</STRONG>, <STRONG>box</STRONG>, <STRONG>hline</STRONG>, <STRONG>whline</STRONG>, <STRONG>vline</STRONG>, <STRONG>wvline</STRONG>,
  47. <STRONG>mvhline</STRONG>, <STRONG>mvwhline</STRONG>, <STRONG>mvvline</STRONG>, <STRONG>mvwvline</STRONG> - create <STRONG>curses</STRONG>
  48. borders, horizontal and vertical lines
  49. </PRE>
  50. <H2>SYNOPSIS</H2><PRE>
  51. <STRONG>#include</STRONG> <STRONG>&lt;curses.h&gt;</STRONG>
  52. <STRONG>int</STRONG> <STRONG>border(chtype</STRONG> <STRONG>ls,</STRONG> <STRONG>chtype</STRONG> <STRONG>rs,</STRONG> <STRONG>chtype</STRONG> <STRONG>ts,</STRONG> <STRONG>chtype</STRONG> <STRONG>bs,</STRONG>
  53. <STRONG>chtype</STRONG> <STRONG>tl,</STRONG> <STRONG>chtype</STRONG> <STRONG>tr,</STRONG> <STRONG>chtype</STRONG> <STRONG>bl,</STRONG> <STRONG>chtype</STRONG> <STRONG>br);</STRONG>
  54. <STRONG>int</STRONG> <STRONG>wborder(WINDOW</STRONG> <STRONG>*win,</STRONG> <STRONG>chtype</STRONG> <STRONG>ls,</STRONG> <STRONG>chtype</STRONG> <STRONG>rs,</STRONG>
  55. <STRONG>chtype</STRONG> <STRONG>ts,</STRONG> <STRONG>chtype</STRONG> <STRONG>bs,</STRONG> <STRONG>chtype</STRONG> <STRONG>tl,</STRONG> <STRONG>chtype</STRONG> <STRONG>tr,</STRONG>
  56. <STRONG>chtype</STRONG> <STRONG>bl,</STRONG> <STRONG>chtype</STRONG> <STRONG>br);</STRONG>
  57. <STRONG>int</STRONG> <STRONG>box(WINDOW</STRONG> <STRONG>*win,</STRONG> <STRONG>chtype</STRONG> <STRONG>verch,</STRONG> <STRONG>chtype</STRONG> <STRONG>horch);</STRONG>
  58. <STRONG>int</STRONG> <STRONG>hline(chtype</STRONG> <STRONG>ch,</STRONG> <STRONG>int</STRONG> <STRONG>n);</STRONG>
  59. <STRONG>int</STRONG> <STRONG>whline(WINDOW</STRONG> <STRONG>*win,</STRONG> <STRONG>chtype</STRONG> <STRONG>ch,</STRONG> <STRONG>int</STRONG> <STRONG>n);</STRONG>
  60. <STRONG>int</STRONG> <STRONG>vline(chtype</STRONG> <STRONG>ch,</STRONG> <STRONG>int</STRONG> <STRONG>n);</STRONG>
  61. <STRONG>int</STRONG> <STRONG>wvline(WINDOW</STRONG> <STRONG>*win,</STRONG> <STRONG>chtype</STRONG> <STRONG>ch,</STRONG> <STRONG>int</STRONG> <STRONG>n);</STRONG>
  62. <STRONG>int</STRONG> <STRONG>mvhline(int</STRONG> <STRONG>y,</STRONG> <STRONG>int</STRONG> <STRONG>x,</STRONG> <STRONG>chtype</STRONG> <STRONG>ch,</STRONG> <STRONG>int</STRONG> <STRONG>n);</STRONG>
  63. <STRONG>int</STRONG> <STRONG>mvwhline(WINDOW</STRONG> <STRONG>*,</STRONG> <STRONG>int</STRONG> <STRONG>y,</STRONG> <STRONG>int</STRONG> <STRONG>x,</STRONG> <STRONG>chtype</STRONG> <STRONG>ch,</STRONG> <STRONG>int</STRONG> <STRONG>n);</STRONG>
  64. <STRONG>int</STRONG> <STRONG>mvvline(int</STRONG> <STRONG>y,</STRONG> <STRONG>int</STRONG> <STRONG>x,</STRONG> <STRONG>chtype</STRONG> <STRONG>ch,</STRONG> <STRONG>int</STRONG> <STRONG>n);</STRONG>
  65. <STRONG>int</STRONG> <STRONG>mvwvline(WINDOW</STRONG> <STRONG>*,</STRONG> <STRONG>int</STRONG> <STRONG>y,</STRONG> <STRONG>int</STRONG> <STRONG>x,</STRONG> <STRONG>chtype</STRONG> <STRONG>ch,</STRONG> <STRONG>int</STRONG> <STRONG>n);</STRONG>
  66. </PRE>
  67. <H2>DESCRIPTION</H2><PRE>
  68. The <STRONG>border</STRONG>, <STRONG>wborder</STRONG> and <STRONG>box</STRONG> routines draw a box around the
  69. edges of a window. Other than the window, each argument
  70. is a character with attributes:
  71. <EM>ls</EM> - left side,
  72. <EM>rs</EM> - right side,
  73. <EM>ts</EM> - top side,
  74. <EM>bs</EM> - bottom side,
  75. <EM>tl</EM> - top left-hand corner,
  76. <EM>tr</EM> - top right-hand corner,
  77. <EM>bl</EM> - bottom left-hand corner, and
  78. <EM>br</EM> - bottom right-hand corner.
  79. If any of these arguments is zero, then the corresponding
  80. default values (defined in <STRONG>curses.h</STRONG>) are used instead:
  81. <STRONG>ACS_VLINE</STRONG>,
  82. <STRONG>ACS_VLINE</STRONG>,
  83. <STRONG>ACS_HLINE</STRONG>,
  84. <STRONG>ACS_HLINE</STRONG>,
  85. <STRONG>ACS_ULCORNER</STRONG>,
  86. <STRONG>ACS_URCORNER</STRONG>,
  87. <STRONG>ACS_LLCORNER</STRONG>,
  88. <STRONG>ACS_LRCORNER</STRONG>.
  89. <STRONG>box(</STRONG><EM>win</EM><STRONG>,</STRONG> <EM>verch</EM><STRONG>,</STRONG> <EM>horch</EM><STRONG>)</STRONG> is a shorthand for the following
  90. call: <STRONG>wborder(</STRONG><EM>win</EM><STRONG>,</STRONG> <EM>verch</EM><STRONG>,</STRONG> <EM>verch</EM><STRONG>,</STRONG> <EM>horch</EM><STRONG>,</STRONG> <EM>horch</EM><STRONG>,</STRONG> <STRONG>0,</STRONG> <STRONG>0,</STRONG> <STRONG>0,</STRONG>
  91. <STRONG>0)</STRONG>.
  92. The <STRONG>hline</STRONG> and <STRONG>whline</STRONG> functions draw a horizontal (left to
  93. right) line using <EM>ch</EM> starting at the current cursor posi-
  94. tion in the window. The current cursor position is not
  95. changed. The line is at most <EM>n</EM> characters long, or as
  96. many as fit into the window.
  97. The <STRONG>vline</STRONG> and <STRONG>wvline</STRONG> functions draw a vertical (top to
  98. bottom) line using <EM>ch</EM> starting at the current cursor posi-
  99. tion in the window. The current cursor position is not
  100. changed. The line is at most <EM>n</EM> characters long, or as
  101. many as fit into the window.
  102. </PRE>
  103. <H2>RETURN VALUE</H2><PRE>
  104. All routines return the integer <STRONG>OK</STRONG>. The SVr4.0 manual
  105. says "or a non-negative integer if <STRONG>immedok</STRONG> is set", but
  106. this appears to be an error.
  107. X/Open does not define any error conditions. This imple-
  108. mentation returns an error if the window pointer is null.
  109. </PRE>
  110. <H2>NOTES</H2><PRE>
  111. The borders generated by these functions are <EM>inside</EM> bor-
  112. ders (this is also true of SVr4 curses, though the fact is
  113. not documented).
  114. Note that <STRONG>border</STRONG> and <STRONG>box</STRONG> may be macros.
  115. </PRE>
  116. <H2>PORTABILITY</H2><PRE>
  117. These functions are described in the XSI Curses standard,
  118. Issue 4. The standard specifies that they return <STRONG>ERR</STRONG> on
  119. failure, but specifies no error conditions.
  120. </PRE>
  121. <H2>SEE ALSO</H2><PRE>
  122. <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_outopts.3x.html">curs_outopts(3x)</A></STRONG>.
  123. <STRONG><A HREF="curs_border.3x.html">curs_border(3x)</A></STRONG>
  124. </PRE>
  125. <HR>
  126. <ADDRESS>
  127. Man(1) output converted with
  128. <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
  129. </ADDRESS>
  130. </BODY>
  131. </HTML>