[][src]Struct egui::widgets::DragValue

pub struct DragValue<'a> { /* fields omitted */ }

A floating point 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")

Trait Implementations

impl<'a> Widget for DragValue<'a>[src]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.