╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ widget.zig ───────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
2117 2118 fn maxWidth(choices: []const Choice) usize { 2119 var width: usize = 0; 2120 for (choices) |choice| width = @max(width, choice.text.len, choice.label.len, choice.bottom_label.len); 2121 return width; 2122 } 2123 2124 pub fn clearGrid(self: *CopyableText) void { 2125 self.box.clearGrid(); 2126 } 2127 2128 pub fn getGrid(self: CopyableText) ?Grid { 2129 return self.box.getGrid(); 2130 } 2131 2132 pub fn getFocus(self: *CopyableText) *Focus { 2133 return self.box.getFocus(); 2134 } 2135 }; 2136