feat(tabs): complete tabs widget and next_/previous_tabs

This commit is contained in:
CJ van den Berg 2025-01-24 23:26:41 +01:00
parent 41b230d17f
commit 5dd47f7248
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
4 changed files with 135 additions and 45 deletions

View file

@ -103,6 +103,10 @@ pub fn remove_all(self: *Self) void {
self.widgets.clearRetainingCapacity();
}
pub fn pop(self: *Self) ?Widget {
return if (self.widgets.popOrNull()) |ws| ws.widget else null;
}
pub fn empty(self: *const Self) bool {
return self.widgets.items.len == 0;
}