FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    TreePageViewModel

    struct · ferroui-diagnostics · v0.5.0

    struct TreePageViewModel
    

    The page of a tree of the developer tools (the logical or the visual tree): the root nodes, the selected node and the details of its control, and the commands of the context menu of the tree.

    View source

    Members

    new

    fn new(main_view: &Rc<MainViewModel>, nodes: Vec<Rc<TreeNode>>, pinned_properties: Rc<RefCell<HashSet<String>>>) -> Rc<Self>
    

    TreePageViewModel(MainViewModel mainView, TreeNode[] nodes, ISet<string> pinnedProperties).

    The main view model owns its pages, so a page refers to it weakly. pinned_properties is the set of the pinned properties that the pages share.

    Source

    with_weak_main_view

    fn with_weak_main_view(main_view: Weak<MainViewModel>, nodes: Vec<Rc<TreeNode>>, pinned_properties: Rc<RefCell<HashSet<String>>>) -> Rc<Self>
    

    The constructor with the main view model given by a weak reference, which may be empty: a page without a main view shows the implemented interfaces and takes no screenshots.

    Source

    clipboard_copy_requested

    fn clipboard_copy_requested(self: &Self, handler: impl Fn(&str) -> () + 'static) -> Rc<dyn IDisposable>
    

    ClipboardCopyRequested: raised with a selector to copy to the clipboard. Disposing the returned handle removes the handler.

    Source

    main_view

    fn main_view(self: &Self) -> Option<Rc<MainViewModel>>
    

    The main view model; None once it is gone.

    Source

    properties_filter

    fn properties_filter(self: &Self) -> Rc<FilterViewModel>
    

    Source

    setters_filter

    fn setters_filter(self: &Self) -> Rc<FilterViewModel>
    

    Source

    nodes

    fn nodes(self: &Self) -> FerroList<Rc<TreeNode>>
    

    The root nodes of the tree.

    Source

    set_nodes

    fn set_nodes(self: &Self, value: Vec<Rc<TreeNode>>)
    

    protected set of Nodes.

    Source

    nodes_source

    fn nodes_source(self: &Self) -> Rc<HierarchicalTreeDataGridSource<TreeNode>>
    

    The source of the TreeDataGrid of the page: the rows of the nodes.

    Source

    nodes_source_ref

    fn nodes_source_ref(self: &Self) -> TreeDataGridSourceRef
    

    The source of the TreeDataGrid of the page, as the grid takes it.

    Source

    index_path_of

    fn index_path_of(self: &Self, node: &Rc<TreeNode>) -> Option<IndexPath>
    

    The index path of the row of a node in the source: the index of each of its ancestors among the children of its parent, from the root node down to the node; None when the node is not in the trees of the page.

    Source

    selected_row_index

    fn selected_row_index(self: &Self) -> i32
    

    The index of the row of the selected node among the rows the TreeDataGrid shows; -1 when no node is selected or its row is not shown.

    Source

    selected_node

    fn selected_node(self: &Self) -> Option<Rc<TreeNode>>
    

    Source

    set_selected_node

    fn set_selected_node(self: &Self, value: Option<Rc<TreeNode>>)
    

    Selects a node, and shows the details of its object.

    Source

    details

    fn details(self: &Self) -> Option<Rc<ControlDetailsViewModel>>
    

    The details of the object of the selected node.

    Source

    dispose

    fn dispose(self: &Self)
    

    Dispose(): disposes the nodes and the details.

    Source

    find_node

    fn find_node(self: &Self, control: &Ref<Control>) -> Option<Rc<TreeNode>>
    

    The node of control, searched in the trees of the root nodes.

    Source

    select_control

    fn select_control(self: &Self, control: &Ref<Control>)
    

    Selects the node of control, or of its nearest visual ancestor that has one, and expands its ancestors.

    Source

    copy_selector

    fn copy_selector(self: &Self)
    

    Requests the copy of the selector of the selected control.

    Source

    copy_selector_from_template_parent

    fn copy_selector_from_template_parent(self: &Self)
    

    Requests the copy of the selector of the selected control from the outermost templated parent, through the templates.

    Source

    expand_recursively

    fn expand_recursively(self: &Self)
    

    Expands the selected node, its ancestors and all its descendants.

    Source

    collapse_children

    fn collapse_children(self: &Self)
    

    Collapses the selected node and all its descendants.

    Source

    capture_node_screenshot

    fn capture_node_screenshot(self: &Self)
    

    Takes a screenshot of the selected control.

    Source

    bring_into_view

    fn bring_into_view(self: &Self)
    

    Brings the selected control into view.

    Source

    focus

    fn focus(self: &Self)
    

    Focuses the selected control.

    Source

    update_properties_view

    fn update_properties_view(self: &Self)
    

    Updates the properties of the details with the current setting of the main view (shown with the implemented interfaces when there is no main view).

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.