summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tui/widget/widget.ha11
1 files changed, 10 insertions, 1 deletions
diff --git a/tui/widget/widget.ha b/tui/widget/widget.ha
index cb202be..77b6f88 100644
--- a/tui/widget/widget.ha
+++ b/tui/widget/widget.ha
@@ -10,15 +10,24 @@ export type resizefn = fn(w: *widget, ttysize: tty::ttysize) void;
export type nosize = void;
export type widgetsize = (tty::ttysize | nosize);
+export type style = struct {
+ border: bool,
+};
+
+export def DEFAULT_STYLE: style = style {
+ border = false,
+};
+
export type widget = struct {
out: io::file,
print: *printfn,
resize: *resizefn,
pos: coords,
sz: widgetsize,
+ style: style,
};
-def gotoroot: str = "\x1B[1;1f";
+def gotoroot: str = "\x1B[1;1H";
export fn print(out: io::file, s: str, pos: coords) void = {
fmt::fprintf(out, "\x1B[{};{}H", pos.0, pos.1)!;