[−][src]Struct egui::widgets::DragValue
A numeric value that you can change by dragging the number. More compact than a Slider
.
Implementations
impl<'a> DragValue<'a>
[src]
pub fn f32(value: &'a mut f32) -> Self
[src]
pub fn f64(value: &'a mut f64) -> Self
[src]
pub fn u8(value: &'a mut u8) -> Self
[src]
pub fn i32(value: &'a mut i32) -> Self
[src]
pub fn speed(self, speed: f32) -> Self
[src]
How much the value changes when dragged one point (logical pixel).
pub fn range(self, range: RangeInclusive<f32>) -> Self
[src]
Clamp the value to this range
pub fn prefix(self, prefix: impl ToString) -> Self
[src]
Show a prefix before the number, e.g. "x: "
pub fn suffix(self, suffix: impl ToString) -> Self
[src]
Add a suffix to the number, this can be e.g. a unit ("°" or " m")
pub fn min_decimals(self, min_decimals: usize) -> Self
[src]
Set a minimum number of decimals to display. Normally you don't need to pick a precision, as the slider will intelligently pick a precision for you. Regardless of precision the slider will use "smart aim" to help the user select nice, round values.
pub fn max_decimals(self, max_decimals: usize) -> Self
[src]
Set a maximum number of decimals to display. Values will also be rounded to this number of decimals. Normally you don't need to pick a precision, as the slider will intelligently pick a precision for you. Regardless of precision the slider will use "smart aim" to help the user select nice, round values.
pub fn fixed_decimals(self, num_decimals: usize) -> Self
[src]
Set an exact number of decimals to display. Values will also be rounded to this number of decimals. Normally you don't need to pick a precision, as the slider will intelligently pick a precision for you. Regardless of precision the slider will use "smart aim" to help the user select nice, round values.
Trait Implementations
Auto Trait Implementations
impl<'a> !RefUnwindSafe for DragValue<'a>
[src]
impl<'a> !Send for DragValue<'a>
[src]
impl<'a> !Sync for DragValue<'a>
[src]
impl<'a> Unpin for DragValue<'a>
[src]
impl<'a> !UnwindSafe for DragValue<'a>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,