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