╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ Users.zig ────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
172 fn searchBox(self: *View) *ui.widget.SearchBox { 173 return &self.box.children.values()[header_index].widget.box.children.values()[0].widget.search_box; 174 } 175 176 fn listScroll(self: *View) *ui.widget.FlowBox.Scroll { 177 return &self.box.children.values()[list_index].widget.flow_box_scroll; 178 } 179 180 fn headerActive(self: *View) bool { 181 return self.box.getFocus().child_id == self.box.children.keys()[header_index]; 182 } 183 184 pub fn clearGrid(self: *View) void { 185 self.box.clearGrid(); 186 } 187 188 pub fn getGrid(self: View) ?Grid { 189 return self.box.getGrid(); 190 } 191 192 pub fn getFocus(self: *View) *Focus { 193 return self.box.getFocus(); 194 } 195 196 // up leaves the tab from the search box 197 pub fn atTop(self: *View) bool { 198 return self.headerActive(); 199 } 200 201 pub fn focusHeader(self: *View, root_focus: *Focus) void { 202 root_focus.setFocus(self.searchBox().getFocus().id); 203 } 204 }; 205