]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/curs_border_set.3x
ncurses 6.1 - patch 20200111
[ncurses.git] / man / curs_border_set.3x
1 .\"***************************************************************************
2 .\" Copyright (c) 2002-2012,2019 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.12 2019/11/30 21:06:30 tom Exp $
30 .TH curs_border_set 3X ""
31 .ie \n(.g .ds `` \(lq
32 .el       .ds `` ``
33 .ie \n(.g .ds '' \(rq
34 .el       .ds '' ''
35 .na
36 .hy 0
37 .SH NAME
38 \fBborder_set\fR,
39 \fBwborder_set\fR,
40 \fBbox_set\fR,
41 \fBhline_set\fR,
42 \fBwhline_set\fR,
43 \fBmvhline_set\fR,
44 \fBmvwhline_set\fR,
45 \fBvline_set\fR,
46 \fBwvline_set\fR,
47 \fBmvvline_set\fR,
48 \fBmvwvline_set\fR \- create \fBcurses\fR borders or lines using complex characters and renditions
49 .ad
50 .hy
51 .SH SYNOPSIS
52 .PP
53 \fB#include <curses.h>\fR
54 .sp
55 \fBint border_set(\fR
56    \fBconst cchar_t *\fR\fIls\fR, \fBconst cchar_t *\fR\fIrs\fR,
57    \fBconst cchar_t *\fR\fIts\fR, \fBconst cchar_t *\fR\fIbs\fR,
58    \fBconst cchar_t *\fR\fItl\fR, \fBconst cchar_t *\fR\fItr\fR,
59    \fBconst cchar_t *\fR\fIbl\fR, \fBconst cchar_t *\fR\fIbr\fR
60 \fB);\fR
61 .br
62 \fBint wborder_set(\fR
63    \fBWINDOW *win\fR,
64    \fBconst cchar_t *\fR\fIls\fR, \fBconst cchar_t *\fR\fIrs\fR,
65    \fBconst cchar_t *\fR\fIts\fR, \fBconst cchar_t *\fR\fIbs\fR,
66    \fBconst cchar_t *\fR\fItl\fR, \fBconst cchar_t *\fR\fItr\fR,
67    \fBconst cchar_t *\fR\fIbl\fR, \fBconst cchar_t *\fR\fIbr\fR\fB);\fR
68 .br
69 \fBint box_set(\fR
70    \fBWINDOW *win\fR,
71    \fBconst cchar_t *\fR\fIverch\fR,
72    \fBconst cchar_t *\fR\fIhorch\fR\fB);\fR
73 .br
74 \fBint hline_set(\fR
75    \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR
76 .br
77 \fBint whline_set(\fR
78    \fBWINDOW *\fR\fIwin\fR,
79    \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR
80 .br
81 \fBint mvhline_set(\fR
82    \fBint \fR\fIy\fR, \fBint \fR\fIx\fR,
83    \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR
84 .br
85 \fBint mvwhline_set(\fR
86    \fBWINDOW *\fR\fIwin\fR,
87    \fBint \fR\fIy\fR, \fBint \fR\fIx\fR,
88    \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR
89 .br
90 \fBint vline_set(\fR
91    \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR
92 .br
93 \fBint wvline_set(\fR
94    \fBWINDOW *\fR\fIwin\fR,
95    \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR
96 .br
97 \fBint mvvline_set(\fR
98    \fBint \fR\fIy\fR, \fBint \fR\fIx\fR,
99    \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR
100 .br
101 \fBint mvwvline_set(\fR
102    \fBWINDOW *\fR\fIwin\fR,
103    \fBint \fR\fIy\fR, \fBint \fR\fIx\fR,
104    \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR
105 .br
106 .SH DESCRIPTION
107 .PP
108 The
109 \fBborder_set\fR
110 and
111 \fBwborder_set\fR
112 functions draw a border around the edges of the current or specified window.
113 These functions do not change the cursor position, and do not wrap.
114 .PP
115 Other than the window, each argument is a complex character with attributes:
116 .RS
117 \fIls\fR \- left side,
118 .br
119 \fIrs\fR \- right side,
120 .br
121 \fIts\fR \- top side,
122 .br
123 \fIbs\fR \- bottom side,
124 .br
125 \fItl\fR \- top left-hand corner,
126 .br
127 \fItr\fR \- top right-hand corner,
128 .br
129 \fIbl\fR \- bottom left-hand corner, and
130 .br
131 \fIbr\fR \- bottom right-hand corner.
132 .RE
133 .PP
134 If any of these arguments is zero, then the corresponding
135 default values (defined in \fBcurses.h\fR) are used instead:
136 .RS
137 \fBWACS_VLINE\fR,
138 .br
139 \fBWACS_VLINE\fR,
140 .br
141 \fBWACS_HLINE\fR,
142 .br
143 \fBWACS_HLINE\fR,
144 .br
145 \fBWACS_ULCORNER\fR,
146 .br
147 \fBWACS_URCORNER\fR,
148 .br
149 \fBWACS_LLCORNER\fR, and
150 .br
151 \fBWACS_LRCORNER\fR.
152 .RE
153 .PP
154 \fBbox_set(\fR\fIwin\fR, \fIverch\fR\fB, \fR\fIhorch\fR\fB);\fR
155 is a shorthand for the following call:
156 .PP
157 \fBwborder_set(\fR\fIwin\fR\fB, \fR\fIverch\fR\fB, \fR\fIverch\fR\fB,\fR
158     \fIhorch\fR\fB, \fR\fIhorch\fR\fB, NULL, NULL, NULL, NULL);\fR
159 .PP
160 The
161 \fB*line_set\fR
162 functions use
163 \fIwch\fR
164 to draw a line starting at the current cursor position in the window.
165 The line is at most \fIn\fR characters long or as many as fit into the window.
166 The current cursor position is not changed.
167 .PP
168 The
169 \fBhline_set\fR,
170 \fBmvhline_set\fR,
171 \fBmvwhline_set\fR, and
172 \fBwhline_set\fR
173 functions draw a line proceeding toward the last column of the same line.
174 .PP
175 The
176 \fBvline_set\fR,
177 \fBmvvline_set\fR,
178 \fBmvwvline_set\fR, and
179 \fBwvline_set\fR
180 functions draw a line proceeding toward the last line of the window.
181 .br
182 .SH NOTES
183 .PP
184 Note that
185 \fBborder_set\fR,
186 \fBhline_set\fR,
187 \fBmvhline_set\fR,
188 \fBmvvline_set\fR,
189 \fBmvwhline_set\fR,
190 \fBmvwvline_set\fR, and
191 \fBvline_set\fR
192 may be macros.
193 .br
194 .SH RETURN VALUE
195 .PP
196 Upon successful completion, these functions return
197 \fBOK\fR.
198 Otherwise, they return
199 \fBERR\fR.
200 .PP
201 Functions using a window parameter return an error if it is null.
202 .PP
203 Functions with a \*(``mv\*('' prefix first perform a cursor movement using
204 \fBwmove\fP, and return an error if the position is outside the window,
205 or if the window pointer is null.
206 .SH SEE ALSO
207 \fBncurses\fR(3X),
208 \fBcurs_add_wch\fR(3X),
209 \fBcurs_border\fR(3X),
210 \fBcurs_outopts\fR(3X)