#[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>) -> VisitChildrenResultVisit 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) -> IndexRangeReturn 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) -> boolThis 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>>) -> usizeReturn the index of the current subtree or usize::MAX if this is not a subtree
layout_info: unsafe fn(Pin<VRef<'_, ItemTreeVTable>>, Orientation) -> LayoutInfoReturns the layout info for the root of the ItemTree
item_geometry: unsafe fn(_: Pin<VRef<'_, ItemTreeVTable>>, item_index: u32) -> LogicalRectReturns the item’s geometry (relative to its parent item)
accessible_role: unsafe fn(_: Pin<VRef<'_, ItemTreeVTable>>, item_index: u32) -> AccessibleRoleReturns the accessible role for a given item
accessible_string_property: unsafe fn(_: Pin<VRef<'_, ItemTreeVTable>>, item_index: u32, what: AccessibleStringProperty, result: &mut SharedString) -> boolReturns 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) -> SupportedAccessibilityActionReturns the supported accessibility actions.
item_element_infos: unsafe fn(_: Pin<VRef<'_, ItemTreeVTable>>, item_index: u32, result: &mut SharedString) -> boolAdd 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>) -> Layoutin-place destructor (for VRc)
dealloc: unsafe fn(_: &ItemTreeVTable, ptr: *mut u8, layout: Layout)dealloc function (for VRc)