From 977f80f4b60983d03d069e11032e9cd15339b6d8 Mon Sep 17 00:00:00 2001 From: Julian Hurst Date: Wed, 12 Mar 2025 04:24:30 +0100 Subject: Use nosize in list example and add docs to newlist --- tui/widget/list/list.ha | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tui/widget/list') diff --git a/tui/widget/list/list.ha b/tui/widget/list/list.ha index 4da52d5..a4ec77e 100644 --- a/tui/widget/list/list.ha +++ b/tui/widget/list/list.ha @@ -15,6 +15,9 @@ export type list = struct { frame: frame, }; +// Return an instance of list. out is the tty file, pos the starting position, +// sz is the size of the widget (if [[widget::nosize]] is used, the maximum possible +// size is used), items is the slice of items of the list. export fn newlist(out: io::file, pos: widget::coords, sz: widget::widgetsize, items: str...) (list | tty::error) = { const tsz = tty::winsize(out)?; -- cgit v1.2.3