╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ UserNotifications.zig ────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
251 return; 252 } 253 if (direction == .up) if (self.contentStack().getSelected()) |selected| if (selected.atTop(root_focus)) { 254 root_focus.setFocus(self.control_ids[self.view_index]); 255 return; 256 }; 257 try self.contentStack().input(allocator, key, root_focus); 258 } 259 260 // moving up from the sub header returns to the page's tabs 261 pub fn atTop(self: *View) bool { 262 return self.headerActive(); 263 } 264 265 // arriving from the page's tabs lands on the sub header, not the content 266 pub fn focusHeader(self: *View, root_focus: *Focus) bool { 267 root_focus.setFocus(self.control_ids[self.view_index]); 268 return true; 269 } 270 271 pub fn clearGrid(self: *View) void { 272 self.box.clearGrid(); 273 } 274 275 pub fn getGrid(self: View) ?Grid { 276 return self.box.getGrid(); 277 } 278 279 pub fn getFocus(self: *View) *Focus { 280 return self.box.getFocus(); 281 } 282 }; 283