WindowDelegate

Trait WindowDelegate 

Source
pub trait WindowDelegate: Send + Sync {
    // Provided methods
    fn will_close(&mut self) { ... }
    fn render(&self) -> Result<RSX, Error> { ... }
}
Expand description

Each platform has their own Window API, which Alchemy attempts to pair down to one consistent API. This also acts as the bootstrapping point for a render tree.

Provided Methods§

Source

fn will_close(&mut self)

Fired when this Window will close. You can use this to clean up or destroy resources, timers, and other things.

Source

fn render(&self) -> Result<RSX, Error>

Called as the first step in the render tree. Every Window contains its own content view that is special, called the root. Widget trees are added to it as necessary, bootstrapped from here.

Implementors§