Skip to main content

TreePageViewModel

Struct TreePageViewModel 

Source
pub struct TreePageViewModel { /* private fields */ }
Expand description

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.

Implementations§

Source§

impl TreePageViewModel

Source

pub 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

pub 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

pub fn clipboard_copy_requested( &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

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

The main view model; None once it is gone.

Source

pub fn properties_filter(&self) -> Rc<FilterViewModel>

Source

pub fn setters_filter(&self) -> Rc<FilterViewModel>

Source

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

The root nodes of the tree.

Source

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

protected set of Nodes.

Source

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

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

Source

pub fn nodes_source_ref(&self) -> TreeDataGridSourceRef

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

Source

pub fn index_path_of(&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

pub fn selected_row_index(&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

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

Source

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

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

Source

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

The details of the object of the selected node.

Source

pub fn dispose(&self)

Dispose(): disposes the nodes and the details.

Source

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

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

Source

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

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

Source

pub fn copy_selector(&self)

Requests the copy of the selector of the selected control.

Source

pub fn copy_selector_from_template_parent(&self)

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

Source

pub fn expand_recursively(&self)

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

Source

pub fn collapse_children(&self)

Collapses the selected node and all its descendants.

Source

pub fn capture_node_screenshot(&self)

Takes a screenshot of the selected control.

Source

pub fn bring_into_view(&self)

Brings the selected control into view.

Source

pub fn focus(&self)

Focuses the selected control.

Source

pub fn update_properties_view(&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).

Trait Implementations§

Source§

impl INotifyPropertyChanged for TreePageViewModel

Source§

fn property_changed(&self) -> &Event<str>

The event raised when a property value changes.
Source§

fn as_notify_property_changing(&self) -> Option<&dyn INotifyPropertyChanging>

The object as INotifyPropertyChanging, when it also raises the event of a property that is about to change; None by default. Read more
Source§

impl MarkupTyped for TreePageViewModel

Source§

const MARKUP: &'static MarkupType

The markup metadata of the type.
Source§

impl PartialEq for TreePageViewModel

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. 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> AnyValue for T
where T: PartialEq + 'static,

Source§

fn any_value_as_any(&self) -> &(dyn Any + 'static)

Source§

fn any_value_eq(&self, other: &(dyn AnyValue + 'static)) -> bool

Source§

fn any_value_type_name(&self) -> &'static str

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> ClassDefaults for T
where T: ?Sized,

Source§

fn static_constructor()

The static constructor of a type: work done once per thread, after the properties of the type are registered and before its first instance exists (class handlers, affects_render, metadata overrides). 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> TreeModel for T
where T: PartialEq + 'static,

Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.