pub struct NumericWidget<T: Numeric> { /* private fields */ }
Expand description
A widget for built-in numeric values.
This widget piggybacks on the Numeric
trait for its implementation.
Implementations§
Source§impl<T: Numeric> NumericWidget<T>
impl<T: Numeric> NumericWidget<T>
Sourcepub fn step(self, step: T) -> Self
pub fn step(self, step: T) -> Self
Sets the step value for the widget.
This parameter is passed to egui::DragValue::speed
in normal mode, and
egui::Slider::step_by
in slider mode.
Sourcepub fn slider(self, slider: bool) -> Self
pub fn slider(self, slider: bool) -> Self
Sets whether the widget should be displayed as a slider or not.
Sourcepub fn logarithmic(self, log: bool) -> Self
pub fn logarithmic(self, log: bool) -> Self
Sets the widget to logarithmic mode. Implies [slider(true)
].
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for NumericWidget<T>where
T: Freeze,
impl<T> RefUnwindSafe for NumericWidget<T>where
T: RefUnwindSafe,
impl<T> Send for NumericWidget<T>where
T: Send,
impl<T> Sync for NumericWidget<T>where
T: Sync,
impl<T> Unpin for NumericWidget<T>where
T: Unpin,
impl<T> UnwindSafe for NumericWidget<T>where
T: UnwindSafe,
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