Inspector
struct · ferroui-inspect · v0.5.0
struct Inspector
Members
newsharedregister_rootnode_idresolvewindowsvisual_objectis_overlaychildrenpeerpropertypropertiesset_propertyclear_propertystylesparse_selectorbox_modelscreenshothighlightexecute
new
fn new() -> Self
shared
fn shared() -> Rc<RefCell<Inspector>>
The inspector of this UI thread, shared by every server that runs on it.
register_root
fn register_root(self: &mut Self, root: &TopLevel)
Add a top level for a custom lifetime or tests. Desktop windows are discovered automatically.
node_id
fn node_id(self: &mut Self, object: &FerroObject) -> NodeId
resolve
fn resolve(self: &Self, id: NodeId) -> Result<Ref<FerroObject>, String>
windows
fn windows(self: &mut Self) -> Vec<Ref<TopLevel>>
The open top levels: the registered roots and the windows of the desktop lifetime.
visual_object
fn visual_object(object: &Ref<FerroObject>) -> Ref<FerroObject>
The control that owns an automation peer, or the object itself.
is_overlay
fn is_overlay(self: &Self, object: &FerroObject) -> bool
Whether the object is a highlight adorner of this inspector, which trees leave out.
children
fn children(self: &Self, object: &Ref<FerroObject>, tree: TreeKind) -> Vec<Ref<FerroObject>>
The children of the object in the tree, without highlight adorners.
peer
fn peer(object: &Ref<FerroObject>) -> Result<Ref<AutomationPeer>, String>
property
fn property(object: &FerroObject, name: &str) -> Result<&'static FerroProperty, String>
A registered or attached (Owner.Name) property of the object.
properties
fn properties(object: &FerroObject) -> Vec<PropertyInfo>
The registered and attached properties of the object, sorted by name.
set_property
fn set_property(object: &FerroObject, name: &str, value: Option<BoxedValue>) -> Result<&'static FerroProperty, String>
Sets a local value: None sets null, text is converted with the framework's converters.
Read-only properties, values that do not convert and values that fail validation are
refused before the object is changed.
clear_property
fn clear_property(object: &FerroObject, name: &str) -> Result<&'static FerroProperty, String>
styles
fn styles(object: &FerroObject) -> Vec<StyleFrame>
The frames of the value store that apply to the object, active or not.
parse_selector
fn parse_selector(self: &Self, text: &str) -> Result<Option<Selector>, String>
Parses a selector of the framework's syntax. Type names resolve among the known types and the types of the live nodes. Forms that the selector constructors or the matcher do not accept outside a style (nesting, a dangling combinator) are refused here.
box_model
fn box_model(visual: &Ref<Visual>, relative_to: &Ref<Visual>) -> Result<BoxModel, String>
The content, padding, border and margin boxes of the visual, in the coordinates of
relative_to.
screenshot
fn screenshot(visual: &Ref<Visual>, scale: f64) -> Result<Png, String>
A PNG of the visual at the scale (0.1 to 4), at most 16 megapixels.
highlight
fn highlight(self: &mut Self, visual: &Ref<Visual>) -> Result<Highlight, String>
Outlines the visual on its adorner layer until the returned guard is dropped. The adorner is left out of the trees of every client of this inspector.
execute
fn execute(self: &mut Self, name: &str, args: &Value, permissions: Permissions) -> InspectResult
Execute a single UI-thread operation of the MCP tools. wait_for is a nonblocking
condition probe; the transport polls it until matched or its deadline, leaving the UI
free to render. Input tools are run by execute instead, which does not hold the shared
inspector while the application handles the input.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyClassDefaultsErasedDestructorIntoEitherDefault
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.