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