pub struct BaseInstance {
pub handler_registry: Option<Rc<RefCell<HandlerRegistry>>>,
pub instance_prototypical_properties: PropertiesInit,
pub instance_prototypical_common_properties: CommonPropertiesInit,
pub component_settings: Option<Vec<SettingsBlockElement>>,
pub template_node_identifier: Option<UniqueTemplateNodeIdentifier>,
pub template_node_type_id: Option<TypeId>,
pub template_node_selector_info: Option<TemplateNodeSelectorInfo>,
pub transition_config: ComponentTransitionConfig,
pub properties_scope: PropertiesScopeInit,
/* private fields */
}Expand description
Shared storage carried by every concrete InstanceNode.
Fields§
§handler_registry: Option<Rc<RefCell<HandlerRegistry>>>§instance_prototypical_properties: PropertiesInit§instance_prototypical_common_properties: CommonPropertiesInit§component_settings: Option<Vec<SettingsBlockElement>>§template_node_identifier: Option<UniqueTemplateNodeIdentifier>§template_node_type_id: Option<TypeId>§template_node_selector_info: Option<TemplateNodeSelectorInfo>§transition_config: ComponentTransitionConfig§properties_scope: PropertiesScopeInitImplementations§
Source§impl BaseInstance
impl BaseInstance
Sourcepub fn new(args: InstantiationArgs, flags: InstanceFlags) -> Self
pub fn new(args: InstantiationArgs, flags: InstanceFlags) -> Self
Build shared instance state from compiler-generated instantiation args.
Sourcepub fn get_handler_registry(&self) -> Option<Rc<RefCell<HandlerRegistry>>>
pub fn get_handler_registry(&self) -> Option<Rc<RefCell<HandlerRegistry>>>
Returns a handle to a node-managed HandlerRegistry, a mapping between event types and handlers.
Each node that can handle events is responsible for implementing this; Component instances generate
the necessary code to wire up userland events like <SomeNode @click=self.handler>. Primitives must handle
this explicitly, see e.g. [pax_std::drawing::rectangle::RectangleInstance#get_handler_registry].
Sourcepub fn get_instance_children(&self) -> &InstanceNodePtrList
pub fn get_instance_children(&self) -> &InstanceNodePtrList
Return the list of instance nodes that are children of this one. Intuitively, this returns the nodes owned directly by this instance’s definition.
For Components, this returns the root(s) of the component template, not the
projected children supplied by the containing component.
Sourcepub fn flags(&self) -> &InstanceFlags
pub fn flags(&self) -> &InstanceFlags
Static behavior flags for this instance.