pub struct EmbeddedEditor { /* private fields */ }Expand description
A plugin editor embedded into a host window. Drop it (or call Self::close) to detach
the editor and remove the child view.
Implementations§
Source§impl EmbeddedEditor
impl EmbeddedEditor
Sourcepub fn embed(
plugin: Arc<Mutex<Plugin>>,
parent: RawWindowHandle,
rect: EditorRect,
) -> Result<Self>
pub fn embed( plugin: Arc<Mutex<Plugin>>, parent: RawWindowHandle, rect: EditorRect, ) -> Result<Self>
Embed plugin’s editor as a child of parent, at rect.
Must be called on the UI/main thread (where your event loop runs). parent is the
host window’s handle (e.g. from eframe::Frame::window_handle()).
Sourcepub fn set_rect(&self, rect: EditorRect)
pub fn set_rect(&self, rect: EditorRect)
Reposition/resize the embedded editor to track rect. Call each frame so the editor
follows the host layout (scroll, window resize). No-op off macOS.
Trait Implementations§
Source§impl Drop for EmbeddedEditor
impl Drop for EmbeddedEditor
Auto Trait Implementations§
impl Freeze for EmbeddedEditor
impl RefUnwindSafe for EmbeddedEditor
impl Send for EmbeddedEditor
impl Sync for EmbeddedEditor
impl Unpin for EmbeddedEditor
impl UnsafeUnpin for EmbeddedEditor
impl UnwindSafe for EmbeddedEditor
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