Egui::Memory
Inherits Reference < Object
Constants
egui InputOptions click classification defaults.
Constructors
Instance methods
Color picker hue cache (upstream FixedCache<Rgba, Hsva> keyed by
Id::NULL): maps an emitted color back to the Hsva it was produced
from. Hsva.from_color of a gray/white color loses the hue (chroma
0 → hue 0 = red), so the picker consults this cache first to keep
the hue slider stable while dragging into the white corner.
Outside IdTypeMap on purpose: keyed by color, not by widget id,
so end-frame pruning must not touch it.
Windows the user has grip-resized at least once: from then on the
size is fixed and content is clipped to the window rect (upstream
Resize inside Window) instead of auto-fitting the contents.
Same pruning exemption as layer_sizes.
The interaction query every widget makes (egui Context::interact).
clip is the owning container's clip rect (panel/window/scroll
viewport): parts of a widget outside it are painted over by the
container below, so they must not be hit-tested either (upstream
Context::interact intersects with the layer's clip rect).
Container content sizes (modal dialog size for centering) — same pruning exemption.
Called by Context#modal while rendering the modal this frame; blocking takes effect from the next begin_frame.
Screen rects of open popups, refreshed by Context#popup every frame they render — the containment test of close-on-outside-click.
Persistent offset history of a scrollable (kinetic scrolling).
Scroll-sink viewports (id → rect + layer) for scroll arbitration: scroll areas, textareas and (draggable) plots register here; the top-most sink containing the pointer (previous frame's geometry, like widget hit-testing) owns this frame's scroll delta.
Widget-generated texture cache (color picker gradients): named ids so regenerated-once textures aren't re-uploaded every frame.
Tooltip hover-start times, kept outside IdTypeMap on purpose: the map is pruned against widget ids, and a widget that stops being hovered shouldn't forget when it started (egui tooltip delay).
Called by ScrollArea while rendering: registers this frame's viewport for next frame's arbitration. The viewport/content ids also count as "used" so their IdTypeMap cells (offset, content size) survive end-frame pruning — they have no #interact call of their own (the scrollbar's id does, via ui.interact). Mark an id as used this frame so its IdTypeMap cell survives end-frame pruning (for state keys that have no #interact call of their own — e.g. Grid's persisted column widths).
Topmost widget containing pos whose sense satisfies the filter.
Layer z wins first (see layer.cr: paint order and hit-test
priority follow z — a popup on layer 99 always beats the panel
under it, even though the popup registers earlier in the frame);
within the same z the last registration (paint order) is on top.
Hit-tests resolve against the previous frame's geometry.
The topmost registered widget (any sense) at pos, against the
previous frame's geometry.
EVERY registered widget (any sense) containing pos, against the
previous frame's geometry — outermost first (rect area descending).
The inspector's pick menu offers all of them so a composite widget
(Markdown and the RichLabels it is built from) is inspectable down
to its parts; #widget_at alone would always answer the root,
which interacts last and covers the whole body.