╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ Header.zig ───────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
220 221 pub fn clearGrid(self: *View) void { 222 self.scroll.clearGrid(); 223 } 224 225 pub fn getGrid(self: View) ?Grid { 226 return self.scroll.getGrid(); 227 } 228 229 pub fn getFocus(self: *View) *Focus { 230 return self.scroll.getFocus(); 231 } 232 233 pub fn getSelectedIndex(self: View) ?usize { 234 return self.currentTabIndex(); 235 } 236 237 fn currentTabIndex(self: View) ?usize { 238 const child_id = self.scroll.child.box.focus.child_id orelse return null; 239 return self.tab_ids.getIndex(child_id); 240 } 241 }; 242