pub trait WindowController {
// Required method
fn id(&self) -> &str;
// Provided methods
fn contexts(&self) -> &[FrameContext] { ... }
fn actions(&self) -> Vec<Action> { ... }
fn activated(&mut self, _frame: &Frame) { ... }
fn deactivated(&mut self, _frame: &Frame) { ... }
}Expand description
Behavior tied to a window, whatever view it shows. Stays on while the frame lasts.
Required Methods§
Provided Methods§
Sourcefn contexts(&self) -> &[FrameContext]
fn contexts(&self) -> &[FrameContext]
The kinds of window it is for. Only the main one by default.
Sourcefn deactivated(&mut self, _frame: &Frame)
fn deactivated(&mut self, _frame: &Frame)
The frame is closing.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".