╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ AuthTab.zig ──────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
56 pub fn build(self: *View, allocator: std.mem.Allocator, constraint: layout.Constraint, root_focus: *Focus) !void { 57 // update the displayed text based on session state. the inner Text 58 // widget's content is just a slice, so we can repoint it without 59 // re-allocating. 60 if (self.text_box.box.children.values().len > 0) { 61 const text_widget = &self.text_box.box.children.values()[0].widget.text; 62 text_widget.content = self.text(); 63 } 64 try self.text_box.build(allocator, constraint, root_focus); 65 } 66 67 pub fn input(self: *View, allocator: std.mem.Allocator, key: Key, root_focus: *Focus) !void { 68 try self.text_box.input(allocator, key, root_focus); 69 } 70 71 pub fn clearGrid(self: *View) void { 72 self.text_box.clearGrid(); 73 } 74 75 pub fn getGrid(self: View) ?Grid { 76 return self.text_box.getGrid(); 77 } 78 79 pub fn getFocus(self: *View) *Focus { 80 return self.text_box.getFocus(); 81 } 82 }; 83