Skip to main content

ElementBase

Trait ElementBase 

Source
pub trait ElementBase: Element {
Show 17 methods // Provided methods fn rebuild(self: Handle<Self>, app: &mut App, force: bool) { ... } fn render_object_attaching_child( self: Handle<Self>, app: &App, ) -> Option<AnyElement> { ... } fn mount( self: Handle<Self>, app: &mut App, parent: Option<AnyElement>, new_slot: Option<Slot>, ) { ... } fn update(self: Handle<Self>, app: &mut App, new_widget: WidgetRef) { ... } fn update_slot(self: Handle<Self>, app: &mut App, new_slot: Option<Slot>) { ... } fn attach_render_object( self: Handle<Self>, app: &mut App, new_slot: Option<Slot>, ) { ... } fn detach_render_object(self: Handle<Self>, app: &mut App) { ... } fn activate(self: Handle<Self>, app: &mut App) { ... } fn deactivate(self: Handle<Self>, app: &mut App) { ... } fn unmount(self: Handle<Self>, app: &mut App) { ... } fn perform_rebuild(self: Handle<Self>, app: &mut App) { ... } fn did_change_dependencies(self: Handle<Self>, app: &mut App) { ... } fn attach_notification_tree(self: Handle<Self>, app: &mut App) { ... } fn build_scope(self: Handle<Self>, app: &App) -> Handle<BuildScope> { ... } fn mark_needs_build(self: Handle<Self>, app: &mut App) { ... } fn update_inheritance(self: Handle<Self>, app: &mut App) { ... } fn render_object(self: Handle<Self>, app: &App) -> Option<AnyRenderObject> { ... }
}
Expand description

Dart’s Element bodies, reachable from an override the way super.mount(..) is.

Every Element implements it. An override that must run the inherited body calls it trait-qualified, ElementBase::mount(self, app, parent, new_slot), at the position Dart calls super; the Element defaults run the same bodies.

Provided Methods§

Source

fn rebuild(self: Handle<Self>, app: &mut App, force: bool)

Element.rebuild for an element whose type is known: calls its perform_rebuild directly rather than through the vtable, so a first build adds no frame on the way down the tree.

Source

fn render_object_attaching_child( self: Handle<Self>, app: &App, ) -> Option<AnyElement>

Element.renderObjectAttachingChild: the single child, if any.

Source

fn mount( self: Handle<Self>, app: &mut App, parent: Option<AnyElement>, new_slot: Option<Slot>, )

Element.mount.

Source

fn update(self: Handle<Self>, app: &mut App, new_widget: WidgetRef)

Element.update.

Source

fn update_slot(self: Handle<Self>, app: &mut App, new_slot: Option<Slot>)

Element.updateSlot.

Source

fn attach_render_object( self: Handle<Self>, app: &mut App, new_slot: Option<Slot>, )

Element.attachRenderObject.

Source

fn detach_render_object(self: Handle<Self>, app: &mut App)

Element.detachRenderObject.

Source

fn activate(self: Handle<Self>, app: &mut App)

Element.activate.

Source

fn deactivate(self: Handle<Self>, app: &mut App)

Element.deactivate.

Source

fn unmount(self: Handle<Self>, app: &mut App)

Element.unmount.

Source

fn perform_rebuild(self: Handle<Self>, app: &mut App)

Element.performRebuild: clears the dirty flag.

Source

fn did_change_dependencies(self: Handle<Self>, app: &mut App)

Element.didChangeDependencies.

Source

fn attach_notification_tree(self: Handle<Self>, app: &mut App)

Element.attachNotificationTree: inherit the parent’s notification chain.

Source

fn build_scope(self: Handle<Self>, app: &App) -> Handle<BuildScope>

Element.buildScope: the scope inherited from the parent at mount.

Source

fn mark_needs_build(self: Handle<Self>, app: &mut App)

Element.markNeedsBuild.

Source

fn update_inheritance(self: Handle<Self>, app: &mut App)

Element._updateInheritance.

Source

fn render_object(self: Handle<Self>, app: &App) -> Option<AnyRenderObject>

Element.renderObject: walk down through the attaching children.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§