Expand description
Change internal widget state.
Structs§
- Absolute
Offset - The amount of absolute offset in each direction of a
Scrollable. - Ensure
Visible Config - Configuration for [
ensure_focused_visible]. - Relative
Offset - The amount of relative offset in each direction of a
Scrollable. - Scroll
Animation - Configuration for animated scrolling.
Enums§
- Focus
Direction - Spatial direction for directional focus navigation.
Functions§
- ensure_
focused_ visible - Scrolls the nearest scrollable ancestor of the currently focused widget so the focused widget is visible at the configured alignment.
- focus
- Focuses the widget with the given
Id. - focus_
auto - Focuses the first widget marked for auto-focus.
- focus_
direction - Focuses the nearest focusable widget in the given spatial
FocusDirection. - focus_
direction_ no_ wrap - Like
focus_direction, but does not wrap to the opposite edge when no candidate exists in the requested direction. Focus simply stays on the currently focused widget. - focus_
next - Focuses the next focusable widget.
- focus_
previous - Focuses the previous focusable widget.
- is_
focused - Returns whether the widget with the given
Idis focused or not. - move_
cursor_ to - Moves the cursor of the widget with the given
Idto the provided position. - move_
cursor_ to_ end - Moves the cursor of the widget with the given
Idto the end. - move_
cursor_ to_ front - Moves the cursor of the widget with the given
Idto the front. - press_
focused - Activates the currently focused widget by calling its
Focusable::press()method. - scroll_
by - Scrolls the scrollable with the given
Idby the providedAbsoluteOffset. - scroll_
to - Scrolls the scrollable with the given
Idto the providedAbsoluteOffset. - select_
all - Selects all the content of the widget with the given
Id. - select_
range - Selects the given content range of the widget with the given
Id. - snap_to
- Snaps the scrollable with the given
Idto the providedRelativeOffset. - snap_
to_ end - Snaps the scrollable with the given
Idto theRelativeOffset::END. - unfocus
- Unfocuses the currently focused widget.