pub struct Indication { /* private fields */ }Expand description
What a control shows while a pointer rests on it and while one presses
it: a color laid over the control’s surface. Compose’s Indication.
The default is Compose’s DefaultDebugIndication: black at 10% while a
pointer hovers and at 30% while one presses. A dark interface takes a
light overlay with Indication::overlay, and
Indication::NONE shows nothing. The overlay covers the control’s
surface: the rect and corner shape of the background of the control’s
modifier chain, or the control’s own rect when it has no background.
Implementations§
Source§impl Indication
impl Indication
Sourcepub const fn overlay(hovered: Color, pressed: Color) -> Self
pub const fn overlay(hovered: Color, pressed: Color) -> Self
Lays hovered over the control while a pointer rests on it, and
pressed while one presses it.
Sourcepub fn hovered(&self) -> Option<Color>
pub fn hovered(&self) -> Option<Color>
The color over a control that a pointer hovers, or None for no
overlay.
Sourcepub fn pressed(&self) -> Option<Color>
pub fn pressed(&self) -> Option<Color>
The color over a control that a pointer presses, or None for no
overlay.
Sourcepub fn color(&self, state: IndicationState) -> Option<Color>
pub fn color(&self, state: IndicationState) -> Option<Color>
The color over a control in state, or None while it shows
nothing. A press shows over a hover.
Trait Implementations§
Source§impl Clone for Indication
impl Clone for Indication
impl Copy for Indication
Source§impl Debug for Indication
impl Debug for Indication
Source§impl Default for Indication
impl Default for Indication
Source§impl PartialEq for Indication
impl PartialEq for Indication
impl StructuralPartialEq for Indication
Auto Trait Implementations§
impl Forget for Indication
impl Freeze for Indication
impl Move for Indication
impl RefUnwindSafe for Indication
impl Send for Indication
impl Sync for Indication
impl Unpin for Indication
impl UnsafeUnpin for Indication
impl UnwindSafe for Indication
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> ErasedDestructor for Twhere
T: 'static,
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