Trait AppHandler

Source
pub trait AppHandler {
    // Provided method
    fn command(&mut self, id: u32) { ... }
}
Expand description

A top-level handler that is not associated with any window.

This is most important on macOS, where it is entirely normal for an application to exist with no open windows.

§Note

This is currently very limited in its functionality, and is currently designed to address a single case, which is handling menu commands when no window is open.

It is possible that this will expand to cover additional functionality in the future.

Provided Methods§

Source

fn command(&mut self, id: u32)

Called when a menu item is selected.

Implementors§