34 lines
927 B
Zig
34 lines
927 B
Zig
const dvui = @import("dvui");
|
|
const WindowContext = @import("../WindowContext.zig");
|
|
const tab_bar = @import("tab_bar.zig");
|
|
const left_panel = @import("left_panel.zig");
|
|
const right_panel = @import("right_panel.zig");
|
|
|
|
pub fn guiFrame(ctx: *WindowContext) bool {
|
|
for (dvui.events()) |*e| {
|
|
if (e.evt == .window and e.evt.window.action == .close) return false;
|
|
if (e.evt == .app and e.evt.app.action == .quit) return false;
|
|
}
|
|
|
|
var root = dvui.box(
|
|
@src(),
|
|
.{ .dir = .vertical },
|
|
.{ .expand = .both, .background = true, .style = .window },
|
|
);
|
|
{
|
|
tab_bar.tabBar(ctx);
|
|
|
|
var content_row = dvui.box(@src(), .{ .dir = .horizontal }, .{ .expand = .both });
|
|
{
|
|
left_panel.leftPanel(ctx);
|
|
|
|
right_panel.rightPanel(ctx);
|
|
}
|
|
content_row.deinit();
|
|
}
|
|
root.deinit();
|
|
|
|
ctx.frame_index += 1;
|
|
return true;
|
|
}
|