feat(element): parameter *const App.Model
Some checks failed
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 55s
Some checks failed
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 55s
The renderer will provide `resize`, `reposition` and `minSize` (for the `Scrollable` `Element`) with a read-only pointer to the model of the application (similar to how it is already done for `handle` and `content`). Every interface function now has the same data that it can each use for implementing its corresponding task based on local and shared variables through the element instance and model pointer.
This commit is contained in:
@@ -89,8 +89,8 @@ pub fn main() !void {
|
||||
else => {},
|
||||
}
|
||||
|
||||
container.resize(try renderer.resize());
|
||||
container.reposition(.{});
|
||||
container.resize(&app.model, try renderer.resize());
|
||||
container.reposition(&app.model, .{});
|
||||
try renderer.render(@TypeOf(container), &container, App.Model, &app.model);
|
||||
try renderer.flush();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user