╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ Home.zig ─────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
168 } else { 169 try child.input(allocator, key, root_focus); 170 } 171 } 172 }, 173 else => {}, 174 } 175 }, 176 .down => { 177 switch (child.*) { 178 .home_header => { 179 index = stack_index; 180 }, 181 .stack => { 182 try child.input(allocator, key, root_focus); 183 }, 184 else => {}, 185 } 186 }, 187 .none => { 188 try child.input(allocator, key, root_focus); 189 }, 190 } 191 192 if (index != current_index) { 193 root_focus.setFocus(self.box.children.keys()[index]); 194 } 195 } 196 } 197 } 198 199 pub fn clearGrid(self: *View) void { 200 self.box.clearGrid(); 201 } 202 203 pub fn getGrid(self: View) ?Grid { 204 return self.box.getGrid(); 205 } 206 207 pub fn getFocus(self: *View) *Focus { 208 return self.box.getFocus(); 209 } 210 }; 211