Skip to main content

MainViewModel

Struct MainViewModel 

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

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.

Implementations§

Source§

impl MainViewModel

Source

pub const COMBINED_TREE_TAB: i32 = 0

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

Source

pub const LOGICAL_TREE_TAB: i32 = 1

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

Source

pub const VISUAL_TREE_TAB: i32 = 2

The tab of the visual tree.

Source

pub const EVENTS_TAB: i32 = 3

The tab of the routed events.

Source

pub const HOT_KEYS_TAB: i32 = 4

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

Source

pub const FIRST_EXTENSION_TAB: i32 = 5

Addition of the port: the index of the tab of the first extension page (DevToolsPage), after the five tabs of the tools.

Source

pub 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

pub fn root(&self) -> Ref<FerroObject>

Addition of the port: the object the developer tools inspect (the root the view model was created with).

Source

pub fn combined_tree(&self) -> Rc<TreePageViewModel>

The page of the logical tree. The page of the combined tree (an addition of the port).

Source

pub fn logical_tree(&self) -> Rc<TreePageViewModel>

Source

pub fn visual_tree(&self) -> Rc<TreePageViewModel>

The page of the visual tree.

Source

pub fn events(&self) -> Rc<EventsPageViewModel>

The events page.

Source

pub fn hot_keys(&self) -> Rc<HotKeyPageViewModel>

The hot keys page.

Source

pub fn freeze_popups(&self) -> bool

Source

pub fn set_freeze_popups(&self, value: bool)

Source

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

pub fn set_is_tree_pane_open(&self, value: bool)

Source

pub fn toggle_tree_pane(&self)

Shows or hides the left pane of the pages.

Source

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

pub fn set_is_side_pane_open(&self, value: bool)

Source

pub fn toggle_side_pane(&self)

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

Source

pub fn should_visualize_margin_padding(&self) -> bool

Source

pub fn set_should_visualize_margin_padding(&self, value: bool)

Source

pub fn toggle_visualize_margin_padding(&self)

Source

pub fn show_dirty_rects_overlay(&self) -> bool

Source

pub fn set_show_dirty_rects_overlay(&self, value: bool)

Source

pub fn toggle_dirty_rects_overlay(&self)

Source

pub fn show_fps_overlay(&self) -> bool

Source

pub fn set_show_fps_overlay(&self, value: bool)

Source

pub fn toggle_fps_overlay(&self)

Source

pub fn show_layout_time_graph_overlay(&self) -> bool

Source

pub fn set_show_layout_time_graph_overlay(&self, value: bool)

Source

pub fn toggle_layout_time_graph_overlay(&self)

Source

pub fn show_render_time_graph_overlay(&self) -> bool

Source

pub fn set_show_render_time_graph_overlay(&self, value: bool)

Source

pub fn toggle_render_time_graph_overlay(&self)

Source

pub fn content(&self) -> Option<BoxedValue>

The content of the selected tab: the view model of the page, or the view of an extension page.

Source

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

pub fn set_selected_tab(&self, value: i32)

Source

pub fn focused_control(&self) -> Option<String>

Source

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

The input root the pointer is over.

Source

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

The element under the pointer.

Source

pub fn pointer_over_element_name(&self) -> Option<String>

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

Source

pub fn show_hot_keys(&self)

Selects the hot keys tab.

Source

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

Selects control in the tree page that is the content.

Source

pub fn enable_snapshot_styles(&self, enable: bool)

Freezes (true) or resumes the value frames of the control details of the tree page that is the content.

Source

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

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

pub fn startup_screen_index(&self) -> Option<i32>

The index of the screen the window opens maximized on.

Source

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

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

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

Applies the options the developer tools were opened with.

Source

pub fn show_implemented_interfaces(&self) -> bool

Source

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

Source

pub fn show_details_property_type(&self) -> bool

Source

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

Source

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

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

Source

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

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

Source

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

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

Source

pub 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

pub fn registered_pages() -> Vec<DevToolsPage>

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

Source

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

Source§

impl INotifyPropertyChanged for MainViewModel

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 MainViewModel

Source§

const MARKUP: &'static MarkupType

The markup metadata of the type.
Source§

impl PartialEq for MainViewModel

Reference equality, as the class of the original.

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.