╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ User.zig ─────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
225 } 226 }, 227 .down => { 228 switch (child.*) { 229 .user_header => { 230 index = stack_index; 231 }, 232 .stack => { 233 try child.input(allocator, key, root_focus); 234 }, 235 else => {}, 236 } 237 }, 238 .none => { 239 try child.input(allocator, key, root_focus); 240 }, 241 } 242 243 if (index != current_index) { 244 try root_focus.setFocus(self.box.children.keys()[index]); 245 } 246 } 247 } 248 } 249 250 pub fn clearGrid(self: *View) void { 251 self.box.clearGrid(); 252 } 253 254 pub fn getGrid(self: View) ?Grid { 255 return self.box.getGrid(); 256 } 257 258 pub fn getFocus(self: *View) *Focus { 259 return self.box.getFocus(); 260 } 261 }; 262