pub trait AppExtension: 'static {
Show 13 methods
// Provided methods
fn register(&self, info: &mut AppExtensionsInfo)
where Self: Sized { ... }
fn init(&mut self) { ... }
fn event_preview(&mut self, update: &mut EventUpdate) { ... }
fn event_ui(&mut self, update: &mut EventUpdate) { ... }
fn event(&mut self, update: &mut EventUpdate) { ... }
fn info(&mut self, info_widgets: &mut InfoUpdates) { ... }
fn update_preview(&mut self) { ... }
fn update_ui(&mut self, update_widgets: &mut WidgetUpdates) { ... }
fn update(&mut self) { ... }
fn layout(&mut self, layout_widgets: &mut LayoutUpdates) { ... }
fn render(
&mut self,
render_widgets: &mut RenderUpdates,
render_update_widgets: &mut RenderUpdates,
) { ... }
fn deinit(&mut self) { ... }
fn boxed(self) -> Box<dyn AppExtensionBoxed>
where Self: Sized { ... }
}Expand description
An app extension.
App extensions setup and update core features such as services and events. App instances are fully composed of app extensions.
See the zng::app module level documentation for more details, including the call order of methods
of this trait.
Provided Methods§
Sourcefn register(&self, info: &mut AppExtensionsInfo)where
Self: Sized,
fn register(&self, info: &mut AppExtensionsInfo)where
Self: Sized,
Register info abound this extension on the info list.
Sourcefn event_preview(&mut self, update: &mut EventUpdate)
fn event_preview(&mut self, update: &mut EventUpdate)
Called just before event_ui when an event notifies.
Extensions can handle this method to intercept event updates before the UI.
Note that this is not related to the on_event_preview properties, all UI events
happen in event_ui.
Sourcefn event_ui(&mut self, update: &mut EventUpdate)
fn event_ui(&mut self, update: &mut EventUpdate)
Called just before event.
Only extensions that generate windows should handle this method. The UiNode::event
method is called here.
Sourcefn event(&mut self, update: &mut EventUpdate)
fn event(&mut self, update: &mut EventUpdate)
Called after event_ui.
This is the general extensions event handler, it gives the chance for the UI to signal stop propagation.
Sourcefn info(&mut self, info_widgets: &mut InfoUpdates)
fn info(&mut self, info_widgets: &mut InfoUpdates)
Called when info rebuild is requested for windows and widgets.
The UiNode::info method is called here.
Sourcefn update_preview(&mut self)
fn update_preview(&mut self)
Called just before update_ui.
Extensions can handle this method to react to updates before the UI.
Note that this is not related to the on_event_preview properties, all UI events
happen in update_ui.
Sourcefn update_ui(&mut self, update_widgets: &mut WidgetUpdates)
fn update_ui(&mut self, update_widgets: &mut WidgetUpdates)
Called just before update.
Only extensions that manage windows should handle this method.
The UiNode::update method is called here.
Sourcefn layout(&mut self, layout_widgets: &mut LayoutUpdates)
fn layout(&mut self, layout_widgets: &mut LayoutUpdates)
Called when layout is requested for windows and widgets.
The UiNode::layout method is called here.
Sourcefn render(
&mut self,
render_widgets: &mut RenderUpdates,
render_update_widgets: &mut RenderUpdates,
)
fn render( &mut self, render_widgets: &mut RenderUpdates, render_update_widgets: &mut RenderUpdates, )
Called when render is requested for windows and widgets.
The UiNode::render and UiNode::render_update methods are called here.