╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ Header.zig ───────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
169 } 170 171 pub fn getGrid(self: View) ?Grid { 172 return self.box.getGrid(); 173 } 174 175 pub fn getFocus(self: *View) *Focus { 176 return self.box.getFocus(); 177 } 178 179 pub fn getSelectedIndex(self: View) ?usize { 180 return self.currentTabIndex(); 181 } 182 183 fn currentTabIndex(self: View) ?usize { 184 const child_id = self.box.focus.child_id orelse return null; 185 return self.tab_ids.getIndex(child_id); 186 } 187 }; 188