pub struct ParamSlider<'a, P: Param> { /* private fields */ }Expand description
A slider widget similar to egui::widgets::Slider that knows about nice-plug parameters ranges
and can get values for it. The slider supports double click and control click to reset,
shift+drag for granular dragging, text value entry by clicking on the value text.
TODO: Vertical orientation TODO: Check below for more input methods that should be added TODO: Decouple the logic from the drawing so we can also do things like nobs without having to repeat everything TODO: Add WidgetInfo annotations for accessibility
Implementations§
Source§impl<'a, P: Param> ParamSlider<'a, P>
impl<'a, P: Param> ParamSlider<'a, P>
Sourcepub fn for_param(param: &'a P, setter: &'a ParamSetter<'a>) -> Self
pub fn for_param(param: &'a P, setter: &'a ParamSetter<'a>) -> Self
Create a new slider for a parameter. Use the other methods to modify the slider before
passing it to Ui::add().
Sourcepub fn without_value(self) -> Self
pub fn without_value(self) -> Self
Don’t draw the text slider’s current value after the slider.
Sourcepub fn with_width(self, width: f32) -> Self
pub fn with_width(self, width: f32) -> Self
Set a custom width for the slider.
Trait Implementations§
Auto Trait Implementations§
impl<'a, P> Freeze for ParamSlider<'a, P>
impl<'a, P> !RefUnwindSafe for ParamSlider<'a, P>
impl<'a, P> Send for ParamSlider<'a, P>where
P: Sync,
impl<'a, P> Sync for ParamSlider<'a, P>where
P: Sync,
impl<'a, P> Unpin for ParamSlider<'a, P>
impl<'a, P> UnsafeUnpin for ParamSlider<'a, P>
impl<'a, P> !UnwindSafe for ParamSlider<'a, P>
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