Skip to main content

ObjectApplication

Trait ObjectApplication 

Source
pub trait ObjectApplication {
    // Required methods
    fn info(&self) -> AppInfo;
    fn build_object(&mut self, width: u32, height: u32) -> ObjectNode;

    // Provided methods
    fn after_object_event(
        &mut self,
        _root: &Rc<RefCell<ObjectNode>>,
        _event: &Event,
    ) { ... }
    fn tick_object(&mut self, _root: &Rc<RefCell<ObjectNode>>) { ... }
    fn destroy(&mut self) { ... }
}
Expand description

Trait implemented by applications that natively build an ObjectNode tree.

This is the forward runtime carrier for LPAR phases. The legacy Application trait remains source-compatible; runtimes that need object metadata, invalidation, bubbling, focus, or scroll semantics should prefer this trait when available.

Required Methods§

Source

fn info(&self) -> AppInfo

Return metadata about this application.

Source

fn build_object(&mut self, width: u32, height: u32) -> ObjectNode

Construct the initial object tree for the given display dimensions.

Provided Methods§

Source

fn after_object_event( &mut self, _root: &Rc<RefCell<ObjectNode>>, _event: &Event, )

Called after each event has been dispatched through the object tree.

Source

fn tick_object(&mut self, _root: &Rc<RefCell<ObjectNode>>)

Called once per frame for animations or deferred work.

Source

fn destroy(&mut self)

Called before the application is unloaded.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§