Trait sixtyfps_corelib::component::Component [−][src]
pub trait Component { fn visit_children_item(
self: Pin<&Self>,
_1: isize,
_2: TraversalOrder,
_3: VRefMut<'_, ItemVisitorVTable>
) -> VisitChildrenResult; fn get_item_ref(self: Pin<&Self>, _1: usize) -> Pin<VRef<'_, ItemVTable>>; fn parent_item(self: Pin<&Self>, _1: usize, _2: &mut ItemWeak); fn layout_info(self: Pin<&Self>) -> LayoutInfo; fn apply_layout(self: Pin<&Self>, _1: Rect); }
A Component is representing an unit that is allocated together
Note: Was generated from the #[vtable]
macro on ComponentVTable
Required methods
fn visit_children_item(
self: Pin<&Self>,
_1: isize,
_2: TraversalOrder,
_3: VRefMut<'_, ItemVisitorVTable>
) -> VisitChildrenResult
[src]
self: Pin<&Self>,
_1: isize,
_2: TraversalOrder,
_3: VRefMut<'_, ItemVisitorVTable>
) -> VisitChildrenResult
Visit the children of the item at index index
.
Note that the root item is at index 0, so passing 0 would visit the item under root (the children of root).
If you want to visit the root item, you need to pass -1 as an index.
fn get_item_ref(self: Pin<&Self>, _1: usize) -> Pin<VRef<'_, ItemVTable>>
[src]
Return a reference to an item using the given index
fn parent_item(self: Pin<&Self>, _1: usize, _2: &mut ItemWeak)
[src]
Return the parent item. The return value is an item weak because it can be null if there is no parent. And the return value is passed by &mut because ItemWeak has a destructor
fn layout_info(self: Pin<&Self>) -> LayoutInfo
[src]
Returns the layout info for this component
fn apply_layout(self: Pin<&Self>, _1: Rect)
[src]
Apply the layout to all the items in the component, and set the geometry of the root to the given rect