pub struct InteractionState {
pub hovered: bool,
pub pressed: bool,
pub focused: bool,
pub disabled: bool,
}Expand description
Pointer/focus/disabled flags for a widget at paint or input time.
§Examples
use ailloli_ui_core::style::InteractionState;
assert!(!InteractionState::normal().pressed);Fields§
§hovered: booltrue while the pointer hover region contains the active pointer.
pressed: booltrue while the widget owns an active press gesture.
focused: booltrue while the widget owns keyboard focus.
disabled: booltrue when interaction should be disabled.
Implementations§
Trait Implementations§
Source§impl Clone for InteractionState
impl Clone for InteractionState
Source§fn clone(&self) -> InteractionState
fn clone(&self) -> InteractionState
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InteractionState
impl Debug for InteractionState
Source§impl Default for InteractionState
impl Default for InteractionState
Source§fn default() -> InteractionState
fn default() -> InteractionState
Returns the “default value” for a type. Read more
Source§impl PartialEq for InteractionState
impl PartialEq for InteractionState
impl Copy for InteractionState
impl Eq for InteractionState
impl StructuralPartialEq for 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 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
Mutably borrows from an owned value. Read more