pub struct MacToggle<'a> { /* private fields */ }Expand description
Authentic macOS Toggle / Switch.
Features animated sliding knob via CASpring, smooth green activation color transition,
ambient drop shadow, and theme-driven metrics.
§Example
use egui_macview::{MacTheme, MacToggle};
let theme = MacTheme::default();
let mut enabled = true;
ui.add(MacToggle::new(&mut enabled).theme(&theme));Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> !UnwindSafe for MacToggle<'a>
impl<'a> Forget for MacToggle<'a>
impl<'a> Freeze for MacToggle<'a>
impl<'a> RefUnwindSafe for MacToggle<'a>
impl<'a> Send for MacToggle<'a>
impl<'a> Sync for MacToggle<'a>
impl<'a> Unpin for MacToggle<'a>
impl<'a> UnsafeUnpin for MacToggle<'a>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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