Next: , Previous: , Up: The basic curses library   [Contents][Index]


5.2.11 Borders and lines

Procedure: border win ls rs ts bs tl tr bl br

The border routine draws a box around the edges of a window. Other than win, each argument is a rendered character, representing a side or a corner of the border. The arguments are ls - left side, rs - right side, ts - top side, bs - bottom side, tl - top left-hand corner, tr - top right-hand corner, bl - bottom left-hand corner, and br - bottom right-hand corner.

If any of these arguments is zero, then the corresponding default values are used instead. The default values are the line drawing characters that create a box, and they would be ls = acs-vline, rs = acs-vline, ts = acs-hline, bs = acs-hline, tl = acs-ulcorner, tr = acs-urcorner, bl = acs-llcorner, br = acs-lrcorner.

The characters used should have the standard character width. Double-width characters should not be used in borders.

It returns #f on failure and #t on success.

Procedure: box win verch horch

box is a shorthand for the following call:

(border win verch verch horch horch 0 0 0 0)
Procedure: hline win ch n #:key y x

The hline procedure draws a horizontal (left to right) line using ch starting at the current cursor position in the window. The current cursor position is not changed. The line is at most n characters long, or as many as fit into the window.

The optional parameters y and x cause the cursor to be moved to that position before drawing the line.

The return value is unspecified.

Procedure: vline win ch n #:key y x

The vline procedure draws a vertical (top to bottom) line using ch starting at the current cursor position in the window. The current cursor position is not changed. The line is at most n characters long, or as many as fit into the window.

If the key parameters y and x are set, it moves the cursor before drawing the line.

The return value is unspecified.


Next: , Previous: , Up: The basic curses library   [Contents][Index]