ItemTreeVTable

Struct ItemTreeVTable 

Source
#[repr(C)]
pub struct ItemTreeVTable {
Show 18 fields pub visit_children_item: unsafe fn(_: Pin<VRef<'_, ItemTreeVTable>>, index: isize, order: TraversalOrder, visitor: VRefMut<'_, ItemVisitorVTable>) -> VisitChildrenResult, pub get_item_ref: unsafe fn(_: Pin<VRef<'_, ItemTreeVTable>>, index: u32) -> Pin<VRef<'_, ItemVTable>>, pub get_subtree_range: unsafe fn(_: Pin<VRef<'_, ItemTreeVTable>>, index: u32) -> IndexRange, pub get_subtree: unsafe fn(_: Pin<VRef<'_, ItemTreeVTable>>, index: u32, subindex: usize, result: &mut VWeak<ItemTreeVTable, Dyn>), pub get_item_tree: unsafe fn(Pin<VRef<'_, ItemTreeVTable>>) -> Slice<'_, ItemTreeNode>, pub parent_node: unsafe fn(_: Pin<VRef<'_, ItemTreeVTable>>, result: &mut ItemWeak), pub embed_component: unsafe fn(_: Pin<VRef<'_, ItemTreeVTable>>, parent: &VWeak<ItemTreeVTable>, parent_item_tree_index: u32) -> bool, pub subtree_index: unsafe fn(Pin<VRef<'_, ItemTreeVTable>>) -> usize, pub layout_info: unsafe fn(Pin<VRef<'_, ItemTreeVTable>>, Orientation) -> LayoutInfo, pub item_geometry: unsafe fn(_: Pin<VRef<'_, ItemTreeVTable>>, item_index: u32) -> LogicalRect, pub accessible_role: unsafe fn(_: Pin<VRef<'_, ItemTreeVTable>>, item_index: u32) -> AccessibleRole, pub accessible_string_property: unsafe fn(_: Pin<VRef<'_, ItemTreeVTable>>, item_index: u32, what: AccessibleStringProperty, result: &mut SharedString) -> bool, pub accessibility_action: unsafe fn(_: Pin<VRef<'_, ItemTreeVTable>>, item_index: u32, action: &AccessibilityAction), pub supported_accessibility_actions: unsafe fn(_: Pin<VRef<'_, ItemTreeVTable>>, item_index: u32) -> SupportedAccessibilityAction, pub item_element_infos: unsafe fn(_: Pin<VRef<'_, ItemTreeVTable>>, item_index: u32, result: &mut SharedString) -> bool, pub window_adapter: unsafe fn(_: Pin<VRef<'_, ItemTreeVTable>>, do_create: bool, result: &mut Option<WindowAdapterRc>), pub drop_in_place: unsafe fn(VRefMut<'_, ItemTreeVTable>) -> Layout, pub dealloc: unsafe fn(_: &ItemTreeVTable, ptr: *mut u8, layout: Layout),
}
Expand description

A ItemTree is representing an unit that is allocated together

Fields§

§visit_children_item: unsafe fn(_: Pin<VRef<'_, ItemTreeVTable>>, index: isize, order: TraversalOrder, visitor: 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.

§get_item_ref: unsafe fn(_: Pin<VRef<'_, ItemTreeVTable>>, index: u32) -> Pin<VRef<'_, ItemVTable>>

Return a reference to an item using the given index

§get_subtree_range: unsafe fn(_: Pin<VRef<'_, ItemTreeVTable>>, index: u32) -> IndexRange

Return the range of indices below the dynamic ItemTreeNode at index

§get_subtree: unsafe fn(_: Pin<VRef<'_, ItemTreeVTable>>, index: u32, subindex: usize, result: &mut VWeak<ItemTreeVTable, Dyn>)

Return the ItemTreeRc at subindex below the dynamic ItemTreeNode at index

§get_item_tree: unsafe fn(Pin<VRef<'_, ItemTreeVTable>>) -> Slice<'_, ItemTreeNode>

Return the item tree that is defined by this ItemTree. 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

§parent_node: unsafe fn(_: Pin<VRef<'_, ItemTreeVTable>>, result: &mut ItemWeak)

Return the node this ItemTree is a part of in the parent ItemTree.

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!

§embed_component: unsafe fn(_: Pin<VRef<'_, ItemTreeVTable>>, parent: &VWeak<ItemTreeVTable>, parent_item_tree_index: u32) -> bool

This embeds this ItemTree into the item tree of another ItemTree

Returns true if this ItemTree was embedded into the parent at parent_item_tree_index.

§subtree_index: unsafe fn(Pin<VRef<'_, ItemTreeVTable>>) -> usize

Return the index of the current subtree or usize::MAX if this is not a subtree

§layout_info: unsafe fn(Pin<VRef<'_, ItemTreeVTable>>, Orientation) -> LayoutInfo

Returns the layout info for the root of the ItemTree

§item_geometry: unsafe fn(_: Pin<VRef<'_, ItemTreeVTable>>, item_index: u32) -> LogicalRect

Returns the item’s geometry (relative to its parent item)

§accessible_role: unsafe fn(_: Pin<VRef<'_, ItemTreeVTable>>, item_index: u32) -> AccessibleRole

Returns the accessible role for a given item

§accessible_string_property: unsafe fn(_: Pin<VRef<'_, ItemTreeVTable>>, item_index: u32, what: AccessibleStringProperty, result: &mut SharedString) -> bool

Returns the accessible property via the result. Returns true if such a property exists.

§accessibility_action: unsafe fn(_: Pin<VRef<'_, ItemTreeVTable>>, item_index: u32, action: &AccessibilityAction)

Executes an accessibility action.

§supported_accessibility_actions: unsafe fn(_: Pin<VRef<'_, ItemTreeVTable>>, item_index: u32) -> SupportedAccessibilityAction

Returns the supported accessibility actions.

§item_element_infos: unsafe fn(_: Pin<VRef<'_, ItemTreeVTable>>, item_index: u32, result: &mut SharedString) -> bool

Add the ElementName::id entries of the given item

§window_adapter: unsafe fn(_: Pin<VRef<'_, ItemTreeVTable>>, do_create: bool, result: &mut Option<WindowAdapterRc>)

Returns a Window, creating a fresh one if do_create is true.

§drop_in_place: unsafe fn(VRefMut<'_, ItemTreeVTable>) -> Layout

in-place destructor (for VRc)

§dealloc: unsafe fn(_: &ItemTreeVTable, ptr: *mut u8, layout: Layout)

dealloc function (for VRc)

Implementations§

Source§

impl ItemTreeVTable

Source

pub fn new<T: ItemTree>() -> Self

Create a vtable suitable for a given type implementing the trait.

Trait Implementations§

Source§

impl VTableMeta for ItemTreeVTable

Source§

type VTable = ItemTreeVTable

That’s the VTable itself (so most likely Self)
Source§

type Target = ItemTreeTO

That’s the trait object that implements the functions Read more
Source§

impl VTableMetaDropInPlace for ItemTreeVTable

Source§

unsafe fn drop_in_place(vtable: &Self::VTable, ptr: *mut u8) -> Layout

Safety Read more
Source§

unsafe fn dealloc(vtable: &Self::VTable, ptr: *mut u8, layout: Layout)

Safety Read more

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

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>,

Source§

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.