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