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