class

Egui::Memory

Inherits Reference < Object

Constants

CLICK_MAX_DIST = 6.0
DOUBLE_CLICK_TIME = 0.3

egui InputOptions click classification defaults.

Constructors

Instance methods

active_scroll_area?

The scroll area that owns this frame's scroll delta (nil = none).

Source
animations
Source
areas
Source
begin_frame(input : InputState) : Nil
Source
close_all_popups
Source
close_popup(id : Id) : Nil
Source
color_cache

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.

Source
data
Source
disabled?
Source
duplicate_ids
Source
end_frame
Source
fixed_size_layers

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.

Source
focus
Source
interact(id : Id, rect : Rect, sense : Sense, layer : LayerId = LayerId.background, clip : Rect = Rect.infinite) : InteractionVerdict

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

Source
layer_sizes

Container content sizes (modal dialog size for centering) — same pruning exemption.

Source
mark_modal

Called by Context#modal while rendering the modal this frame; blocking takes effect from the next begin_frame.

Source
open_popup(id : Id) : Nil
Source
open_popups
Source
pop_disabled
Source
prev_widget_layers
Source
prev_widget_rects

Geometry/sense/layer of the previous frame (hit-test input)…

Source
prev_widget_senses
Source
push_disabled
Source
register_scroll_area(id : Id, rect : Rect, layer : LayerId) : Nil
Source
scroll_history(id : Id) : History

Persistent offset history of a scrollable (kinetic scrolling).

Source
scroll_rects

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.

Source
texture_cache

Widget-generated texture cache (color picker gradients): named ids so regenerated-once textures aren't re-uploaded every frame.

Source
tooltip_starts

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

Source
use_id(id : Id) : Nil

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

Source
widget_at(pos : Pos2 | Nil) : Id | Nil

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.

Source
widget_rects

…and registrations so far this frame.

Source
widgets_at(pos : Pos2 | Nil) : Array(Id)

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.

Source