Files
tui-diff/src/root.zig
Yves Biener 1485385735
Some checks failed
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 1m9s
mod: simplify Container and Element creation with updated zterm behavior
2025-11-27 21:23:36 +01:00

32 lines
821 B
Zig

//! `tui-diff` root module
// TODO planned features:
// FIX known issues:
pub const Event = union(enum) {};
pub fn Container(App: type, gpa: Allocator, element: *elements.Root(App), tree: *elements.Tree(App), diffs: *App.Scrollable) !App.Container {
var root: App.Container = try .init(gpa, .{
.layout = .{
.direction = .horizontal,
.separator = .{
.enabled = true,
},
},
}, element.element());
try root.append(try .init(gpa, .{}, tree.element()));
try root.append(try .init(gpa, .{}, diffs.element()));
return root;
}
const std = @import("std");
const Allocator = std.mem.Allocator;
pub const elements = @import("elements.zig");
pub const Model = @import("model.zig");
test {
std.testing.refAllDeclsRecursive(@This());
}