╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ Header.zig ───────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
236 } 237 238 pub fn clearGrid(self: *View) void { 239 self.scroll.clearGrid(); 240 } 241 242 pub fn getGrid(self: View) ?Grid { 243 return self.scroll.getGrid(); 244 } 245 246 pub fn getFocus(self: *View) *Focus { 247 return self.scroll.getFocus(); 248 } 249 250 pub fn getSelectedIndex(self: View) ?usize { 251 return self.currentTabIndex(); 252 } 253 254 fn currentTabIndex(self: View) ?usize { 255 const child_id = self.scroll.child.box.focus.child_id orelse return null; 256 return self.tab_ids.getIndex(child_id); 257 } 258 }; 259