#[repr(C)]pub struct ItemTreeVTable {Show 18 fields
pub visit_children_item: unsafe extern "C" fn(_: Pin<VRef<'_, ItemTreeVTable>>, index: isize, order: TraversalOrder, visitor: VRefMut<'_, ItemVisitorVTable>) -> VisitChildrenResult,
pub get_item_ref: unsafe extern "C" fn(_: Pin<VRef<'_, ItemTreeVTable>>, index: u32) -> Pin<VRef<'_, ItemVTable>>,
pub get_subtree_range: unsafe extern "C" fn(_: Pin<VRef<'_, ItemTreeVTable>>, index: u32) -> IndexRange,
pub get_subtree: unsafe extern "C" fn(_: Pin<VRef<'_, ItemTreeVTable>>, index: u32, subindex: usize, result: &mut VWeak<ItemTreeVTable, Dyn>),
pub get_item_tree: unsafe extern "C" fn(_: Pin<VRef<'_, ItemTreeVTable>>) -> Slice<'_, ItemTreeNode>,
pub parent_node: unsafe extern "C" fn(_: Pin<VRef<'_, ItemTreeVTable>>, result: &mut ItemWeak),
pub embed_component: unsafe extern "C" fn(_: Pin<VRef<'_, ItemTreeVTable>>, parent: &VWeak<ItemTreeVTable>, parent_item_tree_index: u32) -> bool,
pub subtree_index: unsafe extern "C" fn(_: Pin<VRef<'_, ItemTreeVTable>>) -> usize,
pub layout_info: unsafe extern "C" fn(_: Pin<VRef<'_, ItemTreeVTable>>, _: Orientation) -> LayoutInfo,
pub item_geometry: unsafe extern "C" fn(_: Pin<VRef<'_, ItemTreeVTable>>, item_index: u32) -> LogicalRect,
pub accessible_role: unsafe extern "C" fn(_: Pin<VRef<'_, ItemTreeVTable>>, item_index: u32) -> AccessibleRole,
pub accessible_string_property: unsafe extern "C" fn(_: Pin<VRef<'_, ItemTreeVTable>>, item_index: u32, what: AccessibleStringProperty, result: &mut SharedString) -> bool,
pub accessibility_action: unsafe extern "C" fn(_: Pin<VRef<'_, ItemTreeVTable>>, item_index: u32, action: &AccessibilityAction),
pub supported_accessibility_actions: unsafe extern "C" fn(_: Pin<VRef<'_, ItemTreeVTable>>, item_index: u32) -> SupportedAccessibilityAction,
pub item_element_infos: unsafe extern "C" fn(_: Pin<VRef<'_, ItemTreeVTable>>, item_index: u32, result: &mut SharedString) -> bool,
pub window_adapter: unsafe extern "C" fn(_: Pin<VRef<'_, ItemTreeVTable>>, do_create: bool, result: &mut Option<WindowAdapterRc>),
pub drop_in_place: unsafe extern "C" fn(_: VRefMut<'_, ItemTreeVTable>) -> Layout,
pub dealloc: unsafe extern "C" fn(_: &ItemTreeVTable, ptr: *mut u8, layout: Layout),
}
Expand description
A ItemTree is representing an unit that is allocated together
Fields§
§visit_children_item: unsafe extern "C" 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 extern "C" fn(_: Pin<VRef<'_, ItemTreeVTable>>, index: u32) -> Pin<VRef<'_, ItemVTable>>
Return a reference to an item using the given index
get_subtree_range: unsafe extern "C" fn(_: Pin<VRef<'_, ItemTreeVTable>>, index: u32) -> IndexRange
Return the range of indices below the dynamic ItemTreeNode
at index
get_subtree: unsafe extern "C" 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 extern "C" 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 extern "C" 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 extern "C" 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 extern "C" fn(_: Pin<VRef<'_, ItemTreeVTable>>) -> usize
Return the index of the current subtree or usize::MAX if this is not a subtree
layout_info: unsafe extern "C" fn(_: Pin<VRef<'_, ItemTreeVTable>>, _: Orientation) -> LayoutInfo
Returns the layout info for the root of the ItemTree
item_geometry: unsafe extern "C" fn(_: Pin<VRef<'_, ItemTreeVTable>>, item_index: u32) -> LogicalRect
Returns the item’s geometry (relative to its parent item)
accessible_role: unsafe extern "C" fn(_: Pin<VRef<'_, ItemTreeVTable>>, item_index: u32) -> AccessibleRole
Returns the accessible role for a given item
accessible_string_property: unsafe extern "C" 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 extern "C" fn(_: Pin<VRef<'_, ItemTreeVTable>>, item_index: u32, action: &AccessibilityAction)
Executes an accessibility action.
supported_accessibility_actions: unsafe extern "C" fn(_: Pin<VRef<'_, ItemTreeVTable>>, item_index: u32) -> SupportedAccessibilityAction
Returns the supported accessibility actions.
item_element_infos: unsafe extern "C" fn(_: Pin<VRef<'_, ItemTreeVTable>>, item_index: u32, result: &mut SharedString) -> bool
Add the ElementName::id
entries of the given item
window_adapter: unsafe extern "C" 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 extern "C" fn(_: VRefMut<'_, ItemTreeVTable>) -> Layout
in-place destructor (for VRc)
dealloc: unsafe extern "C" fn(_: &ItemTreeVTable, ptr: *mut u8, layout: Layout)
dealloc function (for VRc)