809cedd1ec97579063c9fdc9939c1f0d9d66bec3
[dragonfly.git] / lib / libncurses / man / curs_border_set.3
1 .\"***************************************************************************
2 .\" Copyright (c) 2002 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.3 2002/04/20 16:49:13 tom Exp $
30 .\" $DragonFly: src/lib/libncurses/man/curs_border_set.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $
31 .TH curs_border_set 3X ""
32 .SH NAME
33 .PP
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 .SH SYNOPSIS
46 .PP
47 \fB#include <curses.h>\fR
48 .sp
49 \fBint border_set(\fR
50    \fBconst cchar_t *\fR\fIls\fR, \fBconst cchar_t *\fR\fIrs\fR,
51    \fBconst cchar_t *\fR\fIts\fR, \fBconst cchar_t *\fR\fIbs\fR,
52    \fBconst cchar_t *\fR\fItl\fR, \fBconst cchar_t *\fR\fItr\fR,
53    \fBconst cchar_t *\fR\fIbl\fR, \fBconst cchar_t *\fR\fIbr\fR
54 \fB);\fR
55 .br
56 \fBint wborder_set(\fR
57    \fBWINDOW *win\fR,
58    \fBconst cchar_t *\fR\fIls\fR, \fBconst cchar_t *\fR\fIrs\fR,
59    \fBconst cchar_t *\fR\fIts\fR, \fBconst cchar_t *\fR\fIbs\fR,
60    \fBconst cchar_t *\fR\fItl\fR, \fBconst cchar_t *\fR\fItr\fR,
61    \fBconst cchar_t *\fR\fIbl\fR, \fBconst cchar_t *\fR\fIbr\fR\fB);\fR
62 .br
63 \fBint box_set(\fR
64    \fBWINDOW *win\fR,
65    \fBconst cchar_t *\fR\fIverch\fR,
66    \fBconst cchar_t *\fR\fIhorch\fR\fB);\fR
67 .br
68 \fBint hline_set(\fR
69    \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR
70 .br
71 \fBint whline_set(\fR
72    \fBWINDOW *\fR\fIwin\fR,
73    \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR
74 .br
75 \fBint mvhline_set(\fR
76    \fBint \fR\fIy\fR, \fBint \fR\fIx\fR,
77    \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR
78 .br
79 \fBint mvwhline_set(\fR
80    \fBWINDOW *\fR\fIwin\fR,
81    \fBint \fR\fIy\fR, \fBint \fR\fIx\fR,
82    \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR
83 .br
84 \fBint vline_set(\fR
85    \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR
86 .br
87 \fBint wvline_set(\fR
88    \fBWINDOW *\fR\fIwin\fR,
89    \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR
90 .br
91 \fBint mvvline_set(\fR
92    \fBint \fR\fIy\fR, \fBint \fR\fIx\fR,
93    \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR
94 .br
95 \fBint mvwvline_set(\fR
96    \fBWINDOW *\fR\fIwin\fR,
97    \fBint \fR\fIy\fR, \fBint \fR\fIx\fR,
98    \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR
99 .br
100 .SH DESCRIPTION
101 .PP
102 The
103 \fBborder_set\fR
104 and
105 \fBwborder_set\fR
106 functions draw a border around the edges of the current or specified window.
107 These functions do not change the cursor position, and do not wrap.
108 .PP
109 Other than the window, each argument is a complex character with attributes:
110 .RS
111 \fIls\fR - left side,
112 .br
113 \fIrs\fR - right side,
114 .br
115 \fIts\fR - top side,
116 .br
117 \fIbs\fR - bottom side,
118 .br
119 \fItl\fR - top left-hand corner,
120 .br
121 \fItr\fR - top right-hand corner,
122 .br
123 \fIbl\fR - bottom left-hand corner, and
124 .br
125 \fIbr\fR - bottom right-hand corner.
126 .RE
127 .PP
128 If any of these arguments is zero, then the corresponding
129 default values (defined in \fBcurses.h\fR) are used instead:
130 .RS
131 \fBWACS_VLINE\fR,
132 .br
133 \fBWACS_VLINE\fR,
134 .br
135 \fBWACS_HLINE\fR,
136 .br
137 \fBWACS_HLINE\fR,
138 .br
139 \fBWACS_ULCORNER\fR,
140 .br
141 \fBWACS_URCORNER\fR,
142 .br
143 \fBWACS_LLCORNER\fR, and
144 .br
145 \fBWACS_LRCORNER\fR.
146 .RE
147 .PP
148 \fBbox_set(\fR\fIwin\fR, \fIverch\fR\fB, \fR\fIhorch\fR\fB);\fR
149 is a shorthand for the following call:
150 .PP
151 \fBwborder_set(\fR\fIwin\fR\fB, \fR\fIverch\fR\fB, \fR\fIverch\fR\fB,\fR
152     \fIhorch\fR\fB, \fR\fIhorch\fR\fB, NULL, NULL, NULL, NULL);\fR
153 .PP
154 The
155 \fB*line_set\fR
156 functions use
157 \fIwch\fR
158 to draw a line starting at the current cursor position in the window.
159 The line is at most \fIn\fR characters long or as many as fit into the window.
160 The current cursor position is not changed.
161 .PP
162 The
163 \fBhline_set\fR,
164 \fBmvhline_set\fR,
165 \fBmvwhline_set\fR, and
166 \fBwhline_set\fR
167 functions draw a line proceeding toward the last column of the same line.
168 .PP
169 The
170 \fBvline_set\fR,
171 \fBmvvline_set\fR,
172 \fBmvwvline_set\fR, and
173 \fBwvline_set\fR
174 functions draw a line proceeding toward the last line of the window.
175 .br
176 .SH NOTES
177 .PP
178 Note that
179 \fBborder_set\fR,
180 \fBhline_set\fR,
181 \fBmvhline_set\fR,
182 \fBmvvline_set\fR,
183 \fBmvwhline_set\fR,
184 \fBmvwvline_set\fR, and
185 \fBvline_set\fR
186 may be macros.
187 .br
188 .SH RETURN VALUES
189 .PP
190 Upon successful completion, these functions return
191 \fBOK\fR.
192 Otherwise, they return
193 \fBERR\fR.
194 .SH SEE ALSO
195 \fBncurses\fR(3X),
196 \fBcurs_border\fR(3X),
197 \fBcurs_outopts\fR(3X)
198 .\"#
199 .\"# The following sets edit modes for GNU EMACS
200 .\"# Local Variables:
201 .\"# mode:nroff
202 .\"# fill-column:79
203 .\"# End: