pub struct FocusItem {
pub x: f32,
pub y: f32,
pub width: f32,
pub height: f32,
pub kind: FocusKind,
pub scroll: Option<usize>,
}Expand description
One keyboard-focusable element, in document (Tab) order. Carries the geometry (for the focus ring) plus how the shell should act on it.
Fields§
§x: f32§y: f32§width: f32§height: f32§kind: FocusKind§scroll: Option<usize>The scroller this item sits inside, if any, as an index into
Layout::scrolls.
The focus ring is painted by the shell as its own scene after the
document’s, so it never passes through the PushClip a scroller emits
around its children. Without knowing the enclosing scroller, a ring on a
row scrolled out of a list draws over whatever is above the list. This
is the enclosing one, not the item’s own: a scroller that is itself
focusable is clipped by its parent, not by itself.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FocusItem
impl RefUnwindSafe for FocusItem
impl Send for FocusItem
impl Sync for FocusItem
impl Unpin for FocusItem
impl UnsafeUnpin for FocusItem
impl UnwindSafe for FocusItem
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more