pub struct Sense {
pub click: bool,
pub drag: bool,
pub focusable: bool,
}
Expand description
What sort of interaction is a widget sensitive to?
Fields§
§click: bool
Buttons, sliders, windows, …
drag: bool
Sliders, windows, scroll bars, scroll areas, …
focusable: bool
This widget wants focus.
Anything interactive + labels that can be focused for the benefit of screen readers.
Implementations§
Source§impl Sense
impl Sense
Sourcepub fn focusable_noninteractive() -> Sense
pub fn focusable_noninteractive() -> Sense
Senses no clicks or drags, but can be focused with the keyboard. Used for labels that can be focused for the benefit of screen readers.
Sourcepub fn click_and_drag() -> Sense
pub fn click_and_drag() -> Sense
Sense both clicks, drags and hover (e.g. a slider or window).
Sourcepub fn interactive(&self) -> bool
pub fn interactive(&self) -> bool
Returns true if we sense either clicks or drags.
Trait Implementations§
Source§impl BitOrAssign for Sense
impl BitOrAssign for Sense
Source§fn bitor_assign(&mut self, rhs: Sense)
fn bitor_assign(&mut self, rhs: Sense)
Performs the
|=
operation. Read moreimpl Copy for Sense
impl Eq for Sense
impl StructuralPartialEq for Sense
Auto Trait Implementations§
impl Freeze for Sense
impl RefUnwindSafe for Sense
impl Send for Sense
impl Sync for Sense
impl Unpin for Sense
impl UnwindSafe for Sense
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§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<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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> ⓘ
Converts
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> ⓘ
Converts
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