class

Egui::Focus

Inherits Reference < Object

egui Focus (memory/mod.rs): which widget owns the keyboard. begin_frame lags one frame (id_previous_frame) — that is the dead-man's switch: if the focused widget stops being created, focus drops instead of pointing at a stale id.

Arrow locks (upstream FocusLockFilter): a focused slider/drag value claims the arrows in its own direction so navigation skips them; latched one frame like the focus id itself. A focused widget can additionally claim the WHOLE keyboard (upstream EventFilter — a terminal passes Tab/arrows to its child process): focus navigation (Tab cycling, geometric arrows) stands down entirely while the lock is held.

Constructors

Instance methods

begin_frame
Source
clear
Source
gained_focus?(id : Id) : Bool
Source
has_focus?(id : Id) : Bool
Source
keep_alive(id : Id) : Nil

Keep-alive (called by interact for the currently focused focusable): never overrides a pending navigation request made this frame.

Source
lock_arrows(horizontal : Bool = false, vertical : Bool = false) : Nil
Source
lock_h?
Source
lock_keyboard

Claim every navigation key (Tab, arrows) for the focused widget — e.g. a terminal emulator forwarding them to its child process.

Source
lock_keyboard?
Source
lock_v?
Source
lost_focus?(id : Id) : Bool
Source
request(id : Id) : Nil
Source