Merge from vendor branch OPENSSH:
[dragonfly.git] / lib / libncurses / man / curs_border.3
1 .\"***************************************************************************
2 .\" Copyright (c) 1998,2000 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.15 2002/02/16 22:21:47 tom Exp $
30 .\" $DragonFly: src/lib/libncurses/man/curs_border.3,v 1.1 2005/03/12 19:13:54 eirikn Exp $
31 .TH curs_border 3X ""
32 .SH NAME
33 \fBborder\fR, \fBwborder\fR, \fBbox\fR,
34 \fBhline\fR, \fBwhline\fR,
35 \fBvline\fR, \fBwvline\fR,
36 \fBmvhline\fR, \fBmvwhline\fR,
37 \fBmvvline\fR, \fBmvwvline\fR - create \fBcurses\fR borders, horizontal and vertical lines
38 .SH SYNOPSIS
39 \fB#include <curses.h>\fR
40 .br
41 \fBint border(chtype ls, chtype rs, chtype ts, chtype bs,\fR
42    \fBchtype tl, chtype tr, chtype bl, chtype br);\fR
43 .br
44 \fBint wborder(WINDOW *win, chtype ls, chtype rs,\fR
45    \fBchtype ts, chtype bs, chtype tl, chtype tr,\fR
46    \fBchtype bl, chtype br);\fR
47 .br
48 \fBint box(WINDOW *win, chtype verch, chtype horch);\fR
49 .br
50 \fBint hline(chtype ch, int n);\fR
51 .br
52 \fBint whline(WINDOW *win, chtype ch, int n);\fR
53 .br
54 \fBint vline(chtype ch, int n);\fR
55 .br
56 \fBint wvline(WINDOW *win, chtype ch, int n);\fR
57 .br
58 \fBmvhline(int y, int x, chtype ch, int n);\fR
59 .br
60 \fBmvwhline(WINDOW *, int y, int x, chtype ch, int n);\fR
61 .br
62 \fBint mvvline(int y, int x, chtype ch, int n);\fR
63 .br
64 \fBint mvwvline(WINDOW *, int y, int x, chtype ch, int n);\fR
65 .br
66 .SH DESCRIPTION
67 The \fBborder\fR, \fBwborder\fR and \fBbox\fR routines
68 draw a box around the edges of a window.
69 Other than the window, each argument is a character with attributes:
70 .RS
71 \fIls\fR - left side,
72 .br
73 \fIrs\fR - right side,
74 .br
75 \fIts\fR - top side,
76 .br
77 \fIbs\fR - bottom side,
78 .br
79 \fItl\fR - top left-hand corner,
80 .br
81 \fItr\fR - top right-hand corner,
82 .br
83 \fIbl\fR - bottom left-hand corner, and
84 .br
85 \fIbr\fR - bottom right-hand corner.
86 .RE
87 If any of these arguments is zero, then the corresponding
88 default values (defined in \fBcurses.h\fR) are used instead:
89 .RS
90 \fBACS_VLINE\fR,
91 .br
92 \fBACS_VLINE\fR,
93 .br
94 \fBACS_HLINE\fR,
95 .br
96 \fBACS_HLINE\fR,
97 .br
98 \fBACS_ULCORNER\fR,
99 .br
100 \fBACS_URCORNER\fR,
101 .br
102 \fBACS_LLCORNER\fR,
103 .br
104 \fBACS_LRCORNER\fR.
105 .RE
106
107 \fBbox(\fR\fIwin\fR\fB, \fR\fIverch\fR\fB, \fR\fIhorch\fR\fB)\fR is a shorthand
108 for the following call: \fBwborder(\fR\fIwin\fR\fB,\fR \fIverch\fR\fB,\fR
109 \fIverch\fR\fB,\fR \fIhorch\fR\fB,\fR \fIhorch\fR\fB, 0, 0, 0, 0)\fR.
110
111 The \fBhline\fR and \fBwhline\fR functions draw a horizontal (left to right)
112 line using \fIch\fR starting at the current cursor position in the window.  The
113 current cursor position is not changed.  The line is at most \fIn\fR characters
114 long, or as many as fit into the window.
115
116 The \fBvline\fR and \fBwvline\fR functions draw a vertical (top to bottom) line
117 using \fIch\fR starting at the current cursor position in the window.  The
118 current cursor position is not changed.  The line is at most \fIn\fR characters
119 long, or as many as fit into the window.
120 .SH RETURN VALUE
121 All routines return the integer \fBOK\fR.  The SVr4.0 manual says "or a
122 non-negative integer if \fBimmedok\fR is set", but this appears to be an error.
123 .SH NOTES
124 The borders generated by these functions are \fIinside\fR borders (this
125 is also true of SVr4 curses, though the fact is not documented).
126
127 Note that \fBborder\fR and \fBbox\fR may be macros.
128 .SH PORTABILITY
129 These functions are described in the XSI Curses standard, Issue 4.
130 The standard specifies that they return \fBERR\fR on failure,
131 but specifies no error conditions.
132 .SH SEE ALSO
133 \fBcurses\fR(3X), \fBcurs_outopts\fR(3X).
134 .\"#
135 .\"# The following sets edit modes for GNU EMACS
136 .\"# Local Variables:
137 .\"# mode:nroff
138 .\"# fill-column:79
139 .\"# End: