╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ widget.zig ───────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
2071 } 2072 2073 fn maxWidth(choices: []const Choice) usize { 2074 var width: usize = 0; 2075 for (choices) |choice| width = @max(width, choice.text.len, choice.label.len, choice.bottom_label.len); 2076 return width; 2077 } 2078 2079 pub fn clearGrid(self: *CopyableText) void { 2080 self.box.clearGrid(); 2081 } 2082 2083 pub fn getGrid(self: CopyableText) ?Grid { 2084 return self.box.getGrid(); 2085 } 2086 2087 pub fn getFocus(self: *CopyableText) *Focus { 2088 return self.box.getFocus(); 2089 } 2090 }; 2091