Struct imgui::Slider [−][src]
pub struct Slider<Label, Data, Format = &'static str> { /* fields omitted */ }
Expand description
Builder for a slider widget.
Implementations
Sets the range inclusively, such that both values given are valid values which the slider can be dragged to.
imgui::Slider::new(im_str!("Example"), i8::MIN, i8::MAX)
.range(4, 8)
// Remember to call .build(&ui)
;
It is safe, though up to C++ Dear ImGui, on how to handle when
min > max
.
pub fn display_format<Format2: AsRef<str>>(
self,
display_format: Format2
) -> Slider<Label, Data, Format2>
pub fn display_format<Format2: AsRef<str>>(
self,
display_format: Format2
) -> Slider<Label, Data, Format2>
Sets the display format using a C-style printf string
Replaces all current settings with the given flags
Builds a slider that is bound to the given value.
Returns true if the slider value was changed.
Builds a horizontal array of multiple sliders attached to the given slice.
Returns true if any slider value was changed.
Trait Implementations
Auto Trait Implementations
impl<Label, Data, Format> RefUnwindSafe for Slider<Label, Data, Format> where
Data: RefUnwindSafe,
Format: RefUnwindSafe,
Label: RefUnwindSafe,
impl<Label, Data, Format> Send for Slider<Label, Data, Format> where
Data: Send,
Format: Send,
Label: Send,
impl<Label, Data, Format> Sync for Slider<Label, Data, Format> where
Data: Sync,
Format: Sync,
Label: Sync,
impl<Label, Data, Format> Unpin for Slider<Label, Data, Format> where
Data: Unpin,
Format: Unpin,
Label: Unpin,
impl<Label, Data, Format> UnwindSafe for Slider<Label, Data, Format> where
Data: UnwindSafe,
Format: UnwindSafe,
Label: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more