Function ncursesw::wborder [−][src]
pub fn wborder(
handle: WINDOW,
ls: ChtypeChar,
rs: ChtypeChar,
ts: ChtypeChar,
bs: ChtypeChar,
tl: ChtypeChar,
tr: ChtypeChar,
bl: ChtypeChar,
br: ChtypeChar
) -> Result<(), NCurseswError>
Expand description
Draw a box around the edges of the given window.
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: ACS_VLINE, ACS_VLINE, ACS_HLINE, ACS_HLINE, ACS_ULCORNER, ACS_URCORNER, ACS_LLCORNER, ACS_LRCORNER.
Example
extern crate ncursesw;
use ncursesw::*;
use shims::ncurses::{
ACS_VLINE, ACS_HLINE, ACS_ULCORNER,
ACS_URCORNER, ACS_LLCORNER, ACS_LRCORNER
};
let win_size = Size { lines: 10, columns: 50 };
let win_origin = Origin { y: 5, x: 5 };
let win = newwin(win_size, win_origin)?;
let ls = ChtypeChar::from_chtype(ACS_VLINE());
let rs = ChtypeChar::from_chtype(ACS_VLINE());
let ts = ChtypeChar::from_chtype(ACS_HLINE());
let bs = ChtypeChar::from_chtype(ACS_HLINE());
let tl = ChtypeChar::from_chtype(ACS_ULCORNER());
let tr = ChtypeChar::from_chtype(ACS_URCORNER());
let bl = ChtypeChar::from_chtype(ACS_LLCORNER());
let br = ChtypeChar::from_chtype(ACS_LRCORNER());
wborder(win, ls, rs, ts, bs, tl, tr, bl, br)?;
delwin(win)?;