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