]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/curs_border.3x
ncurses 5.0
[ncurses.git] / man / curs_border.3x
1 .\"***************************************************************************
2 .\" Copyright (c) 1998 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.3x,v 1.11 1999/01/30 23:11:47 tom Exp $
30 .TH curs_border 3X ""
31 .SH NAME
32 \fBborder\fR, \fBwborder\fR, \fBbox\fR,
33 \fBhline\fR, \fBwhline\fR, \fBvline\fR, \fBwvline\fR - create
34 \fBcurses\fR borders, horizontal and vertical lines
35 .SH SYNOPSIS
36 \fB#include <curses.h>\fR
37 .br
38 \fBint border(chtype ls, chtype rs, chtype ts, chtype bs,\fR
39    \fBchtype tl, chtype tr, chtype bl, chtype br);\fR
40 .br
41 \fBint wborder(WINDOW *win, chtype ls, chtype rs,\fR
42    \fBchtype ts, chtype bs, chtype tl, chtype tr,\fR
43    \fBchtype bl, chtype br);\fR
44 .br
45 \fBint box(WINDOW *win, chtype verch, chtype horch);\fR
46 .br
47 \fBint hline(chtype ch, int n);\fR
48 .br
49 \fBint whline(WINDOW *win, chtype ch, int n);\fR
50 .br
51 \fBint vline(chtype ch, int n);\fR
52 .br
53 \fBint wvline(WINDOW *win, chtype ch, int n);\fR
54 .br
55 \fBmvhline(int y, int x, chtype ch, int n);\fR
56 .br
57 \fBmvwhline(WINDOW *, int y, int x, chtype ch, int n);\fR
58 .br
59 \fBint mvvline(int y, int x, chtype ch, int n);\fR
60 .br
61 \fBint mvwvline(WINDOW *, int y, int x, chtype ch, int n);\fR
62 .br
63 .SH DESCRIPTION
64 The \fBborder\fR, \fBwborder\fR and \fBbox\fR routines draw a box around the
65 edges of a window.  The argument \fIls\fR is a character and attributes used
66 for the left side of the border, \fIrs\fR - right side, \fIts\fR - top side,
67 \fIbs\fR - bottom side, \fItl\fR - top left-hand corner, \fItr\fR - top
68 right-hand corner, \fIbl\fR - bottom left-hand corner, and \fIbr\fR - bottom
69 right-hand corner.  If any of these arguments is zero, then the following
70 default values (defined in \fBcurses.h\fR) are used instead: \fBACS_VLINE\fR,
71 \fBACS_VLINE\fR, \fBACS_HLINE\fR, \fBACS_HLINE\fR, \fB\fBACS_ULCORNER\fR,
72 \fBACS_URCORNER\fR, \fBACS_LLCORNER\fR, \fBACS_LRCORNER\fR.
73
74 \fBbox(\fR\fIwin\fR\fB, \fR\fIverch\fR\fB, \fR\fIhorch\fR\fB)\fR is a shorthand
75 for the following call: \fBwborder(\fR\fIwin\fR\fB,\fR \fIverch\fR\fB,\fR
76 \fIverch\fR\fB,\fR \fIhorch\fR\fB,\fR \fIhorch\fR\fB, 0, 0, 0, 0)\fR.
77
78 The \fBhline\fR and \fBwhline\fR functions draw a horizontal (left to right)
79 line using \fIch\fR starting at the current cursor position in the window.  The
80 current cursor position is not changed.  The line is at most \fIn\fR characters
81 long, or as many as fit into the window.
82
83 The \fBvline\fR and \fBwvline\fR functions draw a vertical (top to bottom) line
84 using \fIch\fR starting at the current cursor position in the window.  The
85 current cursor position is not changed.  The line is at most \fIn\fR characters
86 long, or as many as fit into the window.
87 .SH RETURN VALUE
88 All routines return the integer \fBOK\fR.  The SVr4.0 manual says "or a
89 non-negative integer if \fBimmedok\fR is set", but this appears to be an error.
90 .SH NOTES
91 The borders generated by these functions are \fIinside\fR borders (this
92 is also true of SVr4 curses, though the fact is not documented).
93
94 Note that \fBborder\fR and \fBbox\fR may be macros.
95 .SH PORTABILITY
96 These functions are described in the XSI Curses standard, Issue 4.  Additional
97 functions \fBmvhline\fR, \fBmvvline\fR, \fBmvwhline\fR, and \fBmvwvline\fR are
98 described there which this implementation does not yet support.  The standard
99 specifies that they return \fBERR\fR on failure, but specifies no error
100 conditions.
101 .SH SEE ALSO
102 \fBcurses\fR(3X), \fBcurs_outopts\fR(3X).
103 .\"#
104 .\"# The following sets edit modes for GNU EMACS
105 .\"# Local Variables:
106 .\"# mode:nroff
107 .\"# fill-column:79
108 .\"# End: