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