DVUI

init

Parameters

#
self:*Branch
*Branch
src:std.builtin.SourceLocation
std.builtin.SourceLocation
reorder:*TreeWidget
*TreeWidget
init_opts:Branch.InitOptions
Branch.InitOptions
opts:Options
Options

Source

Implementation

#
pub fn init(self: *Branch, src: std.builtin.SourceLocation, reorder: *TreeWidget, init_opts: Branch.InitOptions, opts: Options) void {
        self.* = .{};
        self.tree = reorder;
        self.init_options = init_opts;
        self.options = defaults.override(opts);
        self.wd = WidgetData.init(src, .{}, wrapOuter(self.options).override(.{ .rect = .{} }));
        self.expanded = if (dvui.dataGet(null, self.wd.id, "_expanded", bool)) |e| e else init_opts.expanded;
    }