╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ User.zig ─────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
230 .flow_box_scroll => |*v| v.getSelectedIndex() == 0, 231 .home_settings => |*v| v.getSelectedIndex() == 0, 232 .home_auth => |*v| v.getSelectedIndex() == 0, 233 .quit => |*v| v.getSelectedIndex() == 0, 234 else => false, 235 }; 236 if (at_top) { 237 index = header_index; 238 } else { 239 try child.input(allocator, key, root_focus); 240 } 241 } 242 }, 243 else => {}, 244 } 245 }, 246 .down => { 247 switch (child.*) { 248 .user_header => { 249 index = stack_index; 250 }, 251 .stack => { 252 try child.input(allocator, key, root_focus); 253 }, 254 else => {}, 255 } 256 }, 257 .none => { 258 try child.input(allocator, key, root_focus); 259 }, 260 } 261 262 if (index != current_index) { 263 root_focus.setFocus(self.box.children.keys()[index]); 264 } 265 } 266 } 267 } 268 269 pub fn clearGrid(self: *View) void { 270 self.box.clearGrid(); 271 } 272 273 pub fn getGrid(self: View) ?Grid { 274 return self.box.getGrid(); 275 } 276 277 pub fn getFocus(self: *View) *Focus { 278 return self.box.getFocus(); 279 } 280 }; 281