pub struct IcedEditor<P, M>where
P: Params + 'static,
M: IcedPlugin<P>,{ /* private fields */ }Expand description
Iced-based plugin editor.
Type parameters:
P- the plugin’sParamstypeM- the plugin’sIcedPluginimplementation
Implementations§
Source§impl<P: Params + 'static> IcedEditor<P, AutoPlugin>
impl<P: Params + 'static> IcedEditor<P, AutoPlugin>
Sourcepub fn from_layout(params: Arc<P>, layout: GridLayout) -> Self
pub fn from_layout(params: Arc<P>, layout: GridLayout) -> Self
Create an editor that auto-generates the UI from a GridLayout.
Source§impl<P: Params + 'static, M: IcedPlugin<P> + 'static> IcedEditor<P, M>
impl<P: Params + 'static, M: IcedPlugin<P> + 'static> IcedEditor<P, M>
Sourcepub fn new(params: Arc<P>, size: (u32, u32)) -> Self
pub fn new(params: Arc<P>, size: (u32, u32)) -> Self
Create an editor with a custom IcedPlugin implementation.
Sourcepub fn with_font(self, family: &'static str, data: &'static [u8]) -> Self
pub fn with_font(self, family: &'static str, data: &'static [u8]) -> Self
Set a custom default font (family name + TrueType data).
IcedEditor::new(params, (250, 330))
.with_font("JetBrains Mono", truce_gui::font::JETBRAINS_MONO)Sourcepub fn with_meter_ids(self, ids: Vec<impl Into<u32>>) -> Self
pub fn with_meter_ids(self, ids: Vec<impl Into<u32>>) -> Self
Set meter IDs to poll each tick.
Trait Implementations§
Source§impl<P: Params + 'static, M: IcedPlugin<P> + 'static> Drop for IcedEditor<P, M>
impl<P: Params + 'static, M: IcedPlugin<P> + 'static> Drop for IcedEditor<P, M>
Source§fn drop(&mut self)
fn drop(&mut self)
Defensive cleanup for hosts that drop the editor without first
calling Editor::close. Pro Tools AAX has been seen to do this
on plugin removal under certain conditions; live-coding hosts
and unit tests can also short-circuit the lifecycle. On Linux
baseview::WindowHandle has no Drop, so without an explicit
close the render thread would keep running against a freed
*mut IcedEditor and later panic inside wgpu as surfaces tear
down. close() is idempotent - baseview_window.take()
no-ops on the second call - so calling it here on top of a
well-behaved host’s earlier close() is safe.
Source§impl<P: Params + 'static, M: IcedPlugin<P>> Editor for IcedEditor<P, M>
impl<P: Params + 'static, M: IcedPlugin<P>> Editor for IcedEditor<P, M>
Source§fn open(&mut self, parent: RawWindowHandle, context: PluginContext)
fn open(&mut self, parent: RawWindowHandle, context: PluginContext)
Source§fn can_resize(&self) -> bool
fn can_resize(&self) -> bool
Source§fn screenshot(
&mut self,
_params: Arc<dyn Params>,
) -> Option<(Vec<u8>, u32, u32)>
fn screenshot( &mut self, _params: Arc<dyn Params>, ) -> Option<(Vec<u8>, u32, u32)>
Source§fn set_size(&mut self, width: u32, height: u32) -> bool
fn set_size(&mut self, width: u32, height: u32) -> bool
Source§fn set_scale_factor(&mut self, factor: f64)
fn set_scale_factor(&mut self, factor: f64)
Source§fn state_changed(&mut self)
fn state_changed(&mut self)
impl<P: Params, M: IcedPlugin<P>> Send for IcedEditor<P, M>
Auto Trait Implementations§
impl<P, M> !Freeze for IcedEditor<P, M>
impl<P, M> !RefUnwindSafe for IcedEditor<P, M>
impl<P, M> !Sync for IcedEditor<P, M>
impl<P, M> Unpin for IcedEditor<P, M>where
M: Unpin,
impl<P, M> UnsafeUnpin for IcedEditor<P, M>where
M: UnsafeUnpin,
impl<P, M> !UnwindSafe for IcedEditor<P, M>
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<State, Message> IntoBoot<State, Message> for State
impl<State, Message> IntoBoot<State, Message> for State
Source§fn into_boot(self) -> (State, Task<Message>)
fn into_boot(self) -> (State, Task<Message>)
Application.Source§impl<E> IntoEditor for Ewhere
E: Editor + 'static,
impl<E> IntoEditor for Ewhere
E: Editor + 'static,
Source§fn into_editor(self) -> Box<dyn Editor>
fn into_editor(self) -> Box<dyn Editor>
Box<dyn Editor>.