Egui::Widget
Instance methods
The kind name shown in the inspector («Button», «Tab»…) — the
class name by default; StyledPart stand-ins override it with
their site-specific kind.
Short human label for the inspector (the button's text, a label's text…); nil = no meaningful label.
Customize this widget's style; nil fields keep the theme value:
Button.new("OK").style { |s| s.fill = Color32.rgb(180, 40, 40) }
CSS-like class this widget styles under in the global
StyleSheet (nil = not registered yet). Widgets adopt the class
system gradually; see Button and containers/sidebar.cr for
the reference wiring (base + state overlays).
The stylable properties of THIS widget kind: the StyleVars
keys its #ui actually reads, declared here — not hardcoded in
the inspector. StyleProps.textlike / .buttonlike provide the
common sets. An empty list (the default) means the widget reads
no style keys and the inspector shows it as non-stylable.
Give the widget an explicit id (builder form of the id:
constructor parameter). Explicit ids are claimed once per frame —
a second widget claiming the same name raises.