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