curs_border_set.3x.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
  2. <!--
  3. ****************************************************************************
  4. * Copyright (c) 2002-2004,2005 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_set.3x,v 1.6 2005/05/15 16:17:37 tom Exp @
  31. -->
  32. <HTML>
  33. <HEAD>
  34. <TITLE>curs_border_set 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_set 3x</H1>
  40. <HR>
  41. <PRE>
  42. <!-- Manpage converted by man2html 3.0.1 -->
  43. <STRONG><A HREF="curs_border_set.3x.html">curs_border_set(3x)</A></STRONG> <STRONG><A HREF="curs_border_set.3x.html">curs_border_set(3x)</A></STRONG>
  44. </PRE>
  45. <H2>NAME</H2><PRE>
  46. <STRONG>border_set</STRONG>, <STRONG>wborder_set</STRONG>, <STRONG>box_set</STRONG>, <STRONG>hline_set</STRONG>, <STRONG>whline_set</STRONG>,
  47. <STRONG>mvhline_set</STRONG>, <STRONG>mvwhline_set</STRONG>, <STRONG>vline_set</STRONG>, <STRONG>wvline_set</STRONG>,
  48. <STRONG>mvvline_set</STRONG>, <STRONG>mvwvline_set</STRONG> - create <STRONG>curses</STRONG> borders or lines
  49. using complex characters and renditions
  50. </PRE>
  51. <H2>SYNOPSIS</H2><PRE>
  52. <STRONG>#include</STRONG> <STRONG>&lt;curses.h&gt;</STRONG>
  53. <STRONG>int</STRONG> <STRONG>border_set(</STRONG>
  54. <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>ls</EM>, <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>rs</EM>,
  55. <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>ts</EM>, <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>bs</EM>,
  56. <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>tl</EM>, <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>tr</EM>,
  57. <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>bl</EM>, <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>br</EM> <STRONG>);</STRONG>
  58. <STRONG>int</STRONG> <STRONG>wborder_set(</STRONG>
  59. <STRONG>WINDOW</STRONG> <STRONG>*win</STRONG>,
  60. <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>ls</EM>, <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>rs</EM>,
  61. <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>ts</EM>, <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>bs</EM>,
  62. <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>tl</EM>, <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>tr</EM>,
  63. <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>bl</EM>, <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>br</EM><STRONG>);</STRONG>
  64. <STRONG>int</STRONG> <STRONG>box_set(</STRONG>
  65. <STRONG>WINDOW</STRONG> <STRONG>*win</STRONG>,
  66. <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>verch</EM>,
  67. <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>horch</EM><STRONG>);</STRONG>
  68. <STRONG>int</STRONG> <STRONG>hline_set(</STRONG>
  69. <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>wch</EM>, <STRONG>int</STRONG> <EM>n</EM><STRONG>);</STRONG>
  70. <STRONG>int</STRONG> <STRONG>whline_set(</STRONG>
  71. <STRONG>WINDOW</STRONG> <STRONG>*</STRONG><EM>win</EM>,
  72. <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>wch</EM>, <STRONG>int</STRONG> <EM>n</EM><STRONG>);</STRONG>
  73. <STRONG>int</STRONG> <STRONG>mvhline_set(</STRONG>
  74. <STRONG>int</STRONG> <EM>y</EM>, <STRONG>int</STRONG> <EM>x</EM>,
  75. <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>wch</EM>, <STRONG>int</STRONG> <EM>n</EM><STRONG>);</STRONG>
  76. <STRONG>int</STRONG> <STRONG>mvwhline_set(</STRONG>
  77. <STRONG>WINDOW</STRONG> <STRONG>*</STRONG><EM>win</EM>,
  78. <STRONG>int</STRONG> <EM>y</EM>, <STRONG>int</STRONG> <EM>x</EM>,
  79. <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>wch</EM>, <STRONG>int</STRONG> <EM>n</EM><STRONG>);</STRONG>
  80. <STRONG>int</STRONG> <STRONG>vline_set(</STRONG>
  81. <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>wch</EM>, <STRONG>int</STRONG> <EM>n</EM><STRONG>);</STRONG>
  82. <STRONG>int</STRONG> <STRONG>wvline_set(</STRONG>
  83. <STRONG>WINDOW</STRONG> <STRONG>*</STRONG><EM>win</EM>,
  84. <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>wch</EM>, <STRONG>int</STRONG> <EM>n</EM><STRONG>);</STRONG>
  85. <STRONG>int</STRONG> <STRONG>mvvline_set(</STRONG>
  86. <STRONG>int</STRONG> <EM>y</EM>, <STRONG>int</STRONG> <EM>x</EM>,
  87. <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>wch</EM>, <STRONG>int</STRONG> <EM>n</EM><STRONG>);</STRONG>
  88. <STRONG>int</STRONG> <STRONG>mvwvline_set(</STRONG>
  89. <STRONG>WINDOW</STRONG> <STRONG>*</STRONG><EM>win</EM>,
  90. <STRONG>int</STRONG> <EM>y</EM>, <STRONG>int</STRONG> <EM>x</EM>,
  91. <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>wch</EM>, <STRONG>int</STRONG> <EM>n</EM><STRONG>);</STRONG>
  92. </PRE>
  93. <H2>DESCRIPTION</H2><PRE>
  94. The <STRONG>border_set</STRONG> and <STRONG>wborder_set</STRONG> functions draw a border
  95. around the edges of the current or specified window.
  96. These functions do not change the cursor position, and do
  97. not wrap.
  98. Other than the window, each argument is a complex charac-
  99. ter with attributes:
  100. <EM>ls</EM> - left side,
  101. <EM>rs</EM> - right side,
  102. <EM>ts</EM> - top side,
  103. <EM>bs</EM> - bottom side,
  104. <EM>tl</EM> - top left-hand corner,
  105. <EM>tr</EM> - top right-hand corner,
  106. <EM>bl</EM> - bottom left-hand corner, and
  107. <EM>br</EM> - bottom right-hand corner.
  108. If any of these arguments is zero, then the corresponding
  109. default values (defined in <STRONG>curses.h</STRONG>) are used instead:
  110. <STRONG>WACS_VLINE</STRONG>,
  111. <STRONG>WACS_VLINE</STRONG>,
  112. <STRONG>WACS_HLINE</STRONG>,
  113. <STRONG>WACS_HLINE</STRONG>,
  114. <STRONG>WACS_ULCORNER</STRONG>,
  115. <STRONG>WACS_URCORNER</STRONG>,
  116. <STRONG>WACS_LLCORNER</STRONG>, and
  117. <STRONG>WACS_LRCORNER</STRONG>.
  118. <STRONG>box_set(</STRONG><EM>win</EM>, <EM>verch</EM><STRONG>,</STRONG> <EM>horch</EM><STRONG>);</STRONG> is a shorthand for the follow-
  119. ing call:
  120. <STRONG>wborder_set(</STRONG><EM>win</EM><STRONG>,</STRONG> <EM>verch</EM><STRONG>,</STRONG> <EM>verch</EM><STRONG>,</STRONG>
  121. <EM>horch</EM><STRONG>,</STRONG> <EM>horch</EM><STRONG>,</STRONG> <STRONG>NULL,</STRONG> <STRONG>NULL,</STRONG> <STRONG>NULL,</STRONG> <STRONG>NULL);</STRONG>
  122. The <STRONG>*line_set</STRONG> functions use <EM>wch</EM> to draw a line starting at
  123. the current cursor position in the window. The line is at
  124. most <EM>n</EM> characters long or as many as fit into the window.
  125. The current cursor position is not changed.
  126. The <STRONG>hline_set</STRONG>, <STRONG>mvhline_set</STRONG>, <STRONG>mvwhline_set</STRONG>, and <STRONG>whline_set</STRONG>
  127. functions draw a line proceeding toward the last column of
  128. the same line.
  129. The <STRONG>vline_set</STRONG>, <STRONG>mvvline_set</STRONG>, <STRONG>mvwvline_set</STRONG>, and <STRONG>wvline_set</STRONG>
  130. functions draw a line proceeding toward the last line of
  131. the window.
  132. </PRE>
  133. <H2>NOTES</H2><PRE>
  134. Note that <STRONG>border_set</STRONG>, <STRONG>hline_set</STRONG>, <STRONG>mvhline_set</STRONG>, <STRONG>mvvline_set</STRONG>,
  135. <STRONG>mvwhline_set</STRONG>, <STRONG>mvwvline_set</STRONG>, and <STRONG>vline_set</STRONG> may be macros.
  136. </PRE>
  137. <H2>RETURN VALUES</H2><PRE>
  138. Upon successful completion, these functions return <STRONG>OK</STRONG>.
  139. Otherwise, they return <STRONG>ERR</STRONG>.
  140. Functions using a window parameter return an error if it
  141. is null.
  142. </PRE>
  143. <H2>SEE ALSO</H2><PRE>
  144. <STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG>, <STRONG><A HREF="curs_border.3x.html">curs_border(3x)</A></STRONG>, <STRONG><A HREF="curs_outopts.3x.html">curs_outopts(3x)</A></STRONG>
  145. <STRONG><A HREF="curs_border_set.3x.html">curs_border_set(3x)</A></STRONG>
  146. </PRE>
  147. <HR>
  148. <ADDRESS>
  149. Man(1) output converted with
  150. <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
  151. </ADDRESS>
  152. </BODY>
  153. </HTML>