pub fn create_iced_editor<E: IcedEditor>(
    iced_state: Arc<IcedState>,
    initialization_flags: E::InitializationFlags
) -> Option<Box<dyn Editor>>
Expand description

Create an Editor instance using iced. The rough idea is that you implement IcedEditor, which is roughly analogous to iced’s regular [Application] trait except that it receives the GuiContext alongside its initialization flags so it can update the parameter values. The IcedState passed to this function contains the GUI’s intitial size, and this is kept in sync whenever the GUI gets resized. You can also use this to know if the GUI is open, so you can avoid performing potentially expensive calculations while the GUI is not open. If you want this size to be persisted when restoring a plugin instance, then you can store it in a #[persist = "key"] field on your parameters struct.

See the module’s documentation for an example on how to use this.