summaryrefslogtreecommitdiff
path: root/cmd/list.ha
blob: eacd69cf01bc2dd95b5087ece74339ffb10c8185 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
use tui;
use tui::layout;
use tui::widget;
use tui::widget::list;
use unix::tty;
use io;
use fmt;
use time;

export fn main() void = {
	const state = tui::init()!;
	defer tui::finish(&state);
	let li = list::newlist(&state, (1, 1), void, &list::style {
		style = &widget::style {
			border = true,
		},
		normal = widget::color::REDFG,
		marked = widget::color::BLUEBG,
	},"hello", "world", "bye", "world")!;

	let l = layout::newvlayout(&li);
	defer l.layout.finish(&l);
	l.layout.print(&l);
};