ncurses 5.9 - patch 20130309
[ncurses.git] / doc / html / man / curs_border_set.3x.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
2 <!-- 
3   ****************************************************************************
4   * Copyright (c) 2002-2011,2012 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.11 2012/11/03 23:03:59 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
45
46
47
48 </PRE>
49 <H2>NAME</H2><PRE>
50        <STRONG>border_set</STRONG>, <STRONG>wborder_set</STRONG>, <STRONG>box_set</STRONG>, <STRONG>hline_set</STRONG>, <STRONG>whline_set</STRONG>,
51        <STRONG>mvhline_set</STRONG>, <STRONG>mvwhline_set</STRONG>, <STRONG>vline_set</STRONG>, <STRONG>wvline_set</STRONG>,
52        <STRONG>mvvline_set</STRONG>, <STRONG>mvwvline_set</STRONG> - create <STRONG>curses</STRONG> borders or lines
53        using complex characters and renditions
54
55
56 </PRE>
57 <H2>SYNOPSIS</H2><PRE>
58        <STRONG>#include</STRONG> <STRONG>&lt;curses.h&gt;</STRONG>
59
60        <STRONG>int</STRONG> <STRONG>border_set(</STRONG>
61           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>ls</EM>, <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>rs</EM>,
62           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>ts</EM>, <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>bs</EM>,
63           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>tl</EM>, <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>tr</EM>,
64           <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>
65        <STRONG>int</STRONG> <STRONG>wborder_set(</STRONG>
66           <STRONG>WINDOW</STRONG> <STRONG>*win</STRONG>,
67           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>ls</EM>, <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>rs</EM>,
68           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>ts</EM>, <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>bs</EM>,
69           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>tl</EM>, <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>tr</EM>,
70           <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>
71        <STRONG>int</STRONG> <STRONG>box_set(</STRONG>
72           <STRONG>WINDOW</STRONG> <STRONG>*win</STRONG>,
73           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>verch</EM>,
74           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>horch</EM><STRONG>);</STRONG>
75        <STRONG>int</STRONG> <STRONG>hline_set(</STRONG>
76           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>wch</EM>, <STRONG>int</STRONG> <EM>n</EM><STRONG>);</STRONG>
77        <STRONG>int</STRONG> <STRONG>whline_set(</STRONG>
78           <STRONG>WINDOW</STRONG> <STRONG>*</STRONG><EM>win</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>mvhline_set(</STRONG>
81           <STRONG>int</STRONG> <EM>y</EM>, <STRONG>int</STRONG> <EM>x</EM>,
82           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>wch</EM>, <STRONG>int</STRONG> <EM>n</EM><STRONG>);</STRONG>
83        <STRONG>int</STRONG> <STRONG>mvwhline_set(</STRONG>
84           <STRONG>WINDOW</STRONG> <STRONG>*</STRONG><EM>win</EM>,
85           <STRONG>int</STRONG> <EM>y</EM>, <STRONG>int</STRONG> <EM>x</EM>,
86           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>wch</EM>, <STRONG>int</STRONG> <EM>n</EM><STRONG>);</STRONG>
87        <STRONG>int</STRONG> <STRONG>vline_set(</STRONG>
88           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>wch</EM>, <STRONG>int</STRONG> <EM>n</EM><STRONG>);</STRONG>
89        <STRONG>int</STRONG> <STRONG>wvline_set(</STRONG>
90           <STRONG>WINDOW</STRONG> <STRONG>*</STRONG><EM>win</EM>,
91           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>wch</EM>, <STRONG>int</STRONG> <EM>n</EM><STRONG>);</STRONG>
92        <STRONG>int</STRONG> <STRONG>mvvline_set(</STRONG>
93           <STRONG>int</STRONG> <EM>y</EM>, <STRONG>int</STRONG> <EM>x</EM>,
94           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>wch</EM>, <STRONG>int</STRONG> <EM>n</EM><STRONG>);</STRONG>
95        <STRONG>int</STRONG> <STRONG>mvwvline_set(</STRONG>
96           <STRONG>WINDOW</STRONG> <STRONG>*</STRONG><EM>win</EM>,
97           <STRONG>int</STRONG> <EM>y</EM>, <STRONG>int</STRONG> <EM>x</EM>,
98           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>wch</EM>, <STRONG>int</STRONG> <EM>n</EM><STRONG>);</STRONG>
99
100
101 </PRE>
102 <H2>DESCRIPTION</H2><PRE>
103        The <STRONG>border_set</STRONG> and <STRONG>wborder_set</STRONG>  functions  draw  a  border
104        around  the  edges  of  the  current  or specified window.
105        These functions do not change the cursor position, and  do
106        not wrap.
107
108        Other  than the window, each argument is a complex charac-
109        ter with attributes:
110               <EM>ls</EM> - left side,
111               <EM>rs</EM> - right side,
112               <EM>ts</EM> - top side,
113               <EM>bs</EM> - bottom side,
114               <EM>tl</EM> - top left-hand corner,
115               <EM>tr</EM> - top right-hand corner,
116               <EM>bl</EM> - bottom left-hand corner, and
117               <EM>br</EM> - bottom right-hand corner.
118
119        If any of these arguments is zero, then the  corresponding
120        default values (defined in <STRONG>curses.h</STRONG>) are used instead:
121               <STRONG>WACS_VLINE</STRONG>,
122               <STRONG>WACS_VLINE</STRONG>,
123               <STRONG>WACS_HLINE</STRONG>,
124               <STRONG>WACS_HLINE</STRONG>,
125               <STRONG>WACS_ULCORNER</STRONG>,
126               <STRONG>WACS_URCORNER</STRONG>,
127               <STRONG>WACS_LLCORNER</STRONG>, and
128               <STRONG>WACS_LRCORNER</STRONG>.
129
130        <STRONG>box_set(</STRONG><EM>win</EM>, <EM>verch</EM><STRONG>,</STRONG> <EM>horch</EM><STRONG>);</STRONG> is a shorthand for the follow-
131        ing call:
132
133        <STRONG>wborder_set(</STRONG><EM>win</EM><STRONG>,</STRONG> <EM>verch</EM><STRONG>,</STRONG> <EM>verch</EM><STRONG>,</STRONG>
134            <EM>horch</EM><STRONG>,</STRONG> <EM>horch</EM><STRONG>,</STRONG> <STRONG>NULL,</STRONG> <STRONG>NULL,</STRONG> <STRONG>NULL,</STRONG> <STRONG>NULL);</STRONG>
135
136        The <STRONG>*line_set</STRONG> functions use <EM>wch</EM> to draw a line starting at
137        the current cursor position in the window.  The line is at
138        most <EM>n</EM> characters long or as many as fit into the  window.
139        The current cursor position is not changed.
140
141        The  <STRONG>hline_set</STRONG>,  <STRONG>mvhline_set</STRONG>, <STRONG>mvwhline_set</STRONG>, and <STRONG>whline_set</STRONG>
142        functions draw a line proceeding toward the last column of
143        the same line.
144
145        The  <STRONG>vline_set</STRONG>,  <STRONG>mvvline_set</STRONG>, <STRONG>mvwvline_set</STRONG>, and <STRONG>wvline_set</STRONG>
146        functions draw a line proceeding toward the last  line  of
147        the window.
148
149
150 </PRE>
151 <H2>NOTES</H2><PRE>
152        Note that <STRONG>border_set</STRONG>, <STRONG>hline_set</STRONG>, <STRONG>mvhline_set</STRONG>, <STRONG>mvvline_set</STRONG>,
153        <STRONG>mvwhline_set</STRONG>, <STRONG>mvwvline_set</STRONG>, and <STRONG>vline_set</STRONG> may be macros.
154
155
156 </PRE>
157 <H2>RETURN VALUE</H2><PRE>
158        Upon successful completion,  these  functions  return  <STRONG>OK</STRONG>.
159        Otherwise, they return <STRONG>ERR</STRONG>.
160
161        Functions  using  a window parameter return an error if it
162        is null.
163
164        Functions with a "mv" prefix first perform a cursor  move-
165        ment  using  <STRONG>wmove</STRONG>, and return an error if the position is
166        outside the window, or if the window pointer is null.
167
168
169 </PRE>
170 <H2>SEE ALSO</H2><PRE>
171        <STRONG><A HREF="ncurses.3x.html">ncurses(3x)</A></STRONG>, <STRONG><A HREF="curs_add_wch.3x.html">curs_add_wch(3x)</A></STRONG>, <STRONG><A HREF="curs_border.3x.html">curs_border(3x)</A></STRONG>,  <STRONG>curs_out-</STRONG>
172        <STRONG><A HREF="curs_outopts.3x.html">opts(3x)</A></STRONG>
173
174
175
176                                                     <STRONG><A HREF="curs_border_set.3x.html">curs_border_set(3x)</A></STRONG>
177 </PRE>
178 <HR>
179 <ADDRESS>
180 Man(1) output converted with
181 <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
182 </ADDRESS>
183 </BODY>
184 </HTML>