Trait nih_plug_iced::widgets::generic_ui::ParamWidget
source · pub trait ParamWidget {
type State: Default;
// Required method
fn into_widget_element<'a, P: Param>(
param: &'a P,
state: &'a mut Self::State
) -> Element<'a, ParamMessage>;
// Provided method
unsafe fn into_widget_element_raw<'a>(
param: &ParamPtr,
state: &'a mut Self::State
) -> Element<'a, ParamMessage> { ... }
}
Expand description
A widget that can be used to create a generic UI with. This is used in conjuction with empty structs to emulate existential types.
Required Associated Types§
Required Methods§
sourcefn into_widget_element<'a, P: Param>(
param: &'a P,
state: &'a mut Self::State
) -> Element<'a, ParamMessage>
fn into_widget_element<'a, P: Param>( param: &'a P, state: &'a mut Self::State ) -> Element<'a, ParamMessage>
Create an [Element
] for a widget for the specified parameter.
Provided Methods§
sourceunsafe fn into_widget_element_raw<'a>(
param: &ParamPtr,
state: &'a mut Self::State
) -> Element<'a, ParamMessage>
unsafe fn into_widget_element_raw<'a>( param: &ParamPtr, state: &'a mut Self::State ) -> Element<'a, ParamMessage>
The same as into_widget_element()
, but for a ParamPtr
.
Safety
Undefined behavior of the ParamPtr
does not point to a valid parameter.