xref: /minix3/lib/libcurses/curses_border.3 (revision 51ffecc181005cb45a40108612ee28d1daaeeb86)
1*51ffecc1SBen Gras.\"	$NetBSD: curses_border.3,v 1.4 2004/03/16 19:20:20 snj Exp $
2*51ffecc1SBen Gras.\"
3*51ffecc1SBen Gras.\" Copyright (c) 2002
4*51ffecc1SBen Gras.\"	Brett Lymn (blymn@NetBSD.org, brett_lymn@yahoo.com.au)
5*51ffecc1SBen Gras.\"
6*51ffecc1SBen Gras.\" This code is donated to the NetBSD Foundation by the Author.
7*51ffecc1SBen Gras.\"
8*51ffecc1SBen Gras.\" Redistribution and use in source and binary forms, with or without
9*51ffecc1SBen Gras.\" modification, are permitted provided that the following conditions
10*51ffecc1SBen Gras.\" are met:
11*51ffecc1SBen Gras.\" 1. Redistributions of source code must retain the above copyright
12*51ffecc1SBen Gras.\"    notice, this list of conditions and the following disclaimer.
13*51ffecc1SBen Gras.\" 2. Redistributions in binary form must reproduce the above copyright
14*51ffecc1SBen Gras.\"    notice, this list of conditions and the following disclaimer in the
15*51ffecc1SBen Gras.\"    documentation and/or other materials provided with the distribution.
16*51ffecc1SBen Gras.\" 3. The name of the Author may not be used to endorse or promote
17*51ffecc1SBen Gras.\"    products derived from this software without specific prior written
18*51ffecc1SBen Gras.\"    permission.
19*51ffecc1SBen Gras.\"
20*51ffecc1SBen Gras.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
21*51ffecc1SBen Gras.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22*51ffecc1SBen Gras.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23*51ffecc1SBen Gras.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE
24*51ffecc1SBen Gras.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25*51ffecc1SBen Gras.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26*51ffecc1SBen Gras.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27*51ffecc1SBen Gras.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28*51ffecc1SBen Gras.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29*51ffecc1SBen Gras.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30*51ffecc1SBen Gras.\" SUCH DAMAGE.
31*51ffecc1SBen Gras.\"
32*51ffecc1SBen Gras.\"
33*51ffecc1SBen Gras.Dd August 12, 2002
34*51ffecc1SBen Gras.Dt CURSES_BORDER 3
35*51ffecc1SBen Gras.Os
36*51ffecc1SBen Gras.Sh NAME
37*51ffecc1SBen Gras.Nm curses_border ,
38*51ffecc1SBen Gras.Nm border ,
39*51ffecc1SBen Gras.Nm box ,
40*51ffecc1SBen Gras.Nm wborder
41*51ffecc1SBen Gras.Nd curses border drawing routines
42*51ffecc1SBen Gras.Sh LIBRARY
43*51ffecc1SBen Gras.Lb libcurses
44*51ffecc1SBen Gras.Sh SYNOPSIS
45*51ffecc1SBen Gras.In curses.h
46*51ffecc1SBen Gras.Ft int
47*51ffecc1SBen Gras.Fo border
48*51ffecc1SBen Gras.Fa "chtype ls"
49*51ffecc1SBen Gras.Fa "chtype rs"
50*51ffecc1SBen Gras.Fa "chtype ts"
51*51ffecc1SBen Gras.Fa "chtype bs"
52*51ffecc1SBen Gras.Fa "chtype tl"
53*51ffecc1SBen Gras.Fa "chtype tr"
54*51ffecc1SBen Gras.Fa "chtype bl"
55*51ffecc1SBen Gras.Fa "chtype br"
56*51ffecc1SBen Gras.Fc
57*51ffecc1SBen Gras.Ft int
58*51ffecc1SBen Gras.Fn box "WINDOW *win" "chtype vertical" "chtype horizontal"
59*51ffecc1SBen Gras.Ft int
60*51ffecc1SBen Gras.Fo wborder
61*51ffecc1SBen Gras.Fa "WINDOW *win"
62*51ffecc1SBen Gras.Fa "chtype ls"
63*51ffecc1SBen Gras.Fa "chtype rs"
64*51ffecc1SBen Gras.Fa "chtype ts"
65*51ffecc1SBen Gras.Fa "chtype bs"
66*51ffecc1SBen Gras.Fa "chtype tl"
67*51ffecc1SBen Gras.Fa "chtype tr"
68*51ffecc1SBen Gras.Fa "chtype bl"
69*51ffecc1SBen Gras.Fa "chtype br"
70*51ffecc1SBen Gras.Fc
71*51ffecc1SBen Gras.Sh DESCRIPTION
72*51ffecc1SBen GrasThese functions draw borders around
73*51ffecc1SBen Gras.Dv stdscr
74*51ffecc1SBen Grasor around the specified window.
75*51ffecc1SBen Gras.Pp
76*51ffecc1SBen GrasThe
77*51ffecc1SBen Gras.Fn border
78*51ffecc1SBen Grasfunction draws a border around
79*51ffecc1SBen Gras.Dv stdscr
80*51ffecc1SBen Grasusing the characters given as arguments to the function.
81*51ffecc1SBen GrasThe
82*51ffecc1SBen Gras.Fa ls ,
83*51ffecc1SBen Gras.Fa rs ,
84*51ffecc1SBen Gras.Fa ts
85*51ffecc1SBen Grasand
86*51ffecc1SBen Gras.Fa bs
87*51ffecc1SBen Grasare the characters used to draw the left, right, top and bottom sides,
88*51ffecc1SBen Grasrespectively.
89*51ffecc1SBen GrasThe
90*51ffecc1SBen Gras.Fa tl ,
91*51ffecc1SBen Gras.Fa tr ,
92*51ffecc1SBen Gras.Fa bl
93*51ffecc1SBen Grasand
94*51ffecc1SBen Gras.Fa br
95*51ffecc1SBen Grasare the characters used to draw the top-left, top-right, bottom-left
96*51ffecc1SBen Grasand bottom-right corners, respectively.
97*51ffecc1SBen GrasIf any of the characters have a text portion that is 0 then a default
98*51ffecc1SBen Grasalternate character set character is used for that character.
99*51ffecc1SBen GrasNote that even though the text portion of the argument is 0, the argument
100*51ffecc1SBen Grascan still be used to specify the attributes for that portion of the border.
101*51ffecc1SBen GrasThe following table shows the default characters for each argument:
102*51ffecc1SBen Gras.Pp
103*51ffecc1SBen Gras.Bl -column "ls" -offset indent
104*51ffecc1SBen Gras.It ls	ACS_VLINE
105*51ffecc1SBen Gras.It rs	ACS_VLINE
106*51ffecc1SBen Gras.It ts	ACS_HLINE
107*51ffecc1SBen Gras.It bs	ACS_HLINE
108*51ffecc1SBen Gras.It tl	ACS_ULCORNER
109*51ffecc1SBen Gras.It tr	ACS_URCORNER
110*51ffecc1SBen Gras.It bl	ACS_LLCORNER
111*51ffecc1SBen Gras.It br	ACS_LRCORNER
112*51ffecc1SBen Gras.El
113*51ffecc1SBen Gras.Pp
114*51ffecc1SBen Gras.Fn wborder
115*51ffecc1SBen Grasis the same as
116*51ffecc1SBen Gras.Fn border
117*51ffecc1SBen Grasexcepting that the border is drawn around the specified window.
118*51ffecc1SBen Gras.Pp
119*51ffecc1SBen GrasThe
120*51ffecc1SBen Gras.Fn box
121*51ffecc1SBen Grascommand draws a box around the window given in
122*51ffecc1SBen Gras.Fa win
123*51ffecc1SBen Grasusing the
124*51ffecc1SBen Gras.Fa vertical
125*51ffecc1SBen Grascharacter for the vertical lines and the
126*51ffecc1SBen Gras.Fa horizontal
127*51ffecc1SBen Grascharacter for the horizontal lines.
128*51ffecc1SBen GrasThe corner characters of this box will be the defaults as described for
129*51ffecc1SBen Gras.Fn border
130*51ffecc1SBen Grasabove.
131*51ffecc1SBen GrasPassing characters with text portion that is 0 to
132*51ffecc1SBen Gras.Fn box
133*51ffecc1SBen Graswill result in the same defaults as those for
134*51ffecc1SBen Gras.Fn border
135*51ffecc1SBen Grasas described above.
136*51ffecc1SBen Gras.Sh RETURN VALUES
137*51ffecc1SBen GrasFunctions returning pointers will return
138*51ffecc1SBen Gras.Dv NULL
139*51ffecc1SBen Grasif an error is detected.
140*51ffecc1SBen GrasThe functions that return an int will return one of the following
141*51ffecc1SBen Grasvalues:
142*51ffecc1SBen Gras.Pp
143*51ffecc1SBen Gras.Bl -tag -width ERR -compact
144*51ffecc1SBen Gras.It Er OK
145*51ffecc1SBen GrasThe function completed successfully.
146*51ffecc1SBen Gras.It Er ERR
147*51ffecc1SBen GrasAn error occurred in the function.
148*51ffecc1SBen Gras.El
149*51ffecc1SBen Gras.Sh SEE ALSO
150*51ffecc1SBen Gras.Xr curses_attributes 3 ,
151*51ffecc1SBen Gras.Xr curses_line 3
152*51ffecc1SBen Gras.Sh STANDARDS
153*51ffecc1SBen GrasThe
154*51ffecc1SBen Gras.Nx
155*51ffecc1SBen GrasCurses library complies with the X/Open Curses specification, part of the
156*51ffecc1SBen GrasSingle Unix Specification.
157*51ffecc1SBen Gras.Sh HISTORY
158*51ffecc1SBen GrasThe Curses package appeared in
159*51ffecc1SBen Gras.Bx 4.0 .
160