mod: change widget interface Widget.content replaced with Widget.render
Some checks failed
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 29s

The .resize `Event` has been adapted to include an _anchor_, which
provide the full necessary information for each widget where to render
on the screen with what requested size. Each Widget can then dynamically
decide how and what to render (i.e. provide placeholder text in case the
size is too small, etc.).
This commit is contained in:
2024-11-10 15:53:28 +01:00
parent 7872223c24
commit a201f2b653
9 changed files with 54 additions and 32 deletions

View File

@@ -47,7 +47,7 @@ pub fn App(comptime E: type, comptime R: fn (comptime bool) type, comptime fulls
pub const Event = mergeTaggedUnions(event.SystemEvent, E);
pub const Renderer = R(fullscreen);
pub const Layout = @import("layout.zig").Layout(Event, Renderer);
pub const Widget = @import("widget.zig").Widget(Event);
pub const Widget = @import("widget.zig").Widget(Event, Renderer);
queue: Queue(Event, 256) = .{},
thread: ?std.Thread = null,