WidgetState¶
Bundles the common fields every widget needs. Stored as a single field
on the actor and exposed via fun ref state(): WidgetState. The Widget
and CompositeWidget traits use this to provide default implementations
without requiring seven boilerplate accessors.
Constructors¶
create¶
Parameters¶
- parent': WidgetParent tag
Returns¶
- WidgetState ref^
Public fields¶
let parent: WidgetParent tag¶
var width: USize val¶
var height: USize val¶
let child_grids: Array[(Any tag , Grid val)] ref¶
var dirty: Bool val¶
var debug_bg: (Default val | Black val | Red val | Green val | Yellow val | Blue val | Magenta val | Cyan val | White val | BrightBlack val | BrightRed val | BrightGreen val | BrightYellow val | BrightBlue val | BrightMagenta val | BrightCyan val | BrightWhite val | Rainbow val)¶
Public Functions¶
empty_cell¶
Return the empty cell for this widget. Uses debug_bg as background when set, making the widget's allocated space visible.
Returns¶
- Cell val