EventsPageViewModel
struct · ferroui-diagnostics · v0.5.0
struct EventsPageViewModel
The view model of the events page: the tree of the registered routed events grouped by the type that owns them, whose check boxes choose the events to record, and the recorded events.
Members
newnamenodesrecorded_eventsselected_eventset_selected_eventselected_nodeset_selected_nodenodes_sourcenodes_source_refvisible_nodesindex_path_ofselected_row_indexevents_filtercleardisable_allenable_defaultrequest_tree_navigate_toselect_event_by_typemain_view
new
fn new(main_view_model: Weak<MainViewModel>) -> Rc<Self>
C# new EventsPageViewModel(MainViewModel mainViewModel): the tree of
the routed events registered on this thread, with the default events
enabled.
The main view model is held weakly: it holds the page.
name
fn name(self: &Self) -> String
The title of the page.
nodes
fn nodes(self: &Self) -> FerroList<Rc<EventTreeNodeBase>>
The nodes of the types that own routed events, ordered by the names of the types.
recorded_events
fn recorded_events(self: &Self) -> FerroList<Rc<FiredEvent>>
The recorded events, the oldest first.
selected_event
fn selected_event(self: &Self) -> Option<Rc<FiredEvent>>
set_selected_event
fn set_selected_event(self: &Self, value: Option<Rc<FiredEvent>>)
selected_node
fn selected_node(self: &Self) -> Option<Rc<EventTreeNodeBase>>
set_selected_node
fn set_selected_node(self: &Self, value: Option<Rc<EventTreeNodeBase>>)
nodes_source
fn nodes_source(self: &Self) -> Rc<HierarchicalTreeDataGridSource<EventTreeNodeBase>>
The source of the TreeDataGrid of the page: the rows of the visible nodes.
nodes_source_ref
fn nodes_source_ref(self: &Self) -> TreeDataGridSourceRef
The source of the TreeDataGrid of the page, as the grid takes it.
visible_nodes
fn visible_nodes(self: &Self) -> Rc<FerroList<Rc<EventTreeNodeBase>>>
The visible nodes of the owners of events: the root rows of the TreeDataGrid of the page.
index_path_of
fn index_path_of(self: &Self, node: &Rc<EventTreeNodeBase>) -> Option<IndexPath>
The index path of the row of a node in the source; None when the node is not visible.
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.
events_filter
fn events_filter(self: &Self) -> Rc<FilterViewModel>
The filter of the tree of the events.
clear
fn clear(self: &Self)
Removes the recorded events.
disable_all
fn disable_all(self: &Self)
Stops recording every event.
enable_default
fn enable_default(self: &Self)
Records the default events and no other.
request_tree_navigate_to
fn request_tree_navigate_to(self: &Self, nav_target: &EventChainLink)
Shows the element of a link of the chain of an event in the visual tree page.
select_event_by_type
fn select_event_by_type(self: &Self, evt: RoutedEvent)
Selects the node of evt in the tree, if it is visible.
main_view
fn main_view(self: &Self) -> Option<Rc<MainViewModel>>
The main view model the page belongs to.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyAnyValueClassDefaultsErasedDestructorIntoEitherTreeModelPartialEqINotifyPropertyChangedMarkupTyped
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.