pub struct InputInteraction {
pub focused: bool,
pub focus_within: bool,
pub hovered: bool,
pub pressed: bool,
}Expand description
Paint-time interaction flags resolved for one widget.
focused is strict ownership; focus_within additionally includes
ancestors. Hover and press can be inherited through the hit-test chain for
widget painting.
§Examples
use ailloli_ui_runtime::input::InputInteraction;
let interaction = InputInteraction { focused: true, focus_within: true, hovered: false, pressed: false };
assert!(interaction.focused && interaction.focus_within);Fields§
§focused: boolWhether this exact element owns keyboard focus.
focus_within: booltrue when this element or one of its descendants owns keyboard focus.
This is paint-only metadata. It does not change the actual focus target
and leaves focused strict, so existing control focus rings keep their
current behavior.
hovered: boolWhether pointer hit state paints this widget as hovered.
pressed: boolWhether active pointer capture/press paints this widget as pressed.
Trait Implementations§
Source§impl Clone for InputInteraction
impl Clone for InputInteraction
Source§fn clone(&self) -> InputInteraction
fn clone(&self) -> InputInteraction
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 InputInteraction
impl Debug for InputInteraction
Source§impl Default for InputInteraction
impl Default for InputInteraction
Source§fn default() -> InputInteraction
fn default() -> InputInteraction
Returns the “default value” for a type. Read more
Source§impl PartialEq for InputInteraction
impl PartialEq for InputInteraction
impl Copy for InputInteraction
impl Eq for InputInteraction
impl StructuralPartialEq for InputInteraction
Auto Trait Implementations§
impl Freeze for InputInteraction
impl RefUnwindSafe for InputInteraction
impl Send for InputInteraction
impl Sync for InputInteraction
impl Unpin for InputInteraction
impl UnwindSafe for InputInteraction
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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
Compare self to
key and return true if they are equal.Source§impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
Source§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.