ncurses 5.3
[ncurses.git] / doc / html / man / curs_border_set.3x.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
2 <!-- 
3   ****************************************************************************
4   * Copyright (c) 2002 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.3 2002/04/20 16:49:13 tom Exp @
31 -->
32 <HTML>
33 <HEAD>
34 <TITLE>curs_border_set 3x</TITLE>
35 <link rev=made href="mailto:bug-ncurses@gnu.org">
36 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
37 </HEAD>
38 <BODY>
39 <H1>curs_border_set 3x</H1>
40 <HR>
41 <PRE>
42 <!-- Manpage converted by man2html 3.0.1 -->
43
44 </PRE>
45 <H2>NAME</H2><PRE>
46        <STRONG>border_set</STRONG>,  <STRONG>wborder_set</STRONG>,  <STRONG>box_set</STRONG>, <STRONG>hline_set</STRONG>, <STRONG>whline_set</STRONG>,
47        <STRONG>mvhline_set</STRONG>,    <STRONG>mvwhline_set</STRONG>,    <STRONG>vline_set</STRONG>,    <STRONG>wvline_set</STRONG>,
48        <STRONG>mvvline_set</STRONG>, <STRONG>mvwvline_set</STRONG> - create <STRONG>curses</STRONG> borders or lines
49        using complex characters and renditions
50
51
52 </PRE>
53 <H2>SYNOPSIS</H2><PRE>
54        <STRONG>#include</STRONG> <STRONG>&lt;curses.h&gt;</STRONG>
55
56        <STRONG>int</STRONG> <STRONG>border_set(</STRONG>
57           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>ls</EM>, <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>rs</EM>,
58           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>ts</EM>, <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>bs</EM>,
59           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>tl</EM>, <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>tr</EM>,
60           <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>
61        <STRONG>int</STRONG> <STRONG>wborder_set(</STRONG>
62           <STRONG>WINDOW</STRONG> <STRONG>*win</STRONG>,
63           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>ls</EM>, <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>rs</EM>,
64           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>ts</EM>, <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>bs</EM>,
65           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>tl</EM>, <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>tr</EM>,
66           <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>
67        <STRONG>int</STRONG> <STRONG>box_set(</STRONG>
68           <STRONG>WINDOW</STRONG> <STRONG>*win</STRONG>,
69           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>verch</EM>,
70           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>horch</EM><STRONG>);</STRONG>
71        <STRONG>int</STRONG> <STRONG>hline_set(</STRONG>
72           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>wch</EM>, <STRONG>int</STRONG> <EM>n</EM><STRONG>);</STRONG>
73        <STRONG>int</STRONG> <STRONG>whline_set(</STRONG>
74           <STRONG>WINDOW</STRONG> <STRONG>*</STRONG><EM>win</EM>,
75           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>wch</EM>, <STRONG>int</STRONG> <EM>n</EM><STRONG>);</STRONG>
76        <STRONG>int</STRONG> <STRONG>mvhline_set(</STRONG>
77           <STRONG>int</STRONG> <EM>y</EM>, <STRONG>int</STRONG> <EM>x</EM>,
78           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>wch</EM>, <STRONG>int</STRONG> <EM>n</EM><STRONG>);</STRONG>
79        <STRONG>int</STRONG> <STRONG>mvwhline_set(</STRONG>
80           <STRONG>WINDOW</STRONG> <STRONG>*</STRONG><EM>win</EM>,
81           <STRONG>int</STRONG> <EM>y</EM>, <STRONG>int</STRONG> <EM>x</EM>,
82           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>wch</EM>, <STRONG>int</STRONG> <EM>n</EM><STRONG>);</STRONG>
83        <STRONG>int</STRONG> <STRONG>vline_set(</STRONG>
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>wvline_set(</STRONG>
86           <STRONG>WINDOW</STRONG> <STRONG>*</STRONG><EM>win</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>mvvline_set(</STRONG>
89           <STRONG>int</STRONG> <EM>y</EM>, <STRONG>int</STRONG> <EM>x</EM>,
90           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>wch</EM>, <STRONG>int</STRONG> <EM>n</EM><STRONG>);</STRONG>
91        <STRONG>int</STRONG> <STRONG>mvwvline_set(</STRONG>
92           <STRONG>WINDOW</STRONG> <STRONG>*</STRONG><EM>win</EM>,
93           <STRONG>int</STRONG> <EM>y</EM>, <STRONG>int</STRONG> <EM>x</EM>,
94           <STRONG>const</STRONG> <STRONG>cchar_t</STRONG> <STRONG>*</STRONG><EM>wch</EM>, <STRONG>int</STRONG> <EM>n</EM><STRONG>);</STRONG>
95
96
97 </PRE>
98 <H2>DESCRIPTION</H2><PRE>
99        The <STRONG>border_set</STRONG> and <STRONG>wborder_set</STRONG>  functions  draw  a  border
100        around  the  edges  of  the  current  or specified window.
101        These functions do not change the cursor position, and  do
102        not wrap.
103        Other  than the window, each argument is a complex charac-
104        ter with attributes:
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
115        default values (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 follow-
126        ing 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
132        the current cursor position in the window.  The line is at
133        most <EM>n</EM> characters long or as many as fit into the  window.
134        The current cursor position is not changed.
135
136        The  <STRONG>hline_set</STRONG>,  <STRONG>mvhline_set</STRONG>, <STRONG>mvwhline_set</STRONG>, and <STRONG>whline_set</STRONG>
137        functions draw a line proceeding toward the last column of
138        the same line.
139
140        The  <STRONG>vline_set</STRONG>,  <STRONG>mvvline_set</STRONG>, <STRONG>mvwvline_set</STRONG>, and <STRONG>wvline_set</STRONG>
141        functions draw a line proceeding toward the last  line  of
142        the window.
143
144
145 </PRE>
146 <H2>NOTES</H2><PRE>
147        Note that <STRONG>border_set</STRONG>, <STRONG>hline_set</STRONG>, <STRONG>mvhline_set</STRONG>, <STRONG>mvvline_set</STRONG>,
148        <STRONG>mvwhline_set</STRONG>, <STRONG>mvwvline_set</STRONG>, and <STRONG>vline_set</STRONG> may be macros.
149
150
151 </PRE>
152 <H2>RETURN VALUES</H2><PRE>
153        Upon successful completion,  these  functions  return  <STRONG>OK</STRONG>.
154        Otherwise, they return <STRONG>ERR</STRONG>.
155
156
157 </PRE>
158 <H2>SEE ALSO</H2><PRE>
159        <STRONG><A HREF="ncurses.3x.html">ncurses(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 </PRE>
164 <HR>
165 <ADDRESS>
166 Man(1) output converted with
167 <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
168 </ADDRESS>
169 </BODY>
170 </HTML>