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