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