pub struct NumberInput<'a> { /* private fields */ }Expand description
A number input; see the module.
Need (input): a number field with steps and limits.
Implementations§
Source§impl<'a> NumberInput<'a>
impl<'a> NumberInput<'a>
Sourcepub fn new(value: &'a mut f64, label: &str, range: RangeInclusive<f64>) -> Self
pub fn new(value: &'a mut f64, label: &str, range: RangeInclusive<f64>) -> Self
A number in range, named label (its arrows are named after it).
Sourcepub fn from_descriptor(value: &'a mut f64, d: &Descriptor) -> Self
pub fn from_descriptor(value: &'a mut f64, d: &Descriptor) -> Self
The input a descriptor calls for: its hard range, step, unit and precision; whole numbers for an int.
Sourcepub fn width(self, points: f32) -> Self
pub fn width(self, points: f32) -> Self
The field’s width, in points (the unit and the arrows come
after it). By default the field is as wide as the range’s widest
end with two more digits, or, with no range (an end at
f64::MAX), as the value shown with two more digits; between
48 and 160 points either way.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for NumberInput<'a>
impl<'a> RefUnwindSafe for NumberInput<'a>
impl<'a> Send for NumberInput<'a>
impl<'a> Sync for NumberInput<'a>
impl<'a> Unpin for NumberInput<'a>
impl<'a> UnsafeUnpin for NumberInput<'a>
impl<'a> !UnwindSafe for NumberInput<'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
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