Enum nih_plug_iced::widgets::ParamMessage
source · pub enum ParamMessage {
BeginSetParameter(ParamPtr),
SetParameterNormalized(ParamPtr, f32),
EndSetParameter(ParamPtr),
}
Expand description
A message to update a parameter value. Since NIH-plug manages the parameters, interacting with
parameter values with iced works a little different from updating any other state. This main
IcedEditor
should have a Message
variant
containing this ParamMessage
. When it receives one of those messages, it can pass it through
to self.handle_param_message()
.
Variants§
BeginSetParameter(ParamPtr)
Begin an automation gesture for a parameter.
SetParameterNormalized(ParamPtr, f32)
Set a parameter to a new normalized value. This needs to be surrounded by a matching
BeginSetParameter
and EndSetParameter
.
EndSetParameter(ParamPtr)
End an automation gesture for a parameter.
Trait Implementations§
source§impl Clone for ParamMessage
impl Clone for ParamMessage
source§fn clone(&self) -> ParamMessage
fn clone(&self) -> ParamMessage
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ParamMessage
impl Debug for ParamMessage
source§impl<'a, W> Widget<ParamMessage, Renderer<Backend>> for GenericUi<'a, W>where
W: ParamWidget,
impl<'a, W> Widget<ParamMessage, Renderer<Backend>> for GenericUi<'a, W>where W: ParamWidget,
source§fn draw(
&self,
renderer: &mut Renderer,
style: &Style,
layout: Layout<'_>,
cursor_position: Point,
viewport: &Rectangle
)
fn draw( &self, renderer: &mut Renderer, style: &Style, layout: Layout<'_>, cursor_position: Point, viewport: &Rectangle )
Draws the [
Widget
] using the associated Renderer
.source§fn on_event(
&mut self,
event: Event,
layout: Layout<'_>,
cursor_position: Point,
renderer: &Renderer,
clipboard: &mut dyn Clipboard,
shell: &mut Shell<'_, ParamMessage>
) -> Status
fn on_event( &mut self, event: Event, layout: Layout<'_>, cursor_position: Point, renderer: &Renderer, clipboard: &mut dyn Clipboard, shell: &mut Shell<'_, ParamMessage> ) -> Status
Processes a runtime [
Event
]. Read more§fn mouse_interaction(
&self,
_layout: Layout<'_>,
_cursor_position: Point,
_viewport: &Rectangle<f32>,
_renderer: &Renderer
) -> Interaction
fn mouse_interaction( &self, _layout: Layout<'_>, _cursor_position: Point, _viewport: &Rectangle<f32>, _renderer: &Renderer ) -> Interaction
source§impl<'a, P: Param> Widget<ParamMessage, Renderer<Backend>> for ParamSlider<'a, P>
impl<'a, P: Param> Widget<ParamMessage, Renderer<Backend>> for ParamSlider<'a, P>
source§fn on_event(
&mut self,
event: Event,
layout: Layout<'_>,
cursor_position: Point,
renderer: &Renderer,
clipboard: &mut dyn Clipboard,
shell: &mut Shell<'_, ParamMessage>
) -> Status
fn on_event( &mut self, event: Event, layout: Layout<'_>, cursor_position: Point, renderer: &Renderer, clipboard: &mut dyn Clipboard, shell: &mut Shell<'_, ParamMessage> ) -> Status
Processes a runtime [
Event
]. Read moresource§fn mouse_interaction(
&self,
layout: Layout<'_>,
cursor_position: Point,
_viewport: &Rectangle,
_renderer: &Renderer
) -> Interaction
fn mouse_interaction( &self, layout: Layout<'_>, cursor_position: Point, _viewport: &Rectangle, _renderer: &Renderer ) -> Interaction
impl Copy for ParamMessage
Auto Trait Implementations§
impl !RefUnwindSafe for ParamMessage
impl Send for ParamMessage
impl Sync for ParamMessage
impl Unpin for ParamMessage
impl !UnwindSafe for ParamMessage
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