Egui::Inspector
Inherits Reference < Object
Constants
The orange selection outline. It rides a layer ABOVE app windows (z=50) so a selected widget is clearly marked, but BELOW the inspector panel (z=98), popups/modals (99) and tooltips (100) — the outline must never paint over the very tools that edit the widget (the panel itself, the color picker, the export modal).
The inspector panel rides its own layer ABOVE app windows (z=98 vs Middle/windows z=50) — a debug tool must never be covered — but under its own popups (Foreground z=99: pick menu, color picker, export modal) and tooltips (z=100). Order::Middle keeps modals able to block it (the export modal dims the panel below itself like any other content).
Property table geometry: fixed columns keep every row aligned — the override marker, the property name, then the editor cells.
Default width of the right column (the bottom strip is PANEL_H): wide enough for the header's action cluster (tabs + Export + ⚙ + ✕ + gaps) even after the panel padding. Exact budget: interior = PANEL_W − 2×10 window padding; the header needs 2×TAB_W + 2 tab gaps + EXPORT_W + MENU_W + CLOSE_W + 3 cluster gaps (+8 item spacing each) = 402 → 422 leaves the spacer's gap non-negative (at 420 the ✕ cell was clamped 26→24 and its glyph spilled).
The width with a live .ecss session: the header adds the «Сохранить» button (SAVE_W + its item-spacing gap) before Export.
The StyleSheet class of the panel's own header tab cells — they are
paint-in-place (see TabPart below), and the class keeps them
restylable like any app widget: ctx.stylesheet.rule("inspector.tab", …).
Header geometry: equal-width tab cells (the "Class"/"Element" pair reads as one control) and the right-pinned action cluster.
Constructors
Instance methods
After app.update — called from Context#end_frame once ALL app content has rendered, including the DEFERRED central panel (a widget's context menu attached there opens its popup only at that point, so the pick decision below must run after it): open the pick menu only when NO popup answered the press — a widget with its own context menu gets the «Inspect …» row appended as that menu's last item instead (see #render_menu_tail). Then the overlays that must paint above everything.
Before app.update: the panel must bite #available_rect first to hug its screen edge (right column or bottom strip), before the app's own panels take their share.
The "Class" tab's selected class. Linked to the Element tab: switching to Class jumps to the LAST SELECTED element's class (see #class_sel=), so "pick the element → edit its class" is one motion, not a manual hunt through the class combo.
The "Class" tab's selected class. Linked to the Element tab: switching to Class jumps to the LAST SELECTED element's class (see #class_sel=), so "pick the element → edit its class" is one motion, not a manual hunt through the class combo.
The "Class" export: the class's own base rule plus every state
overlay, as StyleSheet#rule calls ready to paste into the app.
The "Element" export: the per-id overrides as the exact
Context#set_id_style calls that reproduce them — base keys
first, then each state overlay. Widgets with an explicit id
export the stable Id.from("…") form; auto ids export the raw
value plus a hint to assign an explicit id in code.
Select id AND show the panel — the pick menu's action. Picking
a widget with the panel hidden must reveal it, not just set the
selection (F12 is not the only way back).
Panel visibility (F12 flips it). The backend's inspector: :hidden
starts closed — enabled but invoked on demand. Closing the panel
also drops the selection: the orange outline belongs to the tool,
it must not outlive the tool being on screen.
Record (id → widget) while the frame runs; only called when the inspector is enabled, so the off case costs one branch.