pub struct FocusNavMeta {
pub focusable: bool,
pub keyboard_navigable: bool,
pub order: Option<i32>,
pub group: Option<FocusSymbol>,
pub policy_hint: Option<FocusSymbol>,
pub scope_depth: u8,
pub autofocus: bool,
pub enabled: bool,
}Expand description
Per-element focus navigation metadata kept in the box tree.
Focus eligibility lives here rather than on raw box-tree flags so focus
policy remains owned by Floem. keyboard_navigable always implies
focusable.
Fields§
§focusable: boolWhether the element can receive focus by any means.
Whether the element participates in keyboard traversal.
This always implies focusable.
order: Option<i32>Optional explicit linear order key (used for tab traversal).
group: Option<FocusSymbol>Optional logical group for policy-aware navigation.
policy_hint: Option<FocusSymbol>Optional policy selection hint for host-level policy switching.
scope_depth: u8Depth within an app-defined focus scope.
autofocus: boolPreferred initial focus candidate for a scope.
enabled: boolAdditional enable/disable gate independent of focusability.
Implementations§
Sourcepub const fn is_focusable(self) -> bool
pub const fn is_focusable(self) -> bool
Returns true when the element can be focused at all.
Returns true when the element participates in keyboard focus traversal.
Sourcepub fn with_focusable(self, focusable: bool) -> Self
pub fn with_focusable(self, focusable: bool) -> Self
Sets whether the element can receive focus.
Clearing focusable also clears keyboard navigation because keyboard navigation is a stricter form of focusability.
Sets whether the element participates in keyboard traversal.
Enabling keyboard navigation also enables focusability.
Sourcepub fn set_focusable(&mut self, focusable: bool)
pub fn set_focusable(&mut self, focusable: bool)
Mutates focusability in place.
Mutates keyboard navigation in place.
Trait Implementations§
Source§fn clone(&self) -> FocusNavMeta
fn clone(&self) -> FocusNavMeta
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().