pub struct InputState {
pub hovered: Option<WidgetId>,
pub pressed: Option<WidgetId>,
pub focused: Option<WidgetId>,
pub hover_cursor: Option<Point>,
pub thumb: Option<(WidgetId, usize)>,
}Expand description
The input state retained by the runtime, passed to the interface build.
Fields§
§hovered: Option<WidgetId>The widget currently hovered.
pressed: Option<WidgetId>The widget the pointer is pressed on.
focused: Option<WidgetId>The widget that has keyboard focus.
hover_cursor: Option<Point>The pointer’s absolute position when it hovers an interactive sub-region of the
hovered widget (milestone 208); None otherwise. Set by the shell (see
Status::hover_cursor).
thumb: Option<(WidgetId, usize)>The widget a drag last took a thumb of, and which thumb (see Status::thumb). Set
by the shell.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for InputState
impl RefUnwindSafe for InputState
impl Send for InputState
impl Sync for InputState
impl Unpin for InputState
impl UnsafeUnpin for InputState
impl UnwindSafe for InputState
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