╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ UserSettings.zig ─────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
227 228 // reload the page with the saved email and the password fields cleared 229 self.session.haxy_moment = try evt.currentMoment(evt.admin_repo_opts, admin_repo); 230 try self.session.loadUser(); 231 try self.session.navigate(self.session.data.current_page); 232 } 233 234 fn formScroll(self: *View) *wgt.Scroll(ui.Widget) { 235 return &self.box.children.values()[scroll_index].widget.scroll; 236 } 237 238 fn formBox(self: *View) *wgt.Box(ui.Widget) { 239 return &self.formScroll().child.center.child.box; 240 } 241 242 pub fn clearGrid(self: *View) void { 243 self.box.clearGrid(); 244 } 245 246 pub fn getGrid(self: View) ?Grid { 247 return self.box.getGrid(); 248 } 249 250 pub fn getFocus(self: *View) *Focus { 251 return self.box.getFocus(); 252 } 253 254 // up leaves the view from the first control 255 pub fn atTop(self: *View, root_focus: *Focus) bool { 256 return root_focus.grandchild_id == self.control_ids[0]; 257 } 258 }; 259