# AdornerHelper

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/primitives/struct-adornerhelper/

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

```rust
struct AdornerHelper
```

Helpers of the adorner layer: change tracking of the ancestors of an
adorned element and the clip of its adorner.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/adorner_helper.rs#L9)

## Members

- [`subscribe_to_ancestor_property_changes`](#function-subscribe_to_ancestor_property_changes)
- [`calculate_adorner_clip`](#function-calculate_adorner_clip)

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

### subscribe_to_ancestor_property_changes

```rust
fn subscribe_to_ancestor_property_changes(visual: &Ref<Visual>, include_clip: bool, changed: impl Fn() -> () + 'static) -> Subscription
```

Calls `changed` whenever the bounds or the render transform (with
`include_clip` also the clip) of the visual or of one of its ancestors
changes, and when the visual is attached to or detached from a visual
tree.

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

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/adorner_helper.rs#L19)

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

### calculate_adorner_clip

```rust
fn calculate_adorner_clip(adorned_element: &Visual) -> Option<Ref<Geometry>>
```

Calculates the clip of an adorner from the clips of the adorned
element and its ancestors, in the coordinates of the adorned element.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/adorner_helper.rs#L29)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`

## Availability

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