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 ItemTree containing the item, and the index of this item
Implementations§
source§impl ItemRc
impl ItemRc
sourcepub fn new(item_tree: VRc<ItemTreeVTable>, index: u32) -> Self
pub fn new(item_tree: VRc<ItemTreeVTable>, index: u32) -> Self
Create an ItemRc from a ItemTree and an index
pub fn is_root_item_of(&self, item_tree: &VRc<ItemTreeVTable>) -> bool
sourcepub fn downcast<T: HasStaticVTable<ItemVTable>>(
&self
) -> Option<VRcMapped<ItemTreeVTable, T>>
pub fn downcast<T: HasStaticVTable<ItemVTable>>( &self ) -> Option<VRcMapped<ItemTreeVTable, 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 map_to_item_tree(
&self,
p: LogicalPoint,
item_tree: &VRc<ItemTreeVTable>
) -> LogicalPoint
pub fn map_to_item_tree( &self, p: LogicalPoint, item_tree: &VRc<ItemTreeVTable> ) -> LogicalPoint
Returns an absolute position of p
in the ItemTree
’s coordinate system
(does not add this item’s x and y)
sourcepub fn item_tree(&self) -> &VRc<ItemTreeVTable>
pub fn item_tree(&self) -> &VRc<ItemTreeVTable>
Returns a reference to the ItemTree 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:
Trait Implementations§
source§impl PartialEq for ItemRc
impl PartialEq for ItemRc
impl Eq for ItemRc
Auto Trait Implementations§
impl Freeze for ItemRc
impl RefUnwindSafe for ItemRc
impl !Send for ItemRc
impl !Sync for ItemRc
impl Unpin for ItemRc
impl UnwindSafe for ItemRc
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more