pub trait EditorDelegate: Send {
// Provided methods
fn editor_size(&self) -> Size { ... }
fn editor_constraints(&self) -> EditorConstraints { ... }
fn editor_opened(&mut self) { ... }
fn editor_closed(&mut self) { ... }
fn editor_resized(&mut self, _new_size: Size) { ... }
}Expand description
Trait for plugin editor/GUI callbacks.
Implement this trait to provide GUI-related configuration and callbacks. The actual WebView creation and management is handled by the framework; this trait just provides configuration and lifecycle hooks.
Provided Methods§
Sourcefn editor_size(&self) -> Size
fn editor_size(&self) -> Size
Get the initial editor size.
This is the size the editor window will have when first opened. Default is 800x600.
Sourcefn editor_constraints(&self) -> EditorConstraints
fn editor_constraints(&self) -> EditorConstraints
Get the editor size constraints.
These constraints determine the minimum and maximum sizes the editor can be resized to, and whether resizing is allowed at all.
Sourcefn editor_opened(&mut self)
fn editor_opened(&mut self)
Called when the editor is opened.
Use this to initialize any editor-specific state.
Sourcefn editor_closed(&mut self)
fn editor_closed(&mut self)
Called when the editor is closed.
Use this to clean up editor-specific state.
Sourcefn editor_resized(&mut self, _new_size: Size)
fn editor_resized(&mut self, _new_size: Size)
Called when the editor is resized.
The new size has already been constrained to the editor constraints.