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
impl MainViewModel
Sourcepub const COMBINED_TREE_TAB: i32 = 0
pub const COMBINED_TREE_TAB: i32 = 0
Addition of the port: the tab of the combined tree, the first one.
Sourcepub const LOGICAL_TREE_TAB: i32 = 1
pub const LOGICAL_TREE_TAB: i32 = 1
The tab of the logical tree (upstream’s first).
Sourcepub const VISUAL_TREE_TAB: i32 = 2
pub const VISUAL_TREE_TAB: i32 = 2
The tab of the visual tree.
Sourcepub const EVENTS_TAB: i32 = 3
pub const EVENTS_TAB: i32 = 3
The tab of the routed events.
Sourcepub const HOT_KEYS_TAB: i32 = 4
pub const HOT_KEYS_TAB: i32 = 4
The tab of the hot keys (hidden; the View menu selects it).
Sourcepub const FIRST_EXTENSION_TAB: i32 = 5
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.
Sourcepub fn new(root: Ref<FerroObject>) -> Rc<Self>
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.
Sourcepub fn root(&self) -> Ref<FerroObject>
pub fn root(&self) -> Ref<FerroObject>
Addition of the port: the object the developer tools inspect (the root the view model was created with).
Sourcepub fn combined_tree(&self) -> Rc<TreePageViewModel>
pub fn combined_tree(&self) -> Rc<TreePageViewModel>
The page of the logical tree. The page of the combined tree (an addition of the port).
pub fn logical_tree(&self) -> Rc<TreePageViewModel>
Sourcepub fn visual_tree(&self) -> Rc<TreePageViewModel>
pub fn visual_tree(&self) -> Rc<TreePageViewModel>
The page of the visual tree.
Sourcepub fn events(&self) -> Rc<EventsPageViewModel>
pub fn events(&self) -> Rc<EventsPageViewModel>
The events page.
Sourcepub fn hot_keys(&self) -> Rc<HotKeyPageViewModel>
pub fn hot_keys(&self) -> Rc<HotKeyPageViewModel>
The hot keys page.
pub fn freeze_popups(&self) -> bool
pub fn set_freeze_popups(&self, value: bool)
Sourcepub fn is_tree_pane_open(&self) -> bool
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.
pub fn set_is_tree_pane_open(&self, value: bool)
Sourcepub fn toggle_tree_pane(&self)
pub fn toggle_tree_pane(&self)
Shows or hides the left pane of the pages.
Sourcepub fn is_side_pane_open(&self) -> bool
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.
pub fn set_is_side_pane_open(&self, value: bool)
Sourcepub fn toggle_side_pane(&self)
pub fn toggle_side_pane(&self)
Shows or hides the side pane of the details of a control.
pub fn should_visualize_margin_padding(&self) -> bool
pub fn set_should_visualize_margin_padding(&self, value: bool)
pub fn toggle_visualize_margin_padding(&self)
pub fn show_dirty_rects_overlay(&self) -> bool
pub fn set_show_dirty_rects_overlay(&self, value: bool)
pub fn toggle_dirty_rects_overlay(&self)
pub fn show_fps_overlay(&self) -> bool
pub fn set_show_fps_overlay(&self, value: bool)
pub fn toggle_fps_overlay(&self)
pub fn show_layout_time_graph_overlay(&self) -> bool
pub fn set_show_layout_time_graph_overlay(&self, value: bool)
pub fn toggle_layout_time_graph_overlay(&self)
pub fn show_render_time_graph_overlay(&self) -> bool
pub fn set_show_render_time_graph_overlay(&self, value: bool)
pub fn toggle_render_time_graph_overlay(&self)
Sourcepub fn content(&self) -> Option<BoxedValue>
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.
Sourcepub fn selected_tab(&self) -> i32
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.
pub fn set_selected_tab(&self, value: i32)
pub fn focused_control(&self) -> Option<String>
Sourcepub fn pointer_over_root(&self) -> Option<Rc<dyn IInputRoot>>
pub fn pointer_over_root(&self) -> Option<Rc<dyn IInputRoot>>
The input root the pointer is over.
Sourcepub fn pointer_over_element(&self) -> Option<Ref<InputElement>>
pub fn pointer_over_element(&self) -> Option<Ref<InputElement>>
The element under the pointer.
Sourcepub fn pointer_over_element_name(&self) -> Option<String>
pub fn pointer_over_element_name(&self) -> Option<String>
The name of the type of the element under the pointer.
Sourcepub fn show_hot_keys(&self)
pub fn show_hot_keys(&self)
Selects the hot keys tab.
Sourcepub fn select_control(&self, control: &Ref<Control>)
pub fn select_control(&self, control: &Ref<Control>)
Selects control in the tree page that is the content.
Sourcepub fn enable_snapshot_styles(&self, enable: bool)
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.
Sourcepub fn dispose(&self)
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.
Selects control in the logical or the visual tree page, and that
page, if the tree has a node of it.
Sourcepub fn startup_screen_index(&self) -> Option<i32>
pub fn startup_screen_index(&self) -> Option<i32>
The index of the screen the window opens maximized on.
Sourcepub fn can_shot(&self, _parameter: Option<BoxedValue>) -> bool
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.
Sourcepub fn shot(&self, _parameter: Option<BoxedValue>)
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.
Sourcepub fn set_options(&self, options: &DevToolsOptions)
pub fn set_options(&self, options: &DevToolsOptions)
Applies the options the developer tools were opened with.
pub fn show_implemented_interfaces(&self) -> bool
pub fn toggle_show_implemented_interfaces(&self, _parameter: Option<BoxedValue>)
pub fn show_details_property_type(&self) -> bool
pub fn toggle_show_details_property_type(&self, _parameter: Option<BoxedValue>)
Sourcepub fn focus_highlighter(&self) -> Option<Rc<dyn IBrush>>
pub fn focus_highlighter(&self) -> Option<Rc<dyn IBrush>>
The brush that highlights the focused element; None for no
highlight.
Sourcepub fn select_focus_highlighter(&self, parameter: Option<BoxedValue>)
pub fn select_focus_highlighter(&self, parameter: Option<BoxedValue>)
Selects the brush that highlights the focused element (C#
parameter as IBrush).
Sourcepub fn pinned_properties(&self) -> Rc<RefCell<HashSet<String>>>
pub fn pinned_properties(&self) -> Rc<RefCell<HashSet<String>>>
The pinned properties of the control details, shared by the tree pages.
Sourcepub fn register_page(page: DevToolsPage) -> Rc<dyn IDisposable>
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.
Sourcepub fn registered_pages() -> Vec<DevToolsPage>
pub fn registered_pages() -> Vec<DevToolsPage>
The pages registered on this thread, in the order of their registrations.
Sourcepub fn extension_pages(&self) -> Vec<DevToolsPage>
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
impl INotifyPropertyChanged for MainViewModel
Source§fn property_changed(&self) -> &Event<str>
fn property_changed(&self) -> &Event<str>
Source§fn as_notify_property_changing(&self) -> Option<&dyn INotifyPropertyChanging>
fn as_notify_property_changing(&self) -> Option<&dyn INotifyPropertyChanging>
INotifyPropertyChanging, when it also raises the event of a property
that is about to change; None by default. Read moreSource§impl MarkupTyped for MainViewModel
impl MarkupTyped for MainViewModel
Source§const MARKUP: &'static MarkupType
const MARKUP: &'static MarkupType
Auto Trait Implementations§
impl !Freeze for MainViewModel
impl !RefUnwindSafe for MainViewModel
impl !Send for MainViewModel
impl !Sync for MainViewModel
impl !UnwindSafe for MainViewModel
impl Unpin for MainViewModel
impl UnsafeUnpin for MainViewModel
Blanket Implementations§
Source§impl<T> AnyValue for Twhere
T: PartialEq + 'static,
impl<T> AnyValue for Twhere
T: PartialEq + 'static,
fn any_value_as_any(&self) -> &(dyn Any + 'static)
fn any_value_eq(&self, other: &(dyn AnyValue + 'static)) -> bool
fn any_value_type_name(&self) -> &'static str
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
affects_render, metadata
overrides). Read more