]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/curs_border.3x
ncurses 5.4
[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.15 2002/02/16 22:21:47 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
67 draw a box around the edges of a window.
68 Other than the window, each argument is a character with attributes:
69 .RS
70 \fIls\fR - left side,
71 .br
72 \fIrs\fR - right side,
73 .br
74 \fIts\fR - top side,
75 .br
76 \fIbs\fR - bottom side,
77 .br
78 \fItl\fR - top left-hand corner,
79 .br
80 \fItr\fR - top right-hand corner,
81 .br
82 \fIbl\fR - bottom left-hand corner, and
83 .br
84 \fIbr\fR - bottom right-hand corner.
85 .RE
86 If any of these arguments is zero, then the corresponding
87 default values (defined in \fBcurses.h\fR) are used instead:
88 .RS
89 \fBACS_VLINE\fR,
90 .br
91 \fBACS_VLINE\fR,
92 .br
93 \fBACS_HLINE\fR,
94 .br
95 \fBACS_HLINE\fR,
96 .br
97 \fBACS_ULCORNER\fR,
98 .br
99 \fBACS_URCORNER\fR,
100 .br
101 \fBACS_LLCORNER\fR,
102 .br
103 \fBACS_LRCORNER\fR.
104 .RE
105
106 \fBbox(\fR\fIwin\fR\fB, \fR\fIverch\fR\fB, \fR\fIhorch\fR\fB)\fR is a shorthand
107 for the following call: \fBwborder(\fR\fIwin\fR\fB,\fR \fIverch\fR\fB,\fR
108 \fIverch\fR\fB,\fR \fIhorch\fR\fB,\fR \fIhorch\fR\fB, 0, 0, 0, 0)\fR.
109
110 The \fBhline\fR and \fBwhline\fR functions draw a horizontal (left to right)
111 line using \fIch\fR starting at the current cursor position in the window.  The
112 current cursor position is not changed.  The line is at most \fIn\fR characters
113 long, or as many as fit into the window.
114
115 The \fBvline\fR and \fBwvline\fR functions draw a vertical (top to bottom) line
116 using \fIch\fR starting at the current cursor position in the window.  The
117 current cursor position is not changed.  The line is at most \fIn\fR characters
118 long, or as many as fit into the window.
119 .SH RETURN VALUE
120 All routines return the integer \fBOK\fR.  The SVr4.0 manual says "or a
121 non-negative integer if \fBimmedok\fR is set", but this appears to be an error.
122 .SH NOTES
123 The borders generated by these functions are \fIinside\fR borders (this
124 is also true of SVr4 curses, though the fact is not documented).
125
126 Note that \fBborder\fR and \fBbox\fR may be macros.
127 .SH PORTABILITY
128 These functions are described in the XSI Curses standard, Issue 4.
129 The standard specifies that they return \fBERR\fR on failure,
130 but specifies no error conditions.
131 .SH SEE ALSO
132 \fBcurses\fR(3X), \fBcurs_outopts\fR(3X).
133 .\"#
134 .\"# The following sets edit modes for GNU EMACS
135 .\"# Local Variables:
136 .\"# mode:nroff
137 .\"# fill-column:79
138 .\"# End: