Trait finestra::AppDelegate

source ·
pub trait AppDelegate<State = ()>
where State: 'static,
{ // Provided methods fn did_launch(&mut self, state: &mut State) { ... } fn will_show_window(&mut self, window: Window, state: &mut State) { ... } fn configure_main_window( &mut self, state: &mut State ) -> WindowConfiguration { ... } fn make_content_view( &mut self, state: &mut State, window: Window ) -> impl View<Self, State> where Self: Sized { ... } fn did_invoke_menu_action( &mut self, item: MenuItem, state: &mut State, window: Window ) { ... } }
Expand description

A platform-agnostic delegation trait, which will be used as a facade for these native frameworks.

Provided Methods§

source

fn did_launch(&mut self, state: &mut State)

Called when the underlying native framework finished launching.

source

fn will_show_window(&mut self, window: Window, state: &mut State)

Called when the underlying native framework finished launching.

source

fn configure_main_window(&mut self, state: &mut State) -> WindowConfiguration

Called when the main window must be configured. By overloading this function, you can - for example - give the window a name.

source

fn make_content_view( &mut self, state: &mut State, window: Window ) -> impl View<Self, State>
where Self: Sized,

Called when the window has been configured, and allows you to set the components that make up your window, such as Labels, Stacks, and Buttons.

source

fn did_invoke_menu_action( &mut self, item: MenuItem, state: &mut State, window: Window )

Called when a menu action is invoked.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl AppDelegate for ()

Implementors§