Struct nih_plug_vizia::widgets::ParamSlider
source · pub struct ParamSlider { /* private fields */ }Expand description
A slider that integrates with NIH-plug’s Param types. Use the
set_style() method to change how the value gets displayed.
Implementations§
source§impl ParamSlider
impl ParamSlider
source§impl ParamSlider
impl ParamSlider
sourcepub fn new<L, Params, P, FMap>(
cx: &mut Context,
params: L,
params_to_param: FMap
) -> Handle<'_, Self>where
L: Lens<Target = Params> + Clone,
Params: 'static,
P: Param + 'static,
FMap: Fn(&Params) -> &P + Copy + 'static,
pub fn new<L, Params, P, FMap>( cx: &mut Context, params: L, params_to_param: FMap ) -> Handle<'_, Self>where L: Lens<Target = Params> + Clone, Params: 'static, P: Param + 'static, FMap: Fn(&Params) -> &P + Copy + 'static,
Creates a new ParamSlider for the given parameter. To accommodate VIZIA’s mapping system,
you’ll need to provide a lens containing your Params implementation object (check out how
the Data struct is used in gain_gui_vizia) and a projection function that maps the
Params object to the parameter you want to display a widget for. Parameter changes are
handled by emitting ParamEvents which are automatically handled by
the VIZIA wrapper.
See ParamSliderExt for additional options.
Trait Implementations§
source§impl View for ParamSlider
impl View for ParamSlider
source§fn element(&self) -> Option<&'static str>
fn element(&self) -> Option<&'static str>
The name of the view. This is used in css: to style every single one of a given view, you
specify the element name.
fn event(&mut self, cx: &mut EventContext<'_>, event: &mut Event)
fn build<F>(self, cx: &mut Context, content: F) -> Handle<'_, Self>where F: FnOnce(&mut Context),
fn draw(&self, cx: &mut DrawContext<'_>, canvas: &mut Canvas<OpenGl>)
Auto Trait Implementations§
impl !RefUnwindSafe for ParamSlider
impl Send for ParamSlider
impl Sync for ParamSlider
impl Unpin for ParamSlider
impl !UnwindSafe for ParamSlider
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