pub struct IconWidget { /* private fields */ }Expand description
An icon as a widget.
Need (icon): an icon as a widget (sized, toned, clickable). Need (action): an icon button.
Implementations§
Source§impl IconWidget
impl IconWidget
pub fn new(source: impl Into<Source>) -> Self
pub fn size(self, size: Size) -> Self
pub fn tone(self, tone: Tone) -> Self
Sourcepub fn label(self, label: &str) -> Self
pub fn label(self, label: &str) -> Self
Its accessible name (and tooltip); an icon alone says nothing to a screen reader without it.
Sourcepub fn sense_click(self) -> Self
pub fn sense_click(self) -> Self
Clickable (a button made of the icon alone).
Trait Implementations§
Source§impl Clone for IconWidget
impl Clone for IconWidget
Source§fn clone(&self) -> IconWidget
fn clone(&self) -> IconWidget
Returns a duplicate 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 IconWidget
impl Debug for IconWidget
Auto Trait Implementations§
impl Freeze for IconWidget
impl RefUnwindSafe for IconWidget
impl Send for IconWidget
impl Sync for IconWidget
impl Unpin for IconWidget
impl UnsafeUnpin for IconWidget
impl UnwindSafe for IconWidget
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<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