Skip to main content

LifecycleHook

Trait LifecycleHook 

Source
pub trait LifecycleHook: Send + Sync {
    // Provided methods
    fn on_workspace_loaded(&mut self) { ... }
    fn on_workspace_saving(&mut self) { ... }
    fn on_pane_added(&mut self, _pane_id: usize) { ... }
    fn on_pane_removing(&mut self, _pane_id: usize) { ... }
    fn on_pane_focused(&mut self, _pane_id: usize) { ... }
    fn on_closing(&mut self) { ... }
    fn on_frame(&mut self) { ... }
}
Expand description

Hook for intercepting lifecycle events.

Provided Methods§

Source

fn on_workspace_loaded(&mut self)

Called when the workspace is loaded.

Source

fn on_workspace_saving(&mut self)

Called when the workspace is about to be saved.

Source

fn on_pane_added(&mut self, _pane_id: usize)

Called when a pane is added to the workspace.

Source

fn on_pane_removing(&mut self, _pane_id: usize)

Called when a pane is about to be removed.

Source

fn on_pane_focused(&mut self, _pane_id: usize)

Called when a pane gains focus.

Source

fn on_closing(&mut self)

Called when the application is about to close.

Source

fn on_frame(&mut self)

Called on each frame update (be careful with performance).

Implementors§