Struct sixtyfps_compilerlib::object_tree::Component [−][src]
pub struct Component {
pub id: String,
pub root_element: ElementRc,
pub parent_element: Weak<RefCell<Element>>,
pub optimized_elements: RefCell<Vec<ElementRc>>,
pub embedded_file_resources: RefCell<HashMap<String, usize>>,
pub layouts: RefCell<LayoutVec>,
pub child_insertion_point: RefCell<Option<(ElementRc, ChildrenPlaceholder)>>,
pub setup_code: RefCell<Vec<Expression>>,
pub used_global: RefCell<Vec<Rc<Component>>>,
pub used_structs: RefCell<Vec<Type>>,
pub popup_windows: RefCell<Vec<PopupWindow>>,
}A component is a type in the language which can be instantiated, Or is materialized for repeated expression.
Fields
id: Stringroot_element: ElementRcparent_element: Weak<RefCell<Element>>The parent element within the parent component if this component represents a repeated element
optimized_elements: RefCell<Vec<ElementRc>>List of elements that are not attached to the root anymore because they have been optimized away, but their properties may still be in use
embedded_file_resources: RefCell<HashMap<String, usize>>Map of resources that should be embedded in the generated code, indexed by their absolute path on disk on the build system and valued by a unique integer id, that can be used by the generator for symbol generation.
layouts: RefCell<LayoutVec>All layouts in this component
child_insertion_point: RefCell<Option<(ElementRc, ChildrenPlaceholder)>>When creating this component and inserting “children”, append them to the children of the element pointer to by this field.
setup_code: RefCell<Vec<Expression>>Code to be inserted into the constructor
used_global: RefCell<Vec<Rc<Component>>>All the globals used by this component and its children. FIXME: can we have cycle?
used_structs: RefCell<Vec<Type>>popup_windows: RefCell<Vec<PopupWindow>>Implementations
impl Component[src]
impl Component[src]pub fn from_node(
node: Component,
diag: &mut BuildDiagnostics,
tr: &TypeRegister
) -> Rc<Self>[src]
node: Component,
diag: &mut BuildDiagnostics,
tr: &TypeRegister
) -> Rc<Self>
pub fn is_global(&self) -> bool[src]
This component is a global component introduced with the “global” keyword
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Component
impl !RefUnwindSafe for Componentimpl !UnwindSafe for Component
impl !UnwindSafe for Component