[][src]Struct imgui::DragRange

#[must_use]pub struct DragRange<'a, T: DataTypeKind> { /* fields omitted */ }

Builder for a drag slider widget.

Implementations

impl<'a, T: DataTypeKind> DragRange<'a, T>[src]

pub fn new(label: &ImStr) -> DragRange<'_, T>[src]

Constructs a new drag slider builder.

pub fn range<R: InclusiveRangeBounds<T>>(self, range: R) -> Self[src]

pub fn speed(self, speed: f32) -> Self[src]

Sets the value increment for a movement of one pixel.

Example: speed=0.2 means mouse needs to move 5 pixels to increase the slider value by 1

pub fn display_format(self, display_format: &'a ImStr) -> Self[src]

Sets the display format using a C-style printf string

pub fn max_display_format(self, max_display_format: &'a ImStr) -> Self[src]

Sets the display format for the max value using a C-style printf string

pub fn flags(self, flags: SliderFlags) -> Self[src]

Replaces all current settings with the given flags

impl<'a> DragRange<'a, f32>[src]

pub fn build(self, _: &Ui<'_>, min: &mut f32, max: &mut f32) -> bool[src]

Builds a drag range slider that is bound to the given min/max values.

Returns true if the slider value was changed.

impl<'a> DragRange<'a, i32>[src]

pub fn build(self, _: &Ui<'_>, min: &mut i32, max: &mut i32) -> bool[src]

Builds a drag range slider that is bound to the given min/max values.

Returns true if the slider value was changed.

Trait Implementations

impl<'a, T: Clone + DataTypeKind> Clone for DragRange<'a, T>[src]

impl<'a, T: Copy + DataTypeKind> Copy for DragRange<'a, T>[src]

impl<'a, T: Debug + DataTypeKind> Debug for DragRange<'a, T>[src]

Auto Trait Implementations

impl<'a, T> RefUnwindSafe for DragRange<'a, T> where
    T: RefUnwindSafe
[src]

impl<'a, T> Send for DragRange<'a, T> where
    T: Send
[src]

impl<'a, T> Sync for DragRange<'a, T> where
    T: Sync
[src]

impl<'a, T> Unpin for DragRange<'a, T> where
    T: Unpin
[src]

impl<'a, T> UnwindSafe for DragRange<'a, T> where
    T: UnwindSafe
[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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.