pub struct CheckboxInstance { /* private fields */ }
Trait Implementations§
Source§impl InstanceNode for CheckboxInstance
impl InstanceNode for CheckboxInstance
fn instantiate(args: InstantiationArgs) -> Rc<Self>where
Self: Sized,
Source§fn update(
self: Rc<Self>,
expanded_node: &Rc<ExpandedNode>,
_context: &Rc<RuntimeContext>,
)
fn update( self: Rc<Self>, expanded_node: &Rc<ExpandedNode>, _context: &Rc<RuntimeContext>, )
Updates the expanded node, recomputing it’s properties and possibly updating it’s children
Source§fn handle_mount(
self: Rc<Self>,
expanded_node: &Rc<ExpandedNode>,
context: &Rc<RuntimeContext>,
)
fn handle_mount( self: Rc<Self>, expanded_node: &Rc<ExpandedNode>, context: &Rc<RuntimeContext>, )
Fires during the tick when a node is first attached to the render tree. For example,
this event fires by all nodes on the global first tick, and by all nodes in a subtree
when a
Conditional
subsequently turns on a subtree (i.e. when the Conditional
s criterion becomes true
after being false
through the end of at least 1 frame.)
A use-case: send a message to native renderers that a Text
element should be rendered and trackedSource§fn handle_unmount(
&self,
expanded_node: &Rc<ExpandedNode>,
context: &Rc<RuntimeContext>,
)
fn handle_unmount( &self, expanded_node: &Rc<ExpandedNode>, context: &Rc<RuntimeContext>, )
Fires during element unmount, when an element is about to be removed from the render tree (e.g. by a
Conditional
)
A use-case: send a message to native renderers that a Text
element should be removedSource§fn base(&self) -> &BaseInstance
fn base(&self) -> &BaseInstance
Retrieves the base instance, containing common functionality that all instances share
fn resolve_debug( &self, f: &mut Formatter<'_>, _expanded_node: Option<&ExpandedNode>, ) -> Result
Source§fn handle_pre_render(
&self,
expanded_node: &ExpandedNode,
context: &Rc<RuntimeContext>,
rcs: &mut dyn RenderContext,
)
fn handle_pre_render( &self, expanded_node: &ExpandedNode, context: &Rc<RuntimeContext>, rcs: &mut dyn RenderContext, )
Second lifecycle method during each render loop, occurs after
properties have been computed, but before rendering
Example use-case: perform side-effects to the drawing contexts.
This is how [
Frame
] performs clipping, for example.
Occurs in a pre-order traversal of the render tree.Source§fn render(
&self,
expanded_node: &ExpandedNode,
context: &Rc<RuntimeContext>,
rcs: &mut dyn RenderContext,
)
fn render( &self, expanded_node: &ExpandedNode, context: &Rc<RuntimeContext>, rcs: &mut dyn RenderContext, )
Third lifecycle method during each render loop, occurs
after all descendents have been rendered.
Occurs in a post-order traversal of the render tree. Most primitives
are expected to draw their contents to the rendering context during this event.
Source§fn handle_post_render(
&self,
expanded_node: &ExpandedNode,
context: &Rc<RuntimeContext>,
rcs: &mut dyn RenderContext,
)
fn handle_post_render( &self, expanded_node: &ExpandedNode, context: &Rc<RuntimeContext>, rcs: &mut dyn RenderContext, )
Fourth and final lifecycle method during each render loop, occurs
after all descendents have been rendered AND the current node has been rendered.
Useful for clean-up, e.g. this is where
Frame
cleans up the drawing contexts
to stop clipping.
Occurs in a post-order traversal of the render tree.Source§fn handle_scroll(&self, args_scroll: Scroll)
fn handle_scroll(&self, args_scroll: Scroll)
Invoked by event interrupts to pass scroll information to render node
fn get_template(&self) -> Option<&RefCell<Vec<Rc<dyn InstanceNode>>>>
fn handle_text_change(&self, _expanded_node: &Rc<ExpandedNode>, _text: String)
fn handle_native_interrupt( &self, _expanded_node: &Rc<ExpandedNode>, _interrupt: &NativeInterrupt, )
Auto Trait Implementations§
impl !Freeze for CheckboxInstance
impl !RefUnwindSafe for CheckboxInstance
impl !Send for CheckboxInstance
impl !Sync for CheckboxInstance
impl Unpin for CheckboxInstance
impl !UnwindSafe for CheckboxInstance
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
Source§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.