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