Struct i_slint_core::item_tree::ItemRc
source · #[repr(C)]pub struct ItemRc { /* private fields */ }Expand description
A ItemRc is holding a reference to a component containing the item, and the index of this item
Implementations§
source§impl ItemRc
impl ItemRc
sourcepub fn new(component: VRc<ComponentVTable>, index: usize) -> Self
pub fn new(component: VRc<ComponentVTable>, index: usize) -> Self
Create an ItemRc from a component and an index
sourcepub fn downcast<'a, T: HasStaticVTable<ItemVTable>>(
&'a self
) -> Option<VRcMapped<ComponentVTable, T>>
pub fn downcast<'a, T: HasStaticVTable<ItemVTable>>(
&'a self
) -> Option<VRcMapped<ComponentVTable, T>>
Returns a VRcMapped of this item, to conveniently access specialized item API.
pub fn downgrade(&self) -> ItemWeak
sourcepub fn parent_item(&self) -> Option<ItemRc>
pub fn parent_item(&self) -> Option<ItemRc>
Return the parent Item in the item tree.
pub fn is_visible(&self) -> bool
pub fn is_accessible(&self) -> bool
pub fn accessible_role(&self) -> AccessibleRole
pub fn accessible_string_property(
&self,
what: AccessibleStringProperty
) -> SharedString
pub fn geometry(&self) -> LogicalRect
sourcepub fn map_to_window(&self, p: LogicalPoint) -> LogicalPoint
pub fn map_to_window(&self, p: LogicalPoint) -> LogicalPoint
Returns an absolute position of p in the parent item coordinate system
(does not add this item’s x and y)
sourcepub fn component(&self) -> VRc<ComponentVTable>
pub fn component(&self) -> VRc<ComponentVTable>
Returns a reference to the component holding this item
sourcepub fn first_child(&self) -> Option<Self>
pub fn first_child(&self) -> Option<Self>
The first child Item of this Item
sourcepub fn last_child(&self) -> Option<Self>
pub fn last_child(&self) -> Option<Self>
The last child Item of this Item
sourcepub fn previous_sibling(&self) -> Option<Self>
pub fn previous_sibling(&self) -> Option<Self>
The previous sibling of this Item
sourcepub fn next_sibling(&self) -> Option<Self>
pub fn next_sibling(&self) -> Option<Self>
The next sibling of this Item
sourcepub fn previous_focus_item(&self) -> Self
pub fn previous_focus_item(&self) -> Self
Move tab focus to the previous item:
sourcepub fn next_focus_item(&self) -> Self
pub fn next_focus_item(&self) -> Self
Move tab focus to the next item: