pub struct MacCheckbox<'a> { /* private fields */ }Expand description
Authentic macOS AppKit Square Checkbox (NSButtonTypeSwitch).
§Example
use egui_macview::{MacAppearance, MacCheckbox, MacControlSize, MacTheme};
let theme = MacTheme::new(MacAppearance::Aqua);
let mut checked = true;
MacCheckbox::new(&mut checked, "Show Grid Lines")
.control_size(MacControlSize::Regular)
.theme(&theme)
.show(ui);Implementations§
Source§impl<'a> MacCheckbox<'a>
impl<'a> MacCheckbox<'a>
Sourcepub fn new(checked: &'a mut bool, label: impl Into<WidgetText>) -> Self
pub fn new(checked: &'a mut bool, label: impl Into<WidgetText>) -> Self
Creates a new AppKit square checkbox bound to checked with label.
Sourcepub fn mixed(self, mixed: bool) -> Self
pub fn mixed(self, mixed: bool) -> Self
Sets the AppKit indeterminate / mixed state (NSMixedState, horizontal - dash).
Sourcepub fn control_size(self, size: MacControlSize) -> Self
pub fn control_size(self, size: MacControlSize) -> Self
Sets the AppKit control size (Regular 14x14pt, Small 12x12pt, Mini 10x10pt).
Sourcepub fn fixed_rect(self, rect: Rect) -> Self
pub fn fixed_rect(self, rect: Rect) -> Self
Pins the checkbox to an exact NIB rectangle.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !UnwindSafe for MacCheckbox<'a>
impl<'a> Forget for MacCheckbox<'a>
impl<'a> Freeze for MacCheckbox<'a>
impl<'a> RefUnwindSafe for MacCheckbox<'a>
impl<'a> Send for MacCheckbox<'a>
impl<'a> Sync for MacCheckbox<'a>
impl<'a> Unpin for MacCheckbox<'a>
impl<'a> UnsafeUnpin for MacCheckbox<'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