// Border uses the characters supplied to draw a border around the window. // t, b, r, l, s correspond to top, bottom, right, left and side respectively. func (w *Window) Border(ls, rs, ts, bs, tl, tr, bl, br Char) error { res := C.wborder(w.win, C.chtype(ls), C.chtype(rs), C.chtype(ts), C.chtype(bs), C.chtype(tl), C.chtype(tr), C.chtype(bl), C.chtype(br)) if res == C.ERR { return errors.New("Failed to draw box around window") } return nil }
func (w *Window) Border(ls, rs, ts, bs, tl, tr, bl, br int) error { if C.wborder(w.win, C.chtype(ls), C.chtype(rs), C.chtype(ts), C.chtype(bs), C.chtype(tl), C.chtype(tr), C.chtype(bl), C.chtype(br)) == ERR { return Error } return nil }
// Set border characters. // 1. ls: character to be used for the left side of the window // 2. rs: character to be used for the right side of the window // 3. ts: character to be used for the top side of the window // 4. bs: character to be used for the bottom side of the window // 5. tl: character to be used for the top left corner of the window // 6. tr: character to be used for the top right corner of the window // 7. bl: character to be used for the bottom left corner of the window // 8. br: character to be used for the bottom right corner of the window func (win *Window) Border(ls, rs, ts, bs, tl, tr, bl, br int) { C.wborder((*C.WINDOW)(win), C.chtype(ls), C.chtype(rs), C.chtype(ts), C.chtype(bs), C.chtype(tl), C.chtype(tr), C.chtype(bl), C.chtype(br)) }
// Set border characters. // 1. ls: character to be used for the left side of the window // 2. rs: character to be used for the right side of the window // 3. ts: character to be used for the top side of the window // 4. bs: character to be used for the bottom side of the window // 5. tl: character to be used for the top left corner of the window // 6. tr: character to be used for the top right corner of the window // 7. bl: character to be used for the bottom left corner of the window // 8. br: character to be used for the bottom right corner of the window func (window *Window) Border(ls, rs, ts, bs, tl, tr, bl, br int) { C.wborder(window.cwin, C.chtype(ls), C.chtype(rs), C.chtype(ts), C.chtype(bs), C.chtype(tl), C.chtype(tr), C.chtype(bl), C.chtype(br)) }
func (win *Window) Border(ls, rs, ts, bs, tl, tr, bl, br chtype) error { if C.wborder((*C.WINDOW)(win), C.chtype(ls), C.chtype(rs), C.chtype(ts), C.chtype(bs), C.chtype(tl), C.chtype(tr), C.chtype(bl), C.chtype(br)) == C.ERR { return CursesError{"wborder failed"} } return nil }