╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ Home.zig ─────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
157 .home_header => { 158 if (stack.getSelected()) |selected_widget| switch (selected_widget.*) { 159 .home_users => |*v| return v.focusHeader(root_focus), 160 else => {}, 161 }; 162 index = stack_index; 163 }, 164 .stack => { 165 try child.input(allocator, key, root_focus); 166 }, 167 else => {}, 168 } 169 }, 170 .none => { 171 try child.input(allocator, key, root_focus); 172 }, 173 } 174 175 if (index != current_index) { 176 root_focus.setFocus(self.box.children.keys()[index]); 177 } 178 } 179 } 180 } 181 182 pub fn clearGrid(self: *View) void { 183 self.box.clearGrid(); 184 } 185 186 pub fn getGrid(self: View) ?Grid { 187 return self.box.getGrid(); 188 } 189 190 pub fn getFocus(self: *View) *Focus { 191 return self.box.getFocus(); 192 } 193 }; 194