FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    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.

    View source

    Members

    COMBINED_TREE_TAB

    const COMBINED_TREE_TAB: i32
    

    Addition of the port: the tab of the combined tree, the first one.

    Source

    LOGICAL_TREE_TAB

    const LOGICAL_TREE_TAB: i32
    

    The tab of the logical tree (upstream's first).

    Source

    VISUAL_TREE_TAB

    const VISUAL_TREE_TAB: i32
    

    The tab of the visual tree.

    Source

    EVENTS_TAB

    const EVENTS_TAB: i32
    

    The tab of the routed events.

    Source

    HOT_KEYS_TAB

    const HOT_KEYS_TAB: i32
    

    The tab of the hot keys (hidden; the View menu selects it).

    Source

    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.

    Source

    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.

    Source

    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).

    Source

    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).

    Source

    logical_tree

    fn logical_tree(self: &Self) -> Rc<TreePageViewModel>
    

    Source

    visual_tree

    fn visual_tree(self: &Self) -> Rc<TreePageViewModel>
    

    The page of the visual tree.

    Source

    events

    fn events(self: &Self) -> Rc<EventsPageViewModel>
    

    The events page.

    Source

    hot_keys

    fn hot_keys(self: &Self) -> Rc<HotKeyPageViewModel>
    

    The hot keys page.

    Source

    freeze_popups

    fn freeze_popups(self: &Self) -> bool
    

    Source

    set_freeze_popups

    fn set_freeze_popups(self: &Self, value: bool)
    

    Source

    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.

    Source

    set_is_tree_pane_open

    fn set_is_tree_pane_open(self: &Self, value: bool)
    

    Source

    toggle_tree_pane

    fn toggle_tree_pane(self: &Self)
    

    Shows or hides the left pane of the pages.

    Source

    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.

    Source

    set_is_side_pane_open

    fn set_is_side_pane_open(self: &Self, value: bool)
    

    Source

    toggle_side_pane

    fn toggle_side_pane(self: &Self)
    

    Shows or hides the side pane of the details of a control.

    Source

    should_visualize_margin_padding

    fn should_visualize_margin_padding(self: &Self) -> bool
    

    Source

    set_should_visualize_margin_padding

    fn set_should_visualize_margin_padding(self: &Self, value: bool)
    

    Source

    toggle_visualize_margin_padding

    fn toggle_visualize_margin_padding(self: &Self)
    

    Source

    show_dirty_rects_overlay

    fn show_dirty_rects_overlay(self: &Self) -> bool
    

    Source

    set_show_dirty_rects_overlay

    fn set_show_dirty_rects_overlay(self: &Self, value: bool)
    

    Source

    toggle_dirty_rects_overlay

    fn toggle_dirty_rects_overlay(self: &Self)
    

    Source

    show_fps_overlay

    fn show_fps_overlay(self: &Self) -> bool
    

    Source

    set_show_fps_overlay

    fn set_show_fps_overlay(self: &Self, value: bool)
    

    Source

    toggle_fps_overlay

    fn toggle_fps_overlay(self: &Self)
    

    Source

    show_layout_time_graph_overlay

    fn show_layout_time_graph_overlay(self: &Self) -> bool
    

    Source

    set_show_layout_time_graph_overlay

    fn set_show_layout_time_graph_overlay(self: &Self, value: bool)
    

    Source

    toggle_layout_time_graph_overlay

    fn toggle_layout_time_graph_overlay(self: &Self)
    

    Source

    show_render_time_graph_overlay

    fn show_render_time_graph_overlay(self: &Self) -> bool
    

    Source

    set_show_render_time_graph_overlay

    fn set_show_render_time_graph_overlay(self: &Self, value: bool)
    

    Source

    toggle_render_time_graph_overlay

    fn toggle_render_time_graph_overlay(self: &Self)
    

    Source

    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.

    Source

    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.

    Source

    set_selected_tab

    fn set_selected_tab(self: &Self, value: i32)
    

    Source

    focused_control

    fn focused_control(self: &Self) -> Option<String>
    

    Source

    pointer_over_root

    fn pointer_over_root(self: &Self) -> Option<Rc<dyn IInputRoot>>
    

    The input root the pointer is over.

    Source

    pointer_over_element

    fn pointer_over_element(self: &Self) -> Option<Ref<InputElement>>
    

    The element under the pointer.

    Source

    pointer_over_element_name

    fn pointer_over_element_name(self: &Self) -> Option<String>
    

    The name of the type of the element under the pointer.

    Source

    show_hot_keys

    fn show_hot_keys(self: &Self)
    

    Selects the hot keys tab.

    Source

    select_control

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

    Selects control in the tree page that is the content.

    Source

    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.

    Source

    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.

    Source

    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.

    Source

    startup_screen_index

    fn startup_screen_index(self: &Self) -> Option<i32>
    

    The index of the screen the window opens maximized on.

    Source

    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.

    Source

    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.

    Source

    set_options

    fn set_options(self: &Self, options: &DevToolsOptions)
    

    Applies the options the developer tools were opened with.

    Source

    show_implemented_interfaces

    fn show_implemented_interfaces(self: &Self) -> bool
    

    Source

    toggle_show_implemented_interfaces

    fn toggle_show_implemented_interfaces(self: &Self, _parameter: Option<BoxedValue>)
    

    Source

    show_details_property_type

    fn show_details_property_type(self: &Self) -> bool
    

    Source

    toggle_show_details_property_type

    fn toggle_show_details_property_type(self: &Self, _parameter: Option<BoxedValue>)
    

    Source

    focus_highlighter

    fn focus_highlighter(self: &Self) -> Option<Rc<dyn IBrush>>
    

    The brush that highlights the focused element; None for no highlight.

    Source

    select_focus_highlighter

    fn select_focus_highlighter(self: &Self, parameter: Option<BoxedValue>)
    

    Selects the brush that highlights the focused element (C# parameter as IBrush).

    Source

    pinned_properties

    fn pinned_properties(self: &Self) -> Rc<RefCell<HashSet<String>>>
    

    The pinned properties of the control details, shared by the tree pages.

    Source

    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.

    Source

    registered_pages

    fn registered_pages() -> Vec<DevToolsPage>
    

    The pages registered on this thread, in the order of their registrations.

    Source

    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.

    Source

    Trait implementations

    Availability

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