etui/focus
Types
Values
pub fn current_index(ring: FocusRing) -> Int
0-based index of the currently focused slot.
pub fn focus_id(ring: FocusRing, id: String) -> FocusRing
Move focus to the slot with the given id. No-op if id not found.
pub fn focus_index(ring: FocusRing, idx: Int) -> FocusRing
Move focus to the slot at the given index (clamped to valid range).
pub fn focus_new(ids: List(String)) -> FocusRing
Create a focus ring from a list of slot IDs. The first slot starts focused. Empty list creates an inert ring.
pub fn focused(ring: FocusRing) -> Result(String, Nil)
ID of the currently focused slot, or None if the ring is empty.
pub fn is_focused(ring: FocusRing, id: String) -> Bool
True if id is the currently focused slot.