Skip to main content

WindowController

Trait WindowController 

Source
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§

Source

fn id(&self) -> &str

What it is known by.

Provided Methods§

Source

fn contexts(&self) -> &[FrameContext]

The kinds of window it is for. Only the main one by default.

Source

fn actions(&self) -> Vec<Action>

The actions it brings. Asked once.

Source

fn activated(&mut self, _frame: &Frame)

The frame is ready.

Source

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".

Implementors§