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