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