]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/curs_border_set.3x
ncurses 6.0 - patch 20150912
[ncurses.git] / man / curs_border_set.3x
1 .\"***************************************************************************
2 .\" Copyright (c) 2002-2011,2012 Free Software Foundation, Inc.              *
3 .\"                                                                          *
4 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
5 .\" copy of this software and associated documentation files (the            *
6 .\" "Software"), to deal in the Software without restriction, including      *
7 .\" without limitation the rights to use, copy, modify, merge, publish,      *
8 .\" distribute, distribute with modifications, sublicense, and/or sell       *
9 .\" copies of the Software, and to permit persons to whom the Software is    *
10 .\" furnished to do so, subject to the following conditions:                 *
11 .\"                                                                          *
12 .\" The above copyright notice and this permission notice shall be included  *
13 .\" in all copies or substantial portions of the Software.                   *
14 .\"                                                                          *
15 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
16 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
17 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
18 .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
19 .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
20 .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
21 .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
22 .\"                                                                          *
23 .\" Except as contained in this notice, the name(s) of the above copyright   *
24 .\" holders shall not be used in advertising or otherwise to promote the     *
25 .\" sale, use or other dealings in this Software without prior written       *
26 .\" authorization.                                                           *
27 .\"***************************************************************************
28 .\"
29 .\" $Id: curs_border_set.3x,v 1.11 2012/11/03 23:03:59 tom Exp $
30 .TH curs_border_set 3X ""
31 .na
32 .hy 0
33 .SH NAME
34 \fBborder_set\fR,
35 \fBwborder_set\fR,
36 \fBbox_set\fR,
37 \fBhline_set\fR,
38 \fBwhline_set\fR,
39 \fBmvhline_set\fR,
40 \fBmvwhline_set\fR,
41 \fBvline_set\fR,
42 \fBwvline_set\fR,
43 \fBmvvline_set\fR,
44 \fBmvwvline_set\fR \- create \fBcurses\fR borders or lines using complex characters and renditions
45 .ad
46 .hy
47 .SH SYNOPSIS
48 .PP
49 \fB#include <curses.h>\fR
50 .sp
51 \fBint border_set(\fR
52    \fBconst cchar_t *\fR\fIls\fR, \fBconst cchar_t *\fR\fIrs\fR,
53    \fBconst cchar_t *\fR\fIts\fR, \fBconst cchar_t *\fR\fIbs\fR,
54    \fBconst cchar_t *\fR\fItl\fR, \fBconst cchar_t *\fR\fItr\fR,
55    \fBconst cchar_t *\fR\fIbl\fR, \fBconst cchar_t *\fR\fIbr\fR
56 \fB);\fR
57 .br
58 \fBint wborder_set(\fR
59    \fBWINDOW *win\fR,
60    \fBconst cchar_t *\fR\fIls\fR, \fBconst cchar_t *\fR\fIrs\fR,
61    \fBconst cchar_t *\fR\fIts\fR, \fBconst cchar_t *\fR\fIbs\fR,
62    \fBconst cchar_t *\fR\fItl\fR, \fBconst cchar_t *\fR\fItr\fR,
63    \fBconst cchar_t *\fR\fIbl\fR, \fBconst cchar_t *\fR\fIbr\fR\fB);\fR
64 .br
65 \fBint box_set(\fR
66    \fBWINDOW *win\fR,
67    \fBconst cchar_t *\fR\fIverch\fR,
68    \fBconst cchar_t *\fR\fIhorch\fR\fB);\fR
69 .br
70 \fBint hline_set(\fR
71    \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR
72 .br
73 \fBint whline_set(\fR
74    \fBWINDOW *\fR\fIwin\fR,
75    \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR
76 .br
77 \fBint mvhline_set(\fR
78    \fBint \fR\fIy\fR, \fBint \fR\fIx\fR,
79    \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR
80 .br
81 \fBint mvwhline_set(\fR
82    \fBWINDOW *\fR\fIwin\fR,
83    \fBint \fR\fIy\fR, \fBint \fR\fIx\fR,
84    \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR
85 .br
86 \fBint vline_set(\fR
87    \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR
88 .br
89 \fBint wvline_set(\fR
90    \fBWINDOW *\fR\fIwin\fR,
91    \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR
92 .br
93 \fBint mvvline_set(\fR
94    \fBint \fR\fIy\fR, \fBint \fR\fIx\fR,
95    \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR
96 .br
97 \fBint mvwvline_set(\fR
98    \fBWINDOW *\fR\fIwin\fR,
99    \fBint \fR\fIy\fR, \fBint \fR\fIx\fR,
100    \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR
101 .br
102 .SH DESCRIPTION
103 .PP
104 The
105 \fBborder_set\fR
106 and
107 \fBwborder_set\fR
108 functions draw a border around the edges of the current or specified window.
109 These functions do not change the cursor position, and do not wrap.
110 .PP
111 Other than the window, each argument is a complex character with attributes:
112 .RS
113 \fIls\fR \- left side,
114 .br
115 \fIrs\fR \- right side,
116 .br
117 \fIts\fR \- top side,
118 .br
119 \fIbs\fR \- bottom side,
120 .br
121 \fItl\fR \- top left-hand corner,
122 .br
123 \fItr\fR \- top right-hand corner,
124 .br
125 \fIbl\fR \- bottom left-hand corner, and
126 .br
127 \fIbr\fR \- bottom right-hand corner.
128 .RE
129 .PP
130 If any of these arguments is zero, then the corresponding
131 default values (defined in \fBcurses.h\fR) are used instead:
132 .RS
133 \fBWACS_VLINE\fR,
134 .br
135 \fBWACS_VLINE\fR,
136 .br
137 \fBWACS_HLINE\fR,
138 .br
139 \fBWACS_HLINE\fR,
140 .br
141 \fBWACS_ULCORNER\fR,
142 .br
143 \fBWACS_URCORNER\fR,
144 .br
145 \fBWACS_LLCORNER\fR, and
146 .br
147 \fBWACS_LRCORNER\fR.
148 .RE
149 .PP
150 \fBbox_set(\fR\fIwin\fR, \fIverch\fR\fB, \fR\fIhorch\fR\fB);\fR
151 is a shorthand for the following call:
152 .PP
153 \fBwborder_set(\fR\fIwin\fR\fB, \fR\fIverch\fR\fB, \fR\fIverch\fR\fB,\fR
154     \fIhorch\fR\fB, \fR\fIhorch\fR\fB, NULL, NULL, NULL, NULL);\fR
155 .PP
156 The
157 \fB*line_set\fR
158 functions use
159 \fIwch\fR
160 to draw a line starting at the current cursor position in the window.
161 The line is at most \fIn\fR characters long or as many as fit into the window.
162 The current cursor position is not changed.
163 .PP
164 The
165 \fBhline_set\fR,
166 \fBmvhline_set\fR,
167 \fBmvwhline_set\fR, and
168 \fBwhline_set\fR
169 functions draw a line proceeding toward the last column of the same line.
170 .PP
171 The
172 \fBvline_set\fR,
173 \fBmvvline_set\fR,
174 \fBmvwvline_set\fR, and
175 \fBwvline_set\fR
176 functions draw a line proceeding toward the last line of the window.
177 .br
178 .SH NOTES
179 .PP
180 Note that
181 \fBborder_set\fR,
182 \fBhline_set\fR,
183 \fBmvhline_set\fR,
184 \fBmvvline_set\fR,
185 \fBmvwhline_set\fR,
186 \fBmvwvline_set\fR, and
187 \fBvline_set\fR
188 may be macros.
189 .br
190 .SH RETURN VALUE
191 .PP
192 Upon successful completion, these functions return
193 \fBOK\fR.
194 Otherwise, they return
195 \fBERR\fR.
196 .PP
197 Functions using a window parameter return an error if it is null.
198 .PP
199 Functions with a "mv" prefix first perform a cursor movement using
200 \fBwmove\fP, and return an error if the position is outside the window,
201 or if the window pointer is null.
202 .SH SEE ALSO
203 \fBncurses\fR(3X),
204 \fBcurs_add_wch\fR(3X),
205 \fBcurs_border\fR(3X),
206 \fBcurs_outopts\fR(3X)