# EmbeddableControlRootAutomationPeer

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/automation/peers/struct-embeddablecontrolrootautomationpeer/

**struct** · [`ferroui-controls`](/docs/0.5.0/api/ferroui-controls/) · v0.5.0

```rust
struct EmbeddableControlRootAutomationPeer
```

An automation peer which represents an [`EmbeddableControlRoot`](/docs/0.5.0/api/ferroui-controls/embedding/struct-embeddablecontrolroot/).

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/peers/embeddable_control_root_automation_peer.rs#L17)

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`owner`](#function-owner)
- [`focus_changed`](#function-focus_changed)
- [`get_focus`](#function-get_focus)
- [`get_peer_from_point`](#function-get_peer_from_point)

<a id="assoc_const-type"></a>

### TYPE

```rust
const TYPE: &'static $crate::TypeInfo
```

The runtime type of this class.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/peers/embeddable_control_root_automation_peer.rs#L28)

<a id="function-to_ref"></a>

### to_ref

```rust
fn to_ref(self: &Self) -> $crate::Ref<EmbeddableControlRootAutomationPeer>
```

Returns a strong reference to this object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/peers/embeddable_control_root_automation_peer.rs#L28)

<a id="function-construct"></a>

### construct

```rust
fn construct(owner: &EmbeddableControlRoot) -> Self
```

Creates the class data; see `ferroui_base::FerroObject::construct`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/peers/embeddable_control_root_automation_peer.rs#L113)

<a id="function-new"></a>

### new

```rust
fn new(owner: &EmbeddableControlRoot) -> Ref<Self>
```

Initializes a new peer of `owner`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/peers/embeddable_control_root_automation_peer.rs#L125)

<a id="function-owner"></a>

### owner

```rust
fn owner(self: &Self) -> Ref<EmbeddableControlRoot>
```

Gets the owning root.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/peers/embeddable_control_root_automation_peer.rs#L130)

<a id="function-focus_changed"></a>

### focus_changed

```rust
fn focus_changed(self: &Self, handler: impl Fn() -> () + 'static) -> Subscription
```

Raised when the focus changes (the root provider contracts).

Dropping the returned guard removes the handler; `Subscription::detach` keeps it for the
life of the peer.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/peers/embeddable_control_root_automation_peer.rs#L138)

<a id="function-get_focus"></a>

### get_focus

```rust
fn get_focus(self: &Self) -> Option<Ref<AutomationPeer>>
```

Gets the peer of the currently focused element (the root provider
contracts).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/peers/embeddable_control_root_automation_peer.rs#L150)

<a id="function-get_peer_from_point"></a>

### get_peer_from_point

```rust
fn get_peer_from_point(self: &Self, p: Point) -> Option<Ref<AutomationPeer>>
```

Gets the peer of the element at the specified point, expressed in
top-level coordinates (the root provider contracts).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/peers/embeddable_control_root_automation_peer.rs#L156)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`AutomationPeerImplExt`](/docs/0.5.0/api/ferroui-controls/automation/peers/trait-automationpeerimplext/)
- [`ControlAutomationPeerImplExt`](/docs/0.5.0/api/ferroui-controls/automation/peers/trait-controlautomationpeerimplext/)
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- [`FerroObjectImplExt`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimplext/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<EmbeddableControlRootAutomationPeer>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`StaticType`](/docs/0.5.0/api/ferroui-base/trait-statictype/)
- [`ObjectType`](/docs/0.5.0/api/ferroui-base/trait-objecttype/)
- [`Subclassable<T>`](/docs/0.5.0/api/ferroui-base/trait-subclassable/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`ControlAutomationPeerImpl`](/docs/0.5.0/api/ferroui-controls/automation/peers/trait-controlautomationpeerimpl/)
- [`AutomationPeerImpl`](/docs/0.5.0/api/ferroui-controls/automation/peers/trait-automationpeerimpl/)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
