╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ thread.zig ───────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
3343 if (widget.listBackId(self.detailFrame(index)) != null) return widget.focusListBack(self.detailFrame(index), root_focus); 3344 _ = self.detail(index).focusFirst(root_focus); 3345 } 3346 3347 // return to the list. 3348 fn focusList(self: *This, index: usize, root_focus: *Focus) void { 3349 root_focus.setFocus(self.listScroll(index).getFocus().id); 3350 } 3351 3352 // cross to the header tabs above the stack. 3353 fn focusHeader(self: *This, root_focus: *Focus) void { 3354 root_focus.setFocus(self.box.children.keys()[header_index]); 3355 } 3356 3357 pub fn clearGrid(self: *This) void { 3358 self.box.clearGrid(); 3359 } 3360 3361 pub fn getGrid(self: This) ?Grid { 3362 return self.box.getGrid(); 3363 } 3364 3365 pub fn getFocus(self: *This) *Focus { 3366 return self.box.getFocus(); 3367 } 3368 3369 // for the parent's "scroll up at the top jumps to the header" check: at the 3370 // top only while the header tabs hold focus, so up from the split 3371 // crosses into the tabs first. 3372 pub fn atTop(self: *This) bool { 3373 return self.headerActive(); 3374 } 3375 }; 3376 } 3377