# AdornerLayer

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

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

```rust
struct AdornerLayer
```

Represents a surface for showing adorners.
Adorners are always on top of the adorned element and are positioned to
stay relative to the adorned element.

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

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`adorned_element_property`](#function-adorned_element_property)
- [`is_clip_enabled_property`](#function-is_clip_enabled_property)
- [`adorner_property`](#function-adorner_property)
- [`default_focus_adorner_property`](#function-default_focus_adorner_property)
- [`get_adorned_element`](#function-get_adorned_element)
- [`set_adorned_element`](#function-set_adorned_element)
- [`get_adorner_layer`](#function-get_adorner_layer)
- [`get_is_clip_enabled`](#function-get_is_clip_enabled)
- [`set_is_clip_enabled`](#function-set_is_clip_enabled)
- [`get_adorner`](#function-get_adorner)
- [`set_adorner`](#function-set_adorner)
- [`default_focus_adorner`](#function-default_focus_adorner)
- [`set_default_focus_adorner`](#function-set_default_focus_adorner)

<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/primitives/adorner_layer.rs#L30)

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

### to_ref

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

Returns a strong reference to this object.

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

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

### adorned_element_property

```rust
fn adorned_element_property() -> &'static AttachedProperty<Option<ElementRef<Visual>>>
```

Allows for getting and setting of the adorned element.

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

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

### is_clip_enabled_property

```rust
fn is_clip_enabled_property() -> &'static AttachedProperty<bool>
```

Allows for controlling clipping of the adorner.

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

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

### adorner_property

```rust
fn adorner_property() -> &'static AttachedProperty<Option<Ref<Control>>>
```

Allows for getting and setting of the adorner for control.

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

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

### default_focus_adorner_property

```rust
fn default_focus_adorner_property() -> &'static StyledProperty<Option<Rc<dyn ITemplateOf<Option<Ref<Control>>>>>>
```

Defines the `DefaultFocusAdorner` property.

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

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

### get_adorned_element

```rust
fn get_adorned_element(adorner: &Visual) -> Option<Ref<Visual>>
```



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

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

### set_adorned_element

```rust
fn set_adorned_element(adorner: &Visual, adorned: impl Into<Nullable<Visual>>)
```



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

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

### get_adorner_layer

```rust
fn get_adorner_layer(visual: &Visual) -> Option<Ref<AdornerLayer>>
```

Gets the adorner layer of a visual: the dedicated layer of the
overlay layer the visual is in, otherwise the layer of the nearest
layer manager, otherwise the first one found in its top-level.

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

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

### get_is_clip_enabled

```rust
fn get_is_clip_enabled(adorner: &Visual) -> bool
```



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

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

### set_is_clip_enabled

```rust
fn set_is_clip_enabled(adorner: &Visual, is_clip_enabled: bool)
```



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

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

### get_adorner

```rust
fn get_adorner(visual: &Visual) -> Option<Ref<Control>>
```



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

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

### set_adorner

```rust
fn set_adorner(visual: &Visual, adorner: impl Into<Nullable<Control>>)
```



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

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

### default_focus_adorner

```rust
fn default_focus_adorner(self: &Self) -> Option<Rc<dyn ITemplateOf<Option<Ref<Control>>>>>
```

The default control's focus adorner.

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

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

### set_default_focus_adorner

```rust
fn set_default_focus_adorner(self: &Self, value: Option<Rc<dyn ITemplateOf<Option<Ref<Control>>>>>)
```



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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`CanvasImplExt`](/docs/0.5.0/api/ferroui-controls/trait-canvasimplext/)
- [`ControlImplExt`](/docs/0.5.0/api/ferroui-controls/trait-controlimplext/)
- [`PanelImplExt`](/docs/0.5.0/api/ferroui-controls/trait-panelimplext/)
- `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`
- [`InputElementImplExt`](/docs/0.5.0/api/ferroui-base/input/trait-inputelementimplext/)
- [`InteractiveImplExt`](/docs/0.5.0/api/ferroui-base/interactivity/trait-interactiveimplext/)
- [`LayoutableImplExt`](/docs/0.5.0/api/ferroui-base/layout/trait-layoutableimplext/)
- [`FerroObjectImplExt`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimplext/)
- [`StyledElementImplExt`](/docs/0.5.0/api/ferroui-base/trait-styledelementimplext/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- [`VisualImplExt`](/docs/0.5.0/api/ferroui-base/trait-visualimplext/)
- `ErasedDestructor`
- `IntoEither`
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<AdornerLayer>`](/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/)
- [`StyledElementImpl`](/docs/0.5.0/api/ferroui-base/trait-styledelementimpl/)
- [`VisualImpl`](/docs/0.5.0/api/ferroui-base/trait-visualimpl/)
- [`InteractiveImpl`](/docs/0.5.0/api/ferroui-base/interactivity/trait-interactiveimpl/)
- [`InputElementImpl`](/docs/0.5.0/api/ferroui-base/input/trait-inputelementimpl/)
- [`ControlImpl`](/docs/0.5.0/api/ferroui-controls/trait-controlimpl/)
- [`PanelImpl`](/docs/0.5.0/api/ferroui-controls/trait-panelimpl/)
- [`CanvasImpl`](/docs/0.5.0/api/ferroui-controls/trait-canvasimpl/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`LayoutableImpl`](/docs/0.5.0/api/ferroui-base/layout/trait-layoutableimpl/)

## Availability

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