]> ncurses.scripts.mit.edu Git - ncurses.git/blob - doc/html/man/curs_border_set.3x.html
ncurses 6.4 - patch 20240420
[ncurses.git] / doc / html / man / curs_border_set.3x.html
1 <!--
2   ****************************************************************************
3   * Copyright 2019-2023,2024 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.36 2024/04/20 21:20:07 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 2024-04-20 ncurses 6.4 Library calls</TITLE>
38 <link rel="author" href="mailto:bug-ncurses@gnu.org">
39
40 </HEAD>
41 <BODY>
42 <H1 class="no-header">curs_border_set 3x 2024-04-20 ncurses 6.4 Library calls</H1>
43 <PRE>
44 <STRONG><A HREF="curs_border_set.3x.html">curs_border_set(3x)</A></STRONG>              Library calls             <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>  -  draw
52        borders and lines in a <EM>curses</EM> window of wide characters
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>,</STRONG> <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>rs</EM><STRONG>,</STRONG>
60           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>ts</EM><STRONG>,</STRONG> <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>bs</EM><STRONG>,</STRONG>
61           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>tl</EM><STRONG>,</STRONG> <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>tr</EM><STRONG>,</STRONG>
62           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>bl</EM><STRONG>,</STRONG> <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>*</STRONG><EM>win</EM><STRONG>,</STRONG>
65           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>ls</EM><STRONG>,</STRONG> <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>rs</EM><STRONG>,</STRONG>
66           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>ts</EM><STRONG>,</STRONG> <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>bs</EM><STRONG>,</STRONG>
67           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>tl</EM><STRONG>,</STRONG> <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>tr</EM><STRONG>,</STRONG>
68           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>bl</EM><STRONG>,</STRONG> <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>*</STRONG><EM>win</EM><STRONG>,</STRONG>
71           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>verch</EM><STRONG>,</STRONG>
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>,</STRONG> <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><STRONG>,</STRONG>
77           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>wch</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>n</EM><STRONG>);</STRONG>
78        <STRONG>int</STRONG> <STRONG>mvhline_set(</STRONG>
79           <STRONG>int</STRONG> <EM>y</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>x</EM><STRONG>,</STRONG>
80           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>wch</EM><STRONG>,</STRONG> <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><STRONG>,</STRONG>
83           <STRONG>int</STRONG> <EM>y</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>x</EM><STRONG>,</STRONG>
84           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>wch</EM><STRONG>,</STRONG> <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>,</STRONG> <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><STRONG>,</STRONG>
89           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>wch</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>n</EM><STRONG>);</STRONG>
90        <STRONG>int</STRONG> <STRONG>mvvline_set(</STRONG>
91           <STRONG>int</STRONG> <EM>y</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>x</EM><STRONG>,</STRONG>
92           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>wch</EM><STRONG>,</STRONG> <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><STRONG>,</STRONG>
95           <STRONG>int</STRONG> <EM>y</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>x</EM><STRONG>,</STRONG>
96           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>wch</EM><STRONG>,</STRONG> <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
105        attributes:
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
116        values (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-RETURN-VALUE">RETURN VALUE</a></H2><PRE>
144        Upon successful completion, these functions return <STRONG>OK</STRONG>.  Otherwise, they
145        return <STRONG>ERR</STRONG>.
146
147        Functions using a window parameter return an error if it is null.
148
149        Functions  prefixed with "mv" first perform cursor movement and fail if
150        the position (<EM>y</EM>, <EM>x</EM>) is outside the window boundaries.
151
152
153 </PRE><H2><a name="h2-NOTES">NOTES</a></H2><PRE>
154        Note   that   <STRONG>border_set</STRONG>,    <STRONG>hline_set</STRONG>,    <STRONG>mvhline_set</STRONG>,    <STRONG>mvvline_set</STRONG>,
155        <STRONG>mvwhline_set</STRONG>, <STRONG>mvwvline_set</STRONG>, and <STRONG>vline_set</STRONG> may be macros.
156
157
158 </PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
159        These functions are described in X/Open Curses, Issue 4.
160
161
162 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
163        <STRONG><A HREF="ncurses.3x.html">curses(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>
164
165
166
167 ncurses 6.4                       2024-04-20               <STRONG><A HREF="curs_border_set.3x.html">curs_border_set(3x)</A></STRONG>
168 </PRE>
169 <div class="nav">
170 <ul>
171 <li><a href="#h2-NAME">NAME</a></li>
172 <li><a href="#h2-SYNOPSIS">SYNOPSIS</a></li>
173 <li><a href="#h2-DESCRIPTION">DESCRIPTION</a></li>
174 <li><a href="#h2-RETURN-VALUE">RETURN VALUE</a></li>
175 <li><a href="#h2-NOTES">NOTES</a></li>
176 <li><a href="#h2-PORTABILITY">PORTABILITY</a></li>
177 <li><a href="#h2-SEE-ALSO">SEE ALSO</a></li>
178 </ul>
179 </div>
180 </BODY>
181 </HTML>