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