summaryrefslogtreecommitdiff
path: root/cmd/list_strictsz.ha
blob: 68023872937c5ee85335a22e1171af21928c0269 (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
25
26
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::newscrolllist(&state, (1, 1), tty::ttysize {
		rows = 3,
		columns = 4,
	}, &list::liststyle {
		style = &widget::style {
			border = true,
		},
		normal = widget::color::DEFAULTFG,
		marked = widget::color::DEFAULTBG,
	},
	"hel🎉", "world", "bye", "world")!;
	let l = layout::newvlayout(&li);
	l.layout.print(&l);
};