MainViewModel
struct · ferroui-diagnostics · v0.5.0
struct MainViewModel
The view model of the developer tools window: the pages (the logical and visual trees, the events and the hot keys), the selected tab, the focused element and the element under the pointer, the overlays of the renderer, the screenshot of the selected control and the options.
Members
COMBINED_TREE_TABLOGICAL_TREE_TABVISUAL_TREE_TABEVENTS_TABHOT_KEYS_TABFIRST_EXTENSION_TABnewrootcombined_treelogical_treevisual_treeeventshot_keysfreeze_popupsset_freeze_popupsis_tree_pane_openset_is_tree_pane_opentoggle_tree_paneis_side_pane_openset_is_side_pane_opentoggle_side_paneshould_visualize_margin_paddingset_should_visualize_margin_paddingtoggle_visualize_margin_paddingshow_dirty_rects_overlayset_show_dirty_rects_overlaytoggle_dirty_rects_overlayshow_fps_overlayset_show_fps_overlaytoggle_fps_overlayshow_layout_time_graph_overlayset_show_layout_time_graph_overlaytoggle_layout_time_graph_overlayshow_render_time_graph_overlayset_show_render_time_graph_overlaytoggle_render_time_graph_overlaycontentselected_tabset_selected_tabfocused_controlpointer_over_rootpointer_over_elementpointer_over_element_nameshow_hot_keysselect_controlenable_snapshot_stylesdisposerequest_tree_navigate_tostartup_screen_indexcan_shotshotset_optionsshow_implemented_interfacestoggle_show_implemented_interfacesshow_details_property_typetoggle_show_details_property_typefocus_highlighterselect_focus_highlighterpinned_propertiesregister_pageregistered_pagesextension_pages
COMBINED_TREE_TAB
const COMBINED_TREE_TAB: i32
Addition of the port: the tab of the combined tree, the first one.
LOGICAL_TREE_TAB
const LOGICAL_TREE_TAB: i32
The tab of the logical tree (upstream's first).
VISUAL_TREE_TAB
const VISUAL_TREE_TAB: i32
The tab of the visual tree.
EVENTS_TAB
const EVENTS_TAB: i32
The tab of the routed events.
HOT_KEYS_TAB
const HOT_KEYS_TAB: i32
The tab of the hot keys (hidden; the View menu selects it).
FIRST_EXTENSION_TAB
const FIRST_EXTENSION_TAB: i32
Addition of the port: the index of the tab of the first extension
page (DevToolsPage), after the five tabs of the tools.
new
fn new(root: Ref<FerroObject>) -> Rc<Self>
C# new MainViewModel(FerroObject root): the developer tools of
root, a top level or the application the tools are attached to.
root
fn root(self: &Self) -> Ref<FerroObject>
Addition of the port: the object the developer tools inspect (the root the view model was created with).
combined_tree
fn combined_tree(self: &Self) -> Rc<TreePageViewModel>
The page of the logical tree. The page of the combined tree (an addition of the port).
logical_tree
fn logical_tree(self: &Self) -> Rc<TreePageViewModel>
visual_tree
fn visual_tree(self: &Self) -> Rc<TreePageViewModel>
The page of the visual tree.
events
fn events(self: &Self) -> Rc<EventsPageViewModel>
The events page.
hot_keys
fn hot_keys(self: &Self) -> Rc<HotKeyPageViewModel>
The hot keys page.
freeze_popups
fn freeze_popups(self: &Self) -> bool
set_freeze_popups
fn set_freeze_popups(self: &Self, value: bool)
is_tree_pane_open
fn is_tree_pane_open(self: &Self) -> bool
Addition of the port: whether the left pane of the pages (the tree of a tree page, the routed events of the events page) is shown; the button at the left of the header of the tools toggles it.
set_is_tree_pane_open
fn set_is_tree_pane_open(self: &Self, value: bool)
toggle_tree_pane
fn toggle_tree_pane(self: &Self)
Shows or hides the left pane of the pages.
is_side_pane_open
fn is_side_pane_open(self: &Self) -> bool
Addition of the port: whether the side pane of the details of a control (the layout, the value frames, the pseudo-classes, at the right of the properties) is shown; a toggle of the command bar of the header shows or hides it.
set_is_side_pane_open
fn set_is_side_pane_open(self: &Self, value: bool)
toggle_side_pane
fn toggle_side_pane(self: &Self)
Shows or hides the side pane of the details of a control.
should_visualize_margin_padding
fn should_visualize_margin_padding(self: &Self) -> bool
set_should_visualize_margin_padding
fn set_should_visualize_margin_padding(self: &Self, value: bool)
toggle_visualize_margin_padding
fn toggle_visualize_margin_padding(self: &Self)
show_dirty_rects_overlay
fn show_dirty_rects_overlay(self: &Self) -> bool
set_show_dirty_rects_overlay
fn set_show_dirty_rects_overlay(self: &Self, value: bool)
toggle_dirty_rects_overlay
fn toggle_dirty_rects_overlay(self: &Self)
show_fps_overlay
fn show_fps_overlay(self: &Self) -> bool
set_show_fps_overlay
fn set_show_fps_overlay(self: &Self, value: bool)
toggle_fps_overlay
fn toggle_fps_overlay(self: &Self)
show_layout_time_graph_overlay
fn show_layout_time_graph_overlay(self: &Self) -> bool
set_show_layout_time_graph_overlay
fn set_show_layout_time_graph_overlay(self: &Self, value: bool)
toggle_layout_time_graph_overlay
fn toggle_layout_time_graph_overlay(self: &Self)
show_render_time_graph_overlay
fn show_render_time_graph_overlay(self: &Self) -> bool
set_show_render_time_graph_overlay
fn set_show_render_time_graph_overlay(self: &Self, value: bool)
toggle_render_time_graph_overlay
fn toggle_render_time_graph_overlay(self: &Self)
content
fn content(self: &Self) -> Option<BoxedValue>
The content of the selected tab: the view model of the page, or the view of an extension page.
selected_tab
fn selected_tab(self: &Self) -> i32
The index of the selected tab: 0 the combined tree (an addition of the
port), 1 the logical tree, 2 the visual tree, 3 the events, 4 the hot
keys (upstream: 0 to 3, from the logical tree); from
FIRST_EXTENSION_TAB on, the extension
pages (an addition of the port). Any other index selects the combined
tree.
set_selected_tab
fn set_selected_tab(self: &Self, value: i32)
focused_control
fn focused_control(self: &Self) -> Option<String>
pointer_over_root
fn pointer_over_root(self: &Self) -> Option<Rc<dyn IInputRoot>>
The input root the pointer is over.
pointer_over_element
fn pointer_over_element(self: &Self) -> Option<Ref<InputElement>>
The element under the pointer.
pointer_over_element_name
fn pointer_over_element_name(self: &Self) -> Option<String>
The name of the type of the element under the pointer.
show_hot_keys
fn show_hot_keys(self: &Self)
Selects the hot keys tab.
select_control
fn select_control(self: &Self, control: &Ref<Control>)
Selects control in the tree page that is the content.
enable_snapshot_styles
fn enable_snapshot_styles(self: &Self, enable: bool)
Freezes (true) or resumes the value frames of the control details
of the tree page that is the content.
dispose
fn dispose(self: &Self)
C# Dispose(): ends the subscriptions, disposes the trees and the
highlight of the focused element, and turns the overlays of the
renderer off.
request_tree_navigate_to
fn request_tree_navigate_to(self: &Self, control: &Ref<Control>, is_visual_tree: bool)
Selects control in the logical or the visual tree page, and that
page, if the tree has a node of it.
startup_screen_index
fn startup_screen_index(self: &Self) -> Option<i32>
The index of the screen the window opens maximized on.
can_shot
fn can_shot(self: &Self, _parameter: Option<BoxedValue>) -> bool
Whether a screenshot of the selected control can be taken: the content is a tree page whose selected node is a visual in a visual tree.
shot
fn shot(self: &Self, _parameter: Option<BoxedValue>)
Takes a screenshot of the control selected in the tree page that is the content, with the screenshot handler of the options.
set_options
fn set_options(self: &Self, options: &DevToolsOptions)
Applies the options the developer tools were opened with.
show_implemented_interfaces
fn show_implemented_interfaces(self: &Self) -> bool
toggle_show_implemented_interfaces
fn toggle_show_implemented_interfaces(self: &Self, _parameter: Option<BoxedValue>)
show_details_property_type
fn show_details_property_type(self: &Self) -> bool
toggle_show_details_property_type
fn toggle_show_details_property_type(self: &Self, _parameter: Option<BoxedValue>)
focus_highlighter
fn focus_highlighter(self: &Self) -> Option<Rc<dyn IBrush>>
The brush that highlights the focused element; None for no
highlight.
select_focus_highlighter
fn select_focus_highlighter(self: &Self, parameter: Option<BoxedValue>)
Selects the brush that highlights the focused element (C#
parameter as IBrush).
pinned_properties
fn pinned_properties(self: &Self) -> Rc<RefCell<HashSet<String>>>
The pinned properties of the control details, shared by the tree pages.
register_page
fn register_page(page: DevToolsPage) -> Rc<dyn IDisposable>
Registers a page for the developer tools windows opened afterwards on this thread. Disposing the returned handle removes the registration.
registered_pages
fn registered_pages() -> Vec<DevToolsPage>
The pages registered on this thread, in the order of their registrations.
extension_pages
fn extension_pages(self: &Self) -> Vec<DevToolsPage>
The extension pages of this window, in the order of their tabs: the
page at index i has the tab FIRST_EXTENSION_TAB + i.
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.