pub struct InteractionState {Show 13 fields
pub is_hovered: bool,
pub is_selected: bool,
pub is_disabled: bool,
pub is_focused: bool,
pub is_focus_within: bool,
pub is_hidden: bool,
pub is_active: bool,
pub is_dark_mode: bool,
pub is_file_hover: bool,
pub using_keyboard_navigation: bool,
pub child_index: Option<usize>,
pub sibling_count: usize,
pub window_width: f64,
}Expand description
The interaction state of a view, used to determine which style selectors apply.
This struct captures the current state of user interaction with a view,
such as whether it’s hovered, focused, being clicked, etc. This state is
used during style computation to apply conditional styles like :hover,
:active, :focus, etc.
Fields§
§is_hovered: boolWhether the pointer is currently over this element.
is_selected: boolWhether this element is in a selected state.
is_disabled: boolWhether this element is disabled.
is_focused: boolWhether this element has keyboard focus.
is_focus_within: boolWhether this element or a descendant currently has keyboard focus.
Whether the element has been hidden
is_active: boolWhether an element is currently in the “active” state active: pointer down and not up with the pointer in the element either by 1: remaining in or 2: returning into the element or keyboard trigger is down.
is_dark_mode: boolWhether dark mode is enabled.
is_file_hover: boolWhether a file is being dragged over this element.
Whether keyboard navigation is active.
child_index: Option<usize>1-based child index within parent, if this view has a parent.
sibling_count: usizeNumber of siblings under this view’s parent.
window_width: f64Current window width in px for responsive selector matching.
Trait Implementations§
Source§impl Clone for InteractionState
impl Clone for InteractionState
Source§fn clone(&self) -> InteractionState
fn clone(&self) -> InteractionState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for InteractionState
Source§impl Debug for InteractionState
impl Debug for InteractionState
Source§impl Default for InteractionState
impl Default for InteractionState
Source§fn default() -> InteractionState
fn default() -> InteractionState
Auto Trait Implementations§
impl Freeze for InteractionState
impl RefUnwindSafe for InteractionState
impl Send for InteractionState
impl Sync for InteractionState
impl Unpin for InteractionState
impl UnsafeUnpin for InteractionState
impl UnwindSafe for InteractionState
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
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<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().