pub struct MacStepper<'a> { /* private fields */ }Expand description
Authentic macOS AppKit Stepper Control (NSStepper equivalent).
Features authentic dual stacked increment/decrement arrow chevrons, continuous auto-repeat when held down, keyboard arrow support, and optional value wrap-around.
§Example
use egui_macview::{MacStepper, MacTheme};
let theme = MacTheme::default();
let mut count = 5.0f64;
MacStepper::new(&mut count, 0.0..=100.0, 1.0)
.theme(&theme)
.show(ui);Implementations§
Source§impl<'a> MacStepper<'a>
impl<'a> MacStepper<'a>
Sourcepub fn new(value: &'a mut f64, range: RangeInclusive<f64>, step: f64) -> Self
pub fn new(value: &'a mut f64, range: RangeInclusive<f64>, step: f64) -> Self
Creates a new stepper bound to a value, inclusive range, and step delta.
Sourcepub fn corner_radius(self, r: f32) -> Self
pub fn corner_radius(self, r: f32) -> Self
Overrides default corner radius.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !UnwindSafe for MacStepper<'a>
impl<'a> Forget for MacStepper<'a>
impl<'a> Freeze for MacStepper<'a>
impl<'a> RefUnwindSafe for MacStepper<'a>
impl<'a> Send for MacStepper<'a>
impl<'a> Sync for MacStepper<'a>
impl<'a> Unpin for MacStepper<'a>
impl<'a> UnsafeUnpin for MacStepper<'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