Trait zng_app::AppEventObserver

source ·
pub trait AppEventObserver {
    // Provided methods
    fn raw_event(&mut self, ev: &Event) { ... }
    fn event_preview(&mut self, update: &mut EventUpdate) { ... }
    fn event_ui(&mut self, update: &mut EventUpdate) { ... }
    fn event(&mut self, update: &mut EventUpdate) { ... }
    fn update_preview(&mut self) { ... }
    fn update_ui(&mut self, update_widgets: &mut WidgetUpdates) { ... }
    fn update(&mut self) { ... }
    fn info(&mut self, info_widgets: &mut InfoUpdates) { ... }
    fn layout(&mut self, layout_widgets: &mut LayoutUpdates) { ... }
    fn render(
        &mut self,
        render_widgets: &mut RenderUpdates,
        render_update_widgets: &mut RenderUpdates,
    ) { ... }
    fn as_dyn(&mut self) -> DynAppEventObserver<'_>
       where Self: Sized { ... }
}
Expand description

Observer for HeadlessApp::update_observed.

This works like a temporary app extension that runs only for the update call.

Provided Methods§

source

fn raw_event(&mut self, ev: &Event)

Called for each raw event received.

source

fn event_preview(&mut self, update: &mut EventUpdate)

Called just after AppExtension::event_preview.

source

fn event_ui(&mut self, update: &mut EventUpdate)

Called just after AppExtension::event_ui.

source

fn event(&mut self, update: &mut EventUpdate)

Called just after AppExtension::event.

source

fn update_preview(&mut self)

Called just after AppExtension::update_preview.

source

fn update_ui(&mut self, update_widgets: &mut WidgetUpdates)

Called just after AppExtension::update_ui.

source

fn update(&mut self)

Called just after AppExtension::update.

source

fn info(&mut self, info_widgets: &mut InfoUpdates)

Called just after AppExtension::info.

source

fn layout(&mut self, layout_widgets: &mut LayoutUpdates)

Called just after AppExtension::layout.

source

fn render( &mut self, render_widgets: &mut RenderUpdates, render_update_widgets: &mut RenderUpdates, )

Called just after AppExtension::render.

source

fn as_dyn(&mut self) -> DynAppEventObserver<'_>
where Self: Sized,

Cast to dynamically dispatched observer, this can help avoid code bloat.

The app methods that accept observers automatically use this method if the feature "dyn_app_extension" is active.

Implementations on Foreign Types§

source§

impl AppEventObserver for ()

Nil observer, does nothing.

Implementors§