ncurses 4.2
[ncurses.git] / Ada95 / html / curs_border.3x.html
1 <HTML>
2 <BODY BGCOLOR="#99ccbb" TEXT="#000000" LINK="#4060b0" VLINK="#000080" ALINK="#ff4040">
3 <PRE>
4        <STRONG>border</STRONG>,  <STRONG>wborder</STRONG>, <STRONG>box</STRONG>, <STRONG>hline</STRONG>, <STRONG>whline</STRONG>, <STRONG>vline</STRONG>, <STRONG>wvline</STRONG> - cre-
5        ate <STRONG>curses</STRONG> borders, horizontal and vertical lines
6
7
8 </PRE>
9 <H2>SYNOPSIS</H2><PRE>
10        <STRONG>#include</STRONG> <STRONG>&lt;curses.h&gt;</STRONG>
11        <STRONG>int</STRONG> <STRONG>border(chtype</STRONG> <STRONG>ls,</STRONG> <STRONG>chtype</STRONG> <STRONG>rs,</STRONG> <STRONG>chtype</STRONG> <STRONG>ts,</STRONG> <STRONG>chtype</STRONG> <STRONG>bs,</STRONG>
12           <STRONG>chtype</STRONG> <STRONG>tl,</STRONG> <STRONG>chtype</STRONG> <STRONG>tr,</STRONG> <STRONG>chtype</STRONG> <STRONG>bl,</STRONG> <STRONG>chtype</STRONG> <STRONG>br);</STRONG>
13        <STRONG>int</STRONG> <STRONG>wborder(WINDOW</STRONG> <STRONG>*win,</STRONG> <STRONG>chtype</STRONG> <STRONG>ls,</STRONG> <STRONG>chtype</STRONG> <STRONG>rs,</STRONG>
14           <STRONG>chtype</STRONG> <STRONG>ts,</STRONG> <STRONG>chtype</STRONG> <STRONG>bs,</STRONG> <STRONG>chtype</STRONG> <STRONG>tl,</STRONG> <STRONG>chtype</STRONG> <STRONG>tr,</STRONG>
15           <STRONG>chtype</STRONG> <STRONG>bl,</STRONG> <STRONG>chtype</STRONG> <STRONG>br);</STRONG>
16        <STRONG>int</STRONG> <STRONG>box(WINDOW</STRONG> <STRONG>*win,</STRONG> <STRONG>chtype</STRONG> <STRONG>verch,</STRONG> <STRONG>chtype</STRONG> <STRONG>horch);</STRONG>
17        <STRONG>int</STRONG> <STRONG>hline(chtype</STRONG> <STRONG>ch,</STRONG> <STRONG>int</STRONG> <STRONG>n);</STRONG>
18        <STRONG>int</STRONG> <STRONG>whline(WINDOW</STRONG> <STRONG>*win,</STRONG> <STRONG>chtype</STRONG> <STRONG>ch,</STRONG> <STRONG>int</STRONG> <STRONG>n);</STRONG>
19        <STRONG>int</STRONG> <STRONG>vline(chtype</STRONG> <STRONG>ch,</STRONG> <STRONG>int</STRONG> <STRONG>n);</STRONG>
20        <STRONG>int</STRONG> <STRONG>wvline(WINDOW</STRONG> <STRONG>*win,</STRONG> <STRONG>chtype</STRONG> <STRONG>ch,</STRONG> <STRONG>int</STRONG> <STRONG>n);</STRONG>
21        <STRONG>mvhline(int</STRONG> <STRONG>y,</STRONG> <STRONG>int</STRONG> <STRONG>x,</STRONG> <STRONG>chtype</STRONG> <STRONG>ch,</STRONG> <STRONG>int</STRONG> <STRONG>n);</STRONG>
22        <STRONG>mvwhline(WINDOW</STRONG> <STRONG>*,</STRONG> <STRONG>int</STRONG> <STRONG>y,</STRONG> <STRONG>int</STRONG> <STRONG>x,</STRONG> <STRONG>chtype</STRONG> <STRONG>ch,</STRONG> <STRONG>int</STRONG> <STRONG>n);</STRONG>
23        <STRONG>int</STRONG> <STRONG>mvvline(int</STRONG> <STRONG>y,</STRONG> <STRONG>int</STRONG> <STRONG>x,</STRONG> <STRONG>chtype</STRONG> <STRONG>ch,</STRONG> <STRONG>int</STRONG> <STRONG>n);</STRONG>
24        <STRONG>int</STRONG> <STRONG>mvwvline(WINDOW</STRONG> <STRONG>*,</STRONG> <STRONG>int</STRONG> <STRONG>y,</STRONG> <STRONG>int</STRONG> <STRONG>x,</STRONG> <STRONG>chtype</STRONG> <STRONG>ch,</STRONG> <STRONG>int</STRONG> <STRONG>n);</STRONG>
25
26
27 </PRE>
28 <H2>DESCRIPTION</H2><PRE>
29        The <STRONG>border</STRONG>, <STRONG>wborder</STRONG> and <STRONG>box</STRONG> routines draw a box around the
30        edges  of  a  window.   The argument <EM>ls</EM> is a character and
31        attributes used for the left side  of  the  border,  <EM>rs</EM>  -
32        right  side,  <EM>ts</EM>  -  top  side, <EM>bs</EM> - bottom side, <EM>tl</EM> - top
33        left-hand corner, <EM>tr</EM> - top right-hand corner, <EM>bl</EM> -  bottom
34        left-hand  corner,  and <EM>br</EM> - bottom right-hand corner.  If
35        any of these arguments is zero, then the following default
36        values  (defined in <STRONG>curses.h</STRONG>) are used instead: <STRONG>ACS_VLINE</STRONG>,
37        <STRONG>ACS_VLINE</STRONG>,     <STRONG>ACS_HLINE</STRONG>,     <STRONG>ACS_HLINE</STRONG>,     <STRONG>ACS_ULCORNER</STRONG>,
38        <STRONG>ACS_URCORNER</STRONG>, <STRONG>ACS_BLCORNER</STRONG>, <STRONG>ACS_BRCORNER</STRONG>.
39
40        <STRONG>box(</STRONG><EM>win</EM><STRONG>,</STRONG>  <EM>verch</EM><STRONG>,</STRONG>  <EM>horch</EM><STRONG>)</STRONG>  is a shorthand for the following
41        call: <STRONG>wborder(</STRONG><EM>win</EM><STRONG>,</STRONG> <EM>verch</EM><STRONG>,</STRONG> <EM>verch</EM><STRONG>,</STRONG> <EM>horch</EM><STRONG>,</STRONG> <EM>horch</EM><STRONG>,</STRONG>  <STRONG>0,</STRONG>  <STRONG>0,</STRONG>  <STRONG>0,</STRONG>
42        <STRONG>0)</STRONG>.
43
44        The  <STRONG>hline</STRONG> and <STRONG>whline</STRONG> functions draw a horizontal (left to
45        right) line using <EM>ch</EM> starting at the current cursor  posi-
46        tion  in  the  window.  The current cursor position is not
47        changed.  The line is at most <EM>n</EM>  characters  long,  or  as
48        many as fit into the window.
49
50        The  <STRONG>vline</STRONG>  and  <STRONG>wvline</STRONG>  functions draw a vertical (top to
51        bottom) line using <EM>ch</EM> starting at the current cursor posi-
52        tion  in  the  window.  The current cursor position is not
53        changed.  The line is at most <EM>n</EM>  characters  long,  or  as
54        many as fit into the window.
55
56
57 </PRE>
58 <H2>RETURN VALUE</H2><PRE>
59        All  routines  return  the  integer <STRONG>OK</STRONG>.  The SVr4.0 manual
60        says "or a non-negative integer if <STRONG>immedok</STRONG>  is  set",  but
61        this appears to be an error.
62        The  borders  generated by these functions are <EM>inside</EM> bor-
63        ders (this is also true of SVr4 curses, though the fact is
64        not documented).
65
66        Note that <STRONG>border</STRONG> and <STRONG>box</STRONG> may be macros.
67
68
69 </PRE>
70 <H2>PORTABILITY</H2><PRE>
71        These  functions are described in the XSI Curses standard,
72        Issue 4.  Additional functions <STRONG>mvhline</STRONG>, <STRONG>mvvline</STRONG>, <STRONG>mvwhline</STRONG>,
73        and <STRONG>mvwvline</STRONG> are described there which this implementation
74        does not yet support.  The standard  specifies  that  they
75        return  <STRONG>ERR</STRONG> on failure, but specifies no error conditions.
76
77
78 </PRE>
79 <H2>SEE ALSO</H2><PRE>
80        <STRONG><A HREF="ncurses.3x.html">curses(3X)</A></STRONG>, <STRONG><A HREF="curs_outopts.3x.html">curs_outopts(3X)</A></STRONG>.
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118 </PRE>
119 </BODY>
120 </HTML>