#[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

source

pub fn new(item_tree: VRc<ItemTreeVTable>, index: u32) -> Self

Create an ItemRc from a ItemTree and an index

source

pub fn is_root_item_of(&self, item_tree: &VRc<ItemTreeVTable>) -> bool

source

pub fn borrow<'a>(&'a self) -> Pin<ItemRef<'a>>

Return a Pin<ItemRef<'a>>

source

pub fn downcast<T: HasStaticVTable<ItemVTable>>( &self ) -> Option<VRcMapped<ItemTreeVTable, T>>

Returns a VRcMapped of this item, to conveniently access specialized item API.

source

pub fn downgrade(&self) -> ItemWeak

source

pub fn parent_item(&self) -> Option<ItemRc>

Return the parent Item in the item tree.

source

pub fn is_visible(&self) -> bool

source

pub fn is_accessible(&self) -> bool

source

pub fn accessible_role(&self) -> AccessibleRole

source

pub fn accessible_string_property( &self, what: AccessibleStringProperty ) -> SharedString

source

pub fn geometry(&self) -> LogicalRect

source

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)

source

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)

source

pub fn index(&self) -> u32

Return the index of the item within the ItemTree

source

pub fn item_tree(&self) -> &VRc<ItemTreeVTable>

Returns a reference to the ItemTree holding this item

source

pub fn first_child(&self) -> Option<Self>

The first child Item of this Item

source

pub fn last_child(&self) -> Option<Self>

The last child Item of this Item

source

pub fn previous_sibling(&self) -> Option<Self>

The previous sibling of this Item

source

pub fn next_sibling(&self) -> Option<Self>

The next sibling of this Item

source

pub fn previous_focus_item(&self) -> Self

Move tab focus to the previous item:

source

pub fn next_focus_item(&self) -> Self

Move tab focus to the next item:

Trait Implementations§

source§

impl Clone for ItemRc

source§

fn clone(&self) -> ItemRc

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ItemRc

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for ItemRc

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for ItemRc

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.