class

Egui::StyledPart

Inherits Egui::Widget < Reference < Object

Constructors

new(kind : String, style_class : String | Nil, props : Array(StyleProp), label : String | Nil = nil)
Source

Instance methods

inspector_kind

The kind name shown in the inspector («Button», «Tab»…) — the class name by default; StyledPart stand-ins override it with their site-specific kind.

Source
inspector_label

Short human label for the inspector (the button's text, a label's text…); nil = no meaningful label.

Source
style_class

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).

Source
style_properties

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.

Source
ui(ui : Ui) : Response

StyledParts never run through Ui#add — they only describe a paint-in-place site. Hitting this is a wiring bug.

Source
vars(ctx : Context, id : Id, state : String | Nil = nil) : StyleVars

The merged vars for this part's class (+ optional state overlay) with the per-element inspector override on top — the public face of Widget#style_vars for paint-in-place sites.

Source
vars(ui : Ui, id : Id, state : String | Nil = nil) : StyleVars
Source