module

Egui

StyledPart — a meta-only Widget stand-in for UI painted in place (menu rows, title-bar tab cards): code that calls ctx.interact / ui.interact directly with painter calls instead of living through Ui#add. Without a Widget instance the inspector records NO meta for those interacts — the widget is unpickable and shows nothing to edit.

A StyledPart carries exactly what the inspector needs (kind, style class, property declarations, label) plus public cascade readers so the site reads its keys through the SAME layers real widgets use (class rules + per-element inspector overrides — Widget#style_vars is protected, so the readers live here on the part itself):

part = TabPart.new(title) ctx.with_inspector_widget(part) { ctx.interact(id, rect, Sense.click) } vars = part.vars(ctx, id) # class + per-id override hover = part.vars(ctx, id, "hover") # … with the state overlay

Constants

MAX_LAYER_Z = 100

The layer ceiling: every layer lives in [0, MAX_LAYER_Z].

MENU_PAD_Y = 6.0

Vertical padding inside menu rows — dropdown items and bar buttons alike. Roomier than button_padding.y so rows breathe like a native menu. The default of the padding style box of the menu.item / menu.button classes.

POPUP_LAYER_Z = 99

Where dropdown menus, popups and modals ride — high enough to sit above windows, one notch below the Tooltip ceiling.

Nested types