summaryrefslogtreecommitdiff
path: root/lib/libcurses/curs_border.3
blob: c3d845acfc8747cd11d050523a84bbaf60f4c7dd (plain)
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
.TH curs_border 3X ""
.SH NAME
\fBborder\fR, \fBwborder\fR, \fBbox\fR,
\fBhline\fR, \fBwhline\fR, \fBvline\fR, \fBwvline\fR - create
\fBcurses\fR borders, horizontal and vertical lines
.SH SYNOPSIS
\fB#include <curses.h>\fR
.br
\fBint border(chtype ls, chtype rs, chtype ts, chtype bs,
   chtype tl, chtype tr, chtype bl, chtype br);\fR
.br
\fBint wborder(WINDOW *win, chtype ls, chtype rs,
   chtype ts, chtype bs, chtype tl, chtype tr,
   chtype bl, chtype br);\fR
.br
\fBint box(WINDOW *win, chtype verch, chtype horch);\fR
.br
\fBint hline(chtype ch, int n);\fR
.br
\fBint whline(WINDOW *win, chtype ch, int n);\fR
.br
\fBint vline(chtype ch, int n);\fR
.br
\fBint wvline(WINDOW *win, chtype ch, int n);\fR
.br
.SH DESCRIPTION
The \fBborder\fR, \fBwborder\fR and \fBbox\fR routines draw a box around the
edges of a window.  The argument \fIls\fR is a character and attributes used
for the left side of the border, \fIrs\fR - right side, \fIts\fR - top side,
\fIbs\fR - bottom side, \fItl\fR - top left-hand corner, \fItr\fR - top
right-hand corner, \fIbl\fR - bottom left-hand corner, and \fIbr\fR - bottom
right-hand corner.  If any of these arguments is zero, then the following
default values (defined in \fBcurses.h\fR) are used instead: \fBACS_VLINE\fR,
\fBACS_VLINE\fR, \fBACS_HLINE\fR, \fBACS_HLINE\fR, \fB\fBACS_ULCORNER\fR,
\fBACS_URCORNER\fR, \fBACS_BLCORNER\fR, \fBACS_BRCORNER\fR.

\fBbox(\fR\fIwin\fR\gB, \fR\fIverch\fR\fB, \fR\fIhorch\fR\fB)\fR is a shorthand
for the following call: \fBwborder(\fR\fIwin\fR\fB,\fR \fIverch\fR\fB,\fR
\fIverch\fR\fB,\fR \fIhorch\fR\fB,\fR \fIhorch\fR\fB, 0, 0, 0, 0)\fR.

The \fBhline\fR and \fBwhline\fR functions draw a horizontal (left to right)
line using \fIch\fR starting at the current cursor position in the window.  The
current cursor position is not changed.  The line is at most \fIn\fR characters
long, or as many as fit into the window.

The \fBvline\fR and \fBwvline\fR functions draw a vertical (top to bottom) line
using \fIch\fR starting at the current cursor position in the window.  The
current cursor position is not changed.  The line is at most \fIn\fR characters
long, or as many as fit into the window.
.SH RETURN VALUE
All routines return the integer \fBOK\fR.  The SVr4.0 manual says "or a
non-negative integer if \fBimmedok\fR is set", but this appears to be an error.
.SH NOTES
The borders generated by these functions are \fIinside\fR borders (this
is also true of SVr4 curses, though the fact is not documented).

Note that \fBborder\fR and \fBbox\fR may be macros.
.SH PORTABILITY
These functions are described in the XSI Curses standard, Issue 4.  Additional
functions \fBmvhline\fR, \fBmvvline\fR, \fBmvwhline\fR, and \fBmvwvline\fR are
described there which this implementation does not yet support.  The standard
specifies that they return \fBERR\fR on failure, but specifies no error
conditions.
.SH SEE ALSO
\fBcurses\fR(3X), \fBcurs_outopts\fR(3X).
.\"#
.\"# The following sets edit modes for GNU EMACS
.\"# Local Variables:
.\"# mode:nroff
.\"# fill-column:79
.\"# End: