1 .\"***************************************************************************
2 .\" Copyright (c) 1998-2007,2010 Free Software Foundation, Inc. *
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: *
12 .\" The above copyright notice and this permission notice shall be included *
13 .\" in all copies or substantial portions of the Software. *
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. *
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 *
27 .\"***************************************************************************
29 .\" $Id: curs_border.3x,v 1.22 2010/12/04 18:36:44 tom Exp $
44 \fBmvwvline\fR \- create \fBcurses\fR borders, horizontal and vertical lines
48 \fB#include <curses.h>\fR
50 \fBint border(chtype ls, chtype rs, chtype ts, chtype bs,\fR
51 \fBchtype tl, chtype tr, chtype bl, chtype br);\fR
53 \fBint wborder(WINDOW *win, chtype ls, chtype rs,\fR
54 \fBchtype ts, chtype bs, chtype tl, chtype tr,\fR
55 \fBchtype bl, chtype br);\fR
57 \fBint box(WINDOW *win, chtype verch, chtype horch);\fR
59 \fBint hline(chtype ch, int n);\fR
61 \fBint whline(WINDOW *win, chtype ch, int n);\fR
63 \fBint vline(chtype ch, int n);\fR
65 \fBint wvline(WINDOW *win, chtype ch, int n);\fR
67 \fBint mvhline(int y, int x, chtype ch, int n);\fR
69 \fBint mvwhline(WINDOW *, int y, int x, chtype ch, int n);\fR
71 \fBint mvvline(int y, int x, chtype ch, int n);\fR
73 \fBint mvwvline(WINDOW *, int y, int x, chtype ch, int n);\fR
76 The \fBborder\fR, \fBwborder\fR and \fBbox\fR routines
77 draw a box around the edges of a window.
78 Other than the window, each argument is a character with attributes:
81 \fIls\fR \- left side,
83 \fIrs\fR \- right side,
87 \fIbs\fR \- bottom side,
89 \fItl\fR \- top left-hand corner,
91 \fItr\fR \- top right-hand corner,
93 \fIbl\fR \- bottom left-hand corner, and
95 \fIbr\fR \- bottom right-hand corner.
98 If any of these arguments is zero, then the corresponding
99 default values (defined in \fBcurses.h\fR) are used instead:
119 \fBbox(\fR\fIwin\fR\fB, \fR\fIverch\fR\fB, \fR\fIhorch\fR\fB)\fR is a shorthand
120 for the following call: \fBwborder(\fR\fIwin\fR\fB,\fR \fIverch\fR\fB,\fR
121 \fIverch\fR\fB,\fR \fIhorch\fR\fB,\fR \fIhorch\fR\fB, 0, 0, 0, 0)\fR.
123 The \fBhline\fR and \fBwhline\fR functions draw a horizontal (left to right)
124 line using \fIch\fR starting at the current cursor position in the window. The
125 current cursor position is not changed. The line is at most \fIn\fR characters
126 long, or as many as fit into the window.
128 The \fBvline\fR and \fBwvline\fR functions draw a vertical (top to bottom) line
129 using \fIch\fR starting at the current cursor position in the window. The
130 current cursor position is not changed. The line is at most \fIn\fR characters
131 long, or as many as fit into the window.
133 All routines return the integer \fBOK\fR. The SVr4.0 manual says "or a
134 non-negative integer if \fBimmedok\fR is set", but this appears to be an error.
136 X/Open does not define any error conditions.
137 This implementation returns an error
138 if the window pointer is null.
140 Functions with a "mv" prefix first perform a cursor movement using
141 \fBwmove\fP, and return an error if the position is outside the window,
142 or if the window pointer is null.
144 The borders generated by these functions are \fIinside\fR borders (this
145 is also true of SVr4 curses, though the fact is not documented).
147 Note that \fBborder\fR and \fBbox\fR may be macros.
149 These functions are described in the XSI Curses standard, Issue 4.
150 The standard specifies that they return \fBERR\fR on failure,
151 but specifies no error conditions.
153 \fBcurses\fR(3X), \fBcurs_outopts\fR(3X).