1curs_border(3X) curs_border(3X)
2
3
4
6 border, wborder, box, hline, whline, vline, wvline, mvhline, mvwhline,
7 mvvline, mvwvline - create curses borders, horizontal and vertical
8 lines
9
11 #include <curses.h>
12
13 int border(chtype ls, chtype rs, chtype ts, chtype bs,
14 chtype tl, chtype tr, chtype bl, chtype br);
15 int wborder(WINDOW *win, chtype ls, chtype rs,
16 chtype ts, chtype bs, chtype tl, chtype tr,
17 chtype bl, chtype br);
18
19 int box(WINDOW *win, chtype verch, chtype horch);
20
21 int hline(chtype ch, int n);
22 int whline(WINDOW *win, chtype ch, int n);
23 int vline(chtype ch, int n);
24 int wvline(WINDOW *win, chtype ch, int n);
25
26 int mvhline(int y, int x, chtype ch, int n);
27 int mvwhline(WINDOW *win, int y, int x, chtype ch, int n);
28 int mvvline(int y, int x, chtype ch, int n);
29 int mvwvline(WINDOW *win, int y, int x, chtype ch, int n);
30
32 The border, wborder and box routines draw a box around the edges of a
33 window. Other than the window, each argument is a character with at‐
34 tributes:
35
36 ls - left side,
37 rs - right side,
38 ts - top side,
39 bs - bottom side,
40 tl - top left-hand corner,
41 tr - top right-hand corner,
42 bl - bottom left-hand corner, and
43 br - bottom right-hand corner.
44
45 If any of these arguments is zero, then the corresponding default val‐
46 ues (defined in curses.h) are used instead:
47
48 ACS_VLINE,
49 ACS_VLINE,
50 ACS_HLINE,
51 ACS_HLINE,
52 ACS_ULCORNER,
53 ACS_URCORNER,
54 ACS_LLCORNER,
55 ACS_LRCORNER.
56
57 box(win, verch, horch) is a shorthand for the following call: wbor‐
58 der(win, verch, verch, horch, horch, 0, 0, 0, 0).
59
60 The hline and whline functions draw a horizontal (left to right) line
61 using ch starting at the current cursor position in the window. The
62 current cursor position is not changed. The line is at most n charac‐
63 ters long, or as many as fit into the window.
64
65 The vline and wvline functions draw a vertical (top to bottom) line us‐
66 ing ch starting at the current cursor position in the window. The cur‐
67 rent cursor position is not changed. The line is at most n characters
68 long, or as many as fit into the window.
69
71 All routines return the integer OK. The SVr4.0 manual says "or a non-
72 negative integer if immedok is set", but this appears to be an error.
73
74 X/Open does not define any error conditions. This implementation re‐
75 turns an error if the window pointer is null.
76
77 Functions with a “mv” prefix first perform a cursor movement using
78 wmove, and return an error if the position is outside the window, or if
79 the window pointer is null.
80
82 The borders generated by these functions are inside borders (this is
83 also true of SVr4 curses, though the fact is not documented).
84
85 Note that border and box may be macros.
86
88 These functions are described in the XSI Curses standard, Issue 4. The
89 standard specifies that they return ERR on failure, but specifies no
90 error conditions.
91
93 curses(3X), curs_outopts(3X).
94
95
96
97 curs_border(3X)