Struct egui::widgets::DragValue [−][src]
A numeric value that you can change by dragging the number. More compact than a Slider
.
ui.add(egui::DragValue::f32(&mut my_f32).speed(0.1));
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 i8(value: &'a mut i8) -> Self
[src]
pub fn u8(value: &'a mut u8) -> Self
[src]
pub fn i16(value: &'a mut i16) -> Self
[src]
pub fn u16(value: &'a mut u16) -> Self
[src]
pub fn i32(value: &'a mut i32) -> Self
[src]
pub fn u32(value: &'a mut u32) -> Self
[src]
pub fn i64(value: &'a mut i64) -> Self
[src]
pub fn u64(value: &'a mut u64) -> Self
[src]
pub fn isize(value: &'a mut isize) -> Self
[src]
pub fn usize(value: &'a mut usize) -> Self
[src]
pub fn from_get_set(get_set_value: impl 'a + FnMut(Option<f64>) -> f64) -> Self
[src]
pub fn speed(self, speed: impl Into<f64>) -> Self
[src]
How much the value changes when dragged one point (logical pixel).
pub fn clamp_range(self, clamp_range: RangeInclusive<f32>) -> Self
[src]
Clamp incoming and outgoing values to this range.
pub fn clamp_range_f64(self, clamp_range: RangeInclusive<f64>) -> Self
[src]
pub fn range(self, clamp_range: RangeInclusive<f32>) -> Self
[src]
Renamed clamp_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 max_decimals_opt(self, max_decimals: Option<usize>) -> Self
[src]
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>
impl<'a> !Send for DragValue<'a>
impl<'a> !Sync for DragValue<'a>
impl<'a> Unpin for DragValue<'a>
impl<'a> !UnwindSafe for DragValue<'a>
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>,