widgetAlloc
Allocates space for a widget to the alloc stack, or the arena if the stack overflows.
The caller is responsible for ensuring that the widget calls
dvui.widgetFree in it's deinit.
Only valid between Window.beginand Window.end.
Parameters
- T:type
- type
Source
Implementation
pub fn widgetAlloc(comptime T: type) *T {
return dvui.currentWindow()._widget_stack.create(T);
}