pub(crate) struct SwitchRow {
row: Retained<FlippedView>,
title: Retained<NSTextField>,
switch: Retained<NSSwitch>,
target: Retained<ToggleTarget>,
}Fields§
§row: Retained<FlippedView>§title: Retained<NSTextField>§switch: Retained<NSSwitch>§target: Retained<ToggleTarget>Implementations§
Source§impl SwitchRow
impl SwitchRow
pub(crate) fn new( mtm: MainThreadMarker, title: &str, on: bool, on_toggle: ToggleHandler, ) -> Self
pub(crate) fn view(&self) -> &NSView
Sourcepub(crate) fn set_title(&self, title: &str)
pub(crate) fn set_title(&self, title: &str)
The switch’s screen reader label is its title, which sits beside it as a label.
pub(crate) fn set_on(&self, on: bool)
pub(crate) fn measure(&self) -> Size
Sourcepub(crate) fn set_frame(&self, frame: Frame)
pub(crate) fn set_frame(&self, frame: Frame)
Places the row, with its title at the start and its switch at the end, each centered vertically.
Sourcepub(crate) fn remove(self)
pub(crate) fn remove(self)
Released at the end of the current event, since the toggle may be running now.
fn title_size(&self) -> Size
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for SwitchRow
impl !Send for SwitchRow
impl !Sync for SwitchRow
impl !UnwindSafe for SwitchRow
impl Freeze for SwitchRow
impl Unpin for SwitchRow
impl UnsafeUnpin for SwitchRow
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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