ncurses 6.0 - patch 20170506
[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 class="no-header">curs_border_set 3x</H1>
42 <PRE>
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><H2><a name="h2-NAME">NAME</a></H2><PRE>
49        <STRONG>border_set</STRONG>, <STRONG>wborder_set</STRONG>, <STRONG>box_set</STRONG>, <STRONG>hline_set</STRONG>, <STRONG>whline_set</STRONG>, <STRONG>mvhline_set</STRONG>,
50        <STRONG>mvwhline_set</STRONG>, <STRONG>vline_set</STRONG>, <STRONG>wvline_set</STRONG>, <STRONG>mvvline_set</STRONG>, <STRONG>mvwvline_set</STRONG> - create
51        <STRONG>curses</STRONG> borders or lines using complex characters and renditions
52
53
54 </PRE><H2><a name="h2-SYNOPSIS">SYNOPSIS</a></H2><PRE>
55        <STRONG>#include</STRONG> <STRONG>&lt;curses.h&gt;</STRONG>
56
57        <STRONG>int</STRONG> <STRONG>border_set(</STRONG>
58           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>ls</EM>, <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>rs</EM>,
59           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>ts</EM>, <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>bs</EM>,
60           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>tl</EM>, <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>tr</EM>,
61           <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>
62        <STRONG>int</STRONG> <STRONG>wborder_set(</STRONG>
63           <STRONG>WINDOW</STRONG> <STRONG>*win</STRONG>,
64           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>ls</EM>, <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>rs</EM>,
65           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>ts</EM>, <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>bs</EM>,
66           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>tl</EM>, <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>tr</EM>,
67           <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>
68        <STRONG>int</STRONG> <STRONG>box_set(</STRONG>
69           <STRONG>WINDOW</STRONG> <STRONG>*win</STRONG>,
70           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>verch</EM>,
71           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>horch</EM><STRONG>);</STRONG>
72        <STRONG>int</STRONG> <STRONG>hline_set(</STRONG>
73           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>wch</EM>, <STRONG>int</STRONG> <EM>n</EM><STRONG>);</STRONG>
74        <STRONG>int</STRONG> <STRONG>whline_set(</STRONG>
75           <STRONG>WINDOW</STRONG> <STRONG>*</STRONG><EM>win</EM>,
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>mvhline_set(</STRONG>
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>mvwhline_set(</STRONG>
81           <STRONG>WINDOW</STRONG> <STRONG>*</STRONG><EM>win</EM>,
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>vline_set(</STRONG>
85           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>wch</EM>, <STRONG>int</STRONG> <EM>n</EM><STRONG>);</STRONG>
86        <STRONG>int</STRONG> <STRONG>wvline_set(</STRONG>
87           <STRONG>WINDOW</STRONG> <STRONG>*</STRONG><EM>win</EM>,
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>mvvline_set(</STRONG>
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        <STRONG>int</STRONG> <STRONG>mvwvline_set(</STRONG>
93           <STRONG>WINDOW</STRONG> <STRONG>*</STRONG><EM>win</EM>,
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
97
98 </PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
99        The <STRONG>border_set</STRONG> and <STRONG>wborder_set</STRONG> functions draw a border around the edges
100        of the current or specified window.  These functions do not change  the
101        cursor position, and do not wrap.
102
103        Other  than  the  window, each argument is a complex character with at-
104        tributes:
105               <EM>ls</EM> - left side,
106               <EM>rs</EM> - right side,
107               <EM>ts</EM> - top side,
108               <EM>bs</EM> - bottom side,
109               <EM>tl</EM> - top left-hand corner,
110               <EM>tr</EM> - top right-hand corner,
111               <EM>bl</EM> - bottom left-hand corner, and
112               <EM>br</EM> - bottom right-hand corner.
113
114        If any of these arguments is zero, then the corresponding default  val-
115        ues (defined in <STRONG>curses.h</STRONG>) are used instead:
116               <STRONG>WACS_VLINE</STRONG>,
117               <STRONG>WACS_VLINE</STRONG>,
118               <STRONG>WACS_HLINE</STRONG>,
119               <STRONG>WACS_HLINE</STRONG>,
120               <STRONG>WACS_ULCORNER</STRONG>,
121               <STRONG>WACS_URCORNER</STRONG>,
122               <STRONG>WACS_LLCORNER</STRONG>, and
123               <STRONG>WACS_LRCORNER</STRONG>.
124
125        <STRONG>box_set(</STRONG><EM>win</EM>, <EM>verch</EM><STRONG>,</STRONG> <EM>horch</EM><STRONG>);</STRONG> is a shorthand for the following call:
126
127        <STRONG>wborder_set(</STRONG><EM>win</EM><STRONG>,</STRONG> <EM>verch</EM><STRONG>,</STRONG> <EM>verch</EM><STRONG>,</STRONG>
128            <EM>horch</EM><STRONG>,</STRONG> <EM>horch</EM><STRONG>,</STRONG> <STRONG>NULL,</STRONG> <STRONG>NULL,</STRONG> <STRONG>NULL,</STRONG> <STRONG>NULL);</STRONG>
129
130        The  <STRONG>*line_set</STRONG> functions use <EM>wch</EM> to draw a line starting at the current
131        cursor position in the window.  The line is at most <EM>n</EM>  characters  long
132        or  as many as fit into the window.  The current cursor position is not
133        changed.
134
135        The <STRONG>hline_set</STRONG>, <STRONG>mvhline_set</STRONG>, <STRONG>mvwhline_set</STRONG>, and <STRONG>whline_set</STRONG> functions draw
136        a line proceeding toward the last column of the same line.
137
138        The <STRONG>vline_set</STRONG>, <STRONG>mvvline_set</STRONG>, <STRONG>mvwvline_set</STRONG>, and <STRONG>wvline_set</STRONG> functions draw
139        a line proceeding toward the last line of the window.
140
141
142 </PRE><H2><a name="h2-NOTES">NOTES</a></H2><PRE>
143        Note  that  <STRONG>border_set</STRONG>,  <STRONG>hline_set</STRONG>,  <STRONG>mvhline_set</STRONG>,  <STRONG>mvvline_set</STRONG>,   <STRONG>mvwh-</STRONG>
144        <STRONG>line_set</STRONG>, <STRONG>mvwvline_set</STRONG>, and <STRONG>vline_set</STRONG> may be macros.
145
146
147 </PRE><H2><a name="h2-RETURN-VALUE">RETURN VALUE</a></H2><PRE>
148        Upon successful completion, these functions return <STRONG>OK</STRONG>.  Otherwise, they
149        return <STRONG>ERR</STRONG>.
150
151        Functions using a window parameter return an error if it is null.
152
153        Functions with a "mv" prefix first  perform  a  cursor  movement  using
154        <STRONG>wmove</STRONG>, and return an error if the position is outside the window, or if
155        the window pointer is null.
156
157
158 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
159        <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>
160
161
162
163                                                            <STRONG><A HREF="curs_border_set.3x.html">curs_border_set(3x)</A></STRONG>
164 </PRE>
165 <div class="nav">
166 <ul>
167 <li><a href="#h2-NAME">NAME</a></li>
168 <li><a href="#h2-SYNOPSIS">SYNOPSIS</a></li>
169 <li><a href="#h2-DESCRIPTION">DESCRIPTION</a></li>
170 <li><a href="#h2-NOTES">NOTES</a></li>
171 <li><a href="#h2-RETURN-VALUE">RETURN VALUE</a></li>
172 <li><a href="#h2-SEE-ALSO">SEE ALSO</a></li>
173 </ul>
174 </div>
175 </BODY>
176 </HTML>