2 ****************************************************************************
3 * Copyright (c) 2002-2011,2012 Free Software Foundation, Inc. *
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: *
13 * The above copyright notice and this permission notice shall be included *
14 * in all copies or substantial portions of the Software. *
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. *
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 *
28 ****************************************************************************
29 * @Id: curs_border_set.3x,v 1.11 2012/11/03 23:03:59 tom Exp @
31 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
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">
41 <H1 class="no-header">curs_border_set 3x</H1>
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>
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>,
50 <STRONG>mvhline_set</STRONG>, <STRONG>mvwhline_set</STRONG>, <STRONG>vline_set</STRONG>, <STRONG>wvline_set</STRONG>,
51 <STRONG>mvvline_set</STRONG>, <STRONG>mvwvline_set</STRONG> - create <STRONG>curses</STRONG> borders or lines
52 using complex characters and renditions
55 </PRE><H2><a name="h2-SYNOPSIS">SYNOPSIS</a></H2><PRE>
56 <STRONG>#include</STRONG> <STRONG><curses.h></STRONG>
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>
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
101 around the edges of the current or specified window.
102 These functions do not change the cursor position, and do
105 Other than the window, each argument is a complex charac-
107 <EM>ls</EM> - left side,
108 <EM>rs</EM> - right side,
109 <EM>ts</EM> - top side,
110 <EM>bs</EM> - bottom side,
111 <EM>tl</EM> - top left-hand corner,
112 <EM>tr</EM> - top right-hand corner,
113 <EM>bl</EM> - bottom left-hand corner, and
114 <EM>br</EM> - bottom right-hand corner.
116 If any of these arguments is zero, then the corresponding
117 default values (defined in <STRONG>curses.h</STRONG>) are used instead:
118 <STRONG>WACS_VLINE</STRONG>,
119 <STRONG>WACS_VLINE</STRONG>,
120 <STRONG>WACS_HLINE</STRONG>,
121 <STRONG>WACS_HLINE</STRONG>,
122 <STRONG>WACS_ULCORNER</STRONG>,
123 <STRONG>WACS_URCORNER</STRONG>,
124 <STRONG>WACS_LLCORNER</STRONG>, and
125 <STRONG>WACS_LRCORNER</STRONG>.
127 <STRONG>box_set(</STRONG><EM>win</EM>, <EM>verch</EM><STRONG>,</STRONG> <EM>horch</EM><STRONG>);</STRONG> is a shorthand for the follow-
130 <STRONG>wborder_set(</STRONG><EM>win</EM><STRONG>,</STRONG> <EM>verch</EM><STRONG>,</STRONG> <EM>verch</EM><STRONG>,</STRONG>
131 <EM>horch</EM><STRONG>,</STRONG> <EM>horch</EM><STRONG>,</STRONG> <STRONG>NULL,</STRONG> <STRONG>NULL,</STRONG> <STRONG>NULL,</STRONG> <STRONG>NULL);</STRONG>
133 The <STRONG>*line_set</STRONG> functions use <EM>wch</EM> to draw a line starting at
134 the current cursor position in the window. The line is at
135 most <EM>n</EM> characters long or as many as fit into the window.
136 The current cursor position is not changed.
138 The <STRONG>hline_set</STRONG>, <STRONG>mvhline_set</STRONG>, <STRONG>mvwhline_set</STRONG>, and <STRONG>whline_set</STRONG>
139 functions draw a line proceeding toward the last column of
142 The <STRONG>vline_set</STRONG>, <STRONG>mvvline_set</STRONG>, <STRONG>mvwvline_set</STRONG>, and <STRONG>wvline_set</STRONG>
143 functions draw a line proceeding toward the last line of
147 </PRE><H2><a name="h2-NOTES">NOTES</a></H2><PRE>
148 Note that <STRONG>border_set</STRONG>, <STRONG>hline_set</STRONG>, <STRONG>mvhline_set</STRONG>, <STRONG>mvvline_set</STRONG>,
149 <STRONG>mvwhline_set</STRONG>, <STRONG>mvwvline_set</STRONG>, and <STRONG>vline_set</STRONG> may be macros.
152 </PRE><H2><a name="h2-RETURN-VALUE">RETURN VALUE</a></H2><PRE>
153 Upon successful completion, these functions return <STRONG>OK</STRONG>.
154 Otherwise, they return <STRONG>ERR</STRONG>.
156 Functions using a window parameter return an error if it
159 Functions with a "mv" prefix first perform a cursor move-
160 ment using <STRONG>wmove</STRONG>, and return an error if the position is
161 outside the window, or if the window pointer is null.
164 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
165 <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>
166 <STRONG><A HREF="curs_outopts.3x.html">opts(3x)</A></STRONG>
170 <STRONG><A HREF="curs_border_set.3x.html">curs_border_set(3x)</A></STRONG>
174 <li><a href="#h2-NAME">NAME</a></li>
175 <li><a href="#h2-SYNOPSIS">SYNOPSIS</a></li>
176 <li><a href="#h2-DESCRIPTION">DESCRIPTION</a></li>
177 <li><a href="#h2-NOTES">NOTES</a></li>
178 <li><a href="#h2-RETURN-VALUE">RETURN VALUE</a></li>
179 <li><a href="#h2-SEE-ALSO">SEE ALSO</a></li>