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§
Sourcefn did_launch(&mut self, state: &mut State)
fn did_launch(&mut self, state: &mut State)
Called when the underlying native framework finished launching.
Sourcefn will_show_window(&mut self, window: Window, state: &mut State)
fn will_show_window(&mut self, window: Window, state: &mut State)
Called when the underlying native framework finished launching.
Sourcefn configure_main_window(&mut self, state: &mut State) -> WindowConfiguration
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.
Sourcefn make_content_view(
&mut self,
state: &mut State,
window: Window,
) -> impl View<Self, State>where
Self: Sized,
fn make_content_view(
&mut self,
state: &mut State,
window: Window,
) -> impl View<Self, State>where
Self: Sized,
Called when a menu action is invoked.