]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/curs_border.3x
ncurses 4.1
[ncurses.git] / man / curs_border.3x
1 .\" $Id: curs_border.3x,v 1.8 1996/08/04 00:29:11 tom Exp $
2 .TH curs_border 3X ""
3 .SH NAME
4 \fBborder\fR, \fBwborder\fR, \fBbox\fR,
5 \fBhline\fR, \fBwhline\fR, \fBvline\fR, \fBwvline\fR - create
6 \fBcurses\fR borders, horizontal and vertical lines
7 .SH SYNOPSIS
8 \fB#include <curses.h>\fR
9 .br
10 \fBint border(chtype ls, chtype rs, chtype ts, chtype bs,
11    chtype tl, chtype tr, chtype bl, chtype br);\fR
12 .br
13 \fBint wborder(WINDOW *win, chtype ls, chtype rs,
14    chtype ts, chtype bs, chtype tl, chtype tr,
15    chtype bl, chtype br);\fR
16 .br
17 \fBint box(WINDOW *win, chtype verch, chtype horch);\fR
18 .br
19 \fBint hline(chtype ch, int n);\fR
20 .br
21 \fBint whline(WINDOW *win, chtype ch, int n);\fR
22 .br
23 \fBint vline(chtype ch, int n);\fR
24 .br
25 \fBint wvline(WINDOW *win, chtype ch, int n);\fR
26 .br
27 \fBmvhline(int y, int x, chtype ch, int n);\fR
28 .br
29 \fBmvwhline(WINDOW *, int y, int x, chtype ch, int n);\fR
30 .br
31 \fBint mvvline(int y, int x, chtype ch, int n);\fR
32 .br
33 \fBint mvwvline(WINDOW *, int y, int x, chtype ch, int n);\fR
34 .br
35 .SH DESCRIPTION
36 The \fBborder\fR, \fBwborder\fR and \fBbox\fR routines draw a box around the
37 edges of a window.  The argument \fIls\fR is a character and attributes used
38 for the left side of the border, \fIrs\fR - right side, \fIts\fR - top side,
39 \fIbs\fR - bottom side, \fItl\fR - top left-hand corner, \fItr\fR - top
40 right-hand corner, \fIbl\fR - bottom left-hand corner, and \fIbr\fR - bottom
41 right-hand corner.  If any of these arguments is zero, then the following
42 default values (defined in \fBcurses.h\fR) are used instead: \fBACS_VLINE\fR,
43 \fBACS_VLINE\fR, \fBACS_HLINE\fR, \fBACS_HLINE\fR, \fB\fBACS_ULCORNER\fR,
44 \fBACS_URCORNER\fR, \fBACS_BLCORNER\fR, \fBACS_BRCORNER\fR.
45
46 \fBbox(\fR\fIwin\fR\fB, \fR\fIverch\fR\fB, \fR\fIhorch\fR\fB)\fR is a shorthand
47 for the following call: \fBwborder(\fR\fIwin\fR\fB,\fR \fIverch\fR\fB,\fR
48 \fIverch\fR\fB,\fR \fIhorch\fR\fB,\fR \fIhorch\fR\fB, 0, 0, 0, 0)\fR.
49
50 The \fBhline\fR and \fBwhline\fR functions draw a horizontal (left to right)
51 line using \fIch\fR starting at the current cursor position in the window.  The
52 current cursor position is not changed.  The line is at most \fIn\fR characters
53 long, or as many as fit into the window.
54
55 The \fBvline\fR and \fBwvline\fR functions draw a vertical (top to bottom) line
56 using \fIch\fR starting at the current cursor position in the window.  The
57 current cursor position is not changed.  The line is at most \fIn\fR characters
58 long, or as many as fit into the window.
59 .SH RETURN VALUE
60 All routines return the integer \fBOK\fR.  The SVr4.0 manual says "or a
61 non-negative integer if \fBimmedok\fR is set", but this appears to be an error.
62 .SH NOTES
63 The borders generated by these functions are \fIinside\fR borders (this
64 is also true of SVr4 curses, though the fact is not documented).
65
66 Note that \fBborder\fR and \fBbox\fR may be macros.
67 .SH PORTABILITY
68 These functions are described in the XSI Curses standard, Issue 4.  Additional
69 functions \fBmvhline\fR, \fBmvvline\fR, \fBmvwhline\fR, and \fBmvwvline\fR are
70 described there which this implementation does not yet support.  The standard
71 specifies that they return \fBERR\fR on failure, but specifies no error
72 conditions.
73 .SH SEE ALSO
74 \fBcurses\fR(3X), \fBcurs_outopts\fR(3X).
75 .\"#
76 .\"# The following sets edit modes for GNU EMACS
77 .\"# Local Variables:
78 .\"# mode:nroff
79 .\"# fill-column:79
80 .\"# End: