Trait i_slint_core::component::Component
source · [−]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 get_subtree_range(self: Pin<&Self>, _1: usize) -> IndexRange;
fn get_subtree_component(
self: Pin<&Self>,
_1: usize,
_2: usize,
_3: &mut VWeak<ComponentVTable, Dyn>
);
fn get_item_tree(self: Pin<&Self>) -> Slice<'_, ItemTreeNode>;
fn parent_node(self: Pin<&Self>, _1: &mut ItemWeak);
fn subtree_index(self: Pin<&Self>) -> usize;
fn layout_info(self: Pin<&Self>, _1: Orientation) -> LayoutInfo;
fn accessible_role(self: Pin<&Self>, _1: usize) -> AccessibleRole;
fn accessible_string_property(
self: Pin<&Self>,
_1: usize,
_2: AccessibleStringProperty,
_3: &mut SharedString
);
}
Expand description
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
fn visit_children_item(
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>>
fn get_item_ref(self: Pin<&Self>, _1: usize) -> Pin<VRef<'_, ItemVTable>>
Return a reference to an item using the given index
fn get_subtree_range(self: Pin<&Self>, _1: usize) -> IndexRange
fn get_subtree_range(self: Pin<&Self>, _1: usize) -> IndexRange
Return the range of indices below the dynamic ItemTreeNode
at index
fn get_subtree_component(
self: Pin<&Self>,
_1: usize,
_2: usize,
_3: &mut VWeak<ComponentVTable, Dyn>
)
fn get_subtree_component(
self: Pin<&Self>,
_1: usize,
_2: usize,
_3: &mut VWeak<ComponentVTable, Dyn>
)
Return the ComponentRc
at subindex
below the dynamic ItemTreeNode
at index
fn get_item_tree(self: Pin<&Self>) -> Slice<'_, ItemTreeNode>
fn get_item_tree(self: Pin<&Self>) -> Slice<'_, ItemTreeNode>
Return the item tree that is defined by this Component
.
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 parent_node(self: Pin<&Self>, _1: &mut ItemWeak)
fn parent_node(self: Pin<&Self>, _1: &mut ItemWeak)
Return the node this component is a part of in the parent component.
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 Note that the returned value will typically point to a repeater node, which is strictly speaking not an Item at all!
fn subtree_index(self: Pin<&Self>) -> usize
fn subtree_index(self: Pin<&Self>) -> usize
Return the index of the current subtree or usize::MAX if this is not a subtree
fn layout_info(self: Pin<&Self>, _1: Orientation) -> LayoutInfo
fn layout_info(self: Pin<&Self>, _1: Orientation) -> LayoutInfo
Returns the layout info for this component
fn accessible_role(self: Pin<&Self>, _1: usize) -> AccessibleRole
fn accessible_role(self: Pin<&Self>, _1: usize) -> AccessibleRole
Returns the accessible role for a given item
fn accessible_string_property(
self: Pin<&Self>,
_1: usize,
_2: AccessibleStringProperty,
_3: &mut SharedString
)
fn accessible_string_property(
self: Pin<&Self>,
_1: usize,
_2: AccessibleStringProperty,
_3: &mut SharedString
)
Returns the accessible property