Struct arcdps_imgui::Drag
source · pub struct Drag<T, L, F = &'static str> { /* private fields */ }
Expand description
Builder for a drag slider widget.
Implementations§
source§impl<L: AsRef<str>, T: DataTypeKind, F: AsRef<str>> Drag<T, L, F>
impl<L: AsRef<str>, T: DataTypeKind, F: AsRef<str>> Drag<T, L, F>
sourcepub fn speed(self, speed: f32) -> Self
pub fn speed(self, speed: f32) -> Self
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
sourcepub fn display_format<F2: AsRef<str>>(
self,
display_format: F2,
) -> Drag<T, L, F2>
pub fn display_format<F2: AsRef<str>>( self, display_format: F2, ) -> Drag<T, L, F2>
Sets the display format using a C-style printf string
sourcepub fn flags(self, flags: SliderFlags) -> Self
pub fn flags(self, flags: SliderFlags) -> Self
Replaces all current settings with the given flags
sourcepub fn build(self, ui: &Ui<'_>, value: &mut T) -> bool
pub fn build(self, ui: &Ui<'_>, value: &mut T) -> bool
Builds a drag slider that is bound to the given value.
Returns true if the slider value was changed.
sourcepub fn build_array(self, ui: &Ui<'_>, values: &mut [T]) -> bool
pub fn build_array(self, ui: &Ui<'_>, values: &mut [T]) -> bool
Builds a horizontal array of multiple drag sliders attached to the given slice.
Returns true if any slider value was changed.
Trait Implementations§
impl<T: Copy, L: Copy, F: Copy> Copy for Drag<T, L, F>
Auto Trait Implementations§
impl<T, L, F> Freeze for Drag<T, L, F>
impl<T, L, F> RefUnwindSafe for Drag<T, L, F>
impl<T, L, F> Send for Drag<T, L, F>
impl<T, L, F> Sync for Drag<T, L, F>
impl<T, L, F> Unpin for Drag<T, L, F>
impl<T, L, F> UnwindSafe for Drag<T, L, F>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)