# OverlayPopupHost

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

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

```rust
struct OverlayPopupHost
```

The popup host that shows a popup inside its top-level, on the popup
overlay layer.

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

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`transform_property`](#function-transform_property)
- [`new`](#function-new)
- [`tests_keyboard_navigation_handler`](#function-tests_keyboard_navigation_handler)
- [`set_child`](#function-set_child)
- [`hosted_visual_tree_root`](#function-hosted_visual_tree_root)
- [`transform`](#function-transform)
- [`set_transform`](#function-set_transform)
- [`dispose`](#function-dispose)
- [`show`](#function-show)
- [`hide`](#function-hide)
- [`take_focus`](#function-take_focus)
- [`configure_position`](#function-configure_position)
- [`to_popup_host`](#function-to_popup_host)
- [`create_popup_host`](#function-create_popup_host)

<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/overlay_popup_host.rs#L39)

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

### to_ref

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

Returns a strong reference to this object.

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

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

### transform_property

```rust
fn transform_property() -> &'static StyledProperty<Option<Ref<Transform>>>
```

Defines the `Transform` property.

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

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

### new

```rust
fn new(overlay_layer: &Ref<PopupOverlayLayer>) -> Ref<Self>
```

Creates a host that is shown on `overlay_layer` (internal upstream).

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

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

### tests_keyboard_navigation_handler

```rust
fn tests_keyboard_navigation_handler(self: &Self) -> Option<Rc<dyn IKeyboardNavigationHandler>>
```

The keyboard navigation handler of the host (for unit tests).

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

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

### set_child

```rust
fn set_child(self: &Self, control: impl Into<Nullable<Control>>)
```

Sets the control to display in the popup.

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

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

### hosted_visual_tree_root

```rust
fn hosted_visual_tree_root(self: &Self) -> Option<Ref<Visual>>
```

The root of the separate visual tree of the popup: none, an overlay
popup lives in the visual tree of its top-level.

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

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

### transform

```rust
fn transform(self: &Self) -> Option<Ref<Transform>>
```

A transform that will be applied to the popup.

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

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

### set_transform

```rust
fn set_transform(self: &Self, value: impl Into<Nullable<Transform>>)
```



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

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

### dispose

```rust
fn dispose(self: &Self)
```

Hides the popup.

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

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

### show

```rust
fn show(self: &Self)
```

Shows the popup: adds the host to its overlay layer.

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

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

### hide

```rust
fn hide(self: &Self)
```

Hides the popup: removes the host from its overlay layer.

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

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

### take_focus

```rust
fn take_focus(self: &Self)
```

Takes focus from any currently focused native control.

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

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

### configure_position

```rust
fn configure_position(self: &Self, position_request: PopupPositionRequest)
```

Configures the position of the popup according to a target control
and a set of placement parameters.

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

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

### to_popup_host

```rust
fn to_popup_host(self: &Self) -> Rc<dyn IPopupHost>
```

The host as a popup host (the popup host contract it implements
upstream).

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

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

### create_popup_host

```rust
fn create_popup_host(target: &Visual, dependency_resolver: Option<Rc<dyn IFerroDependencyResolver>>, should_use_overlay_layer: bool) -> Rc<dyn IPopupHost>
```

Creates the popup host for a popup placed relative to `target`: a
native popup root when the platform of the top-level of `target`
creates popups and `should_use_overlay_layer` is false, otherwise an
overlay popup host on the popup overlay layer of `target` (internal
upstream).
## Panics

Panics when neither can be created.

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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`TemplatedControlImplExt`](/docs/0.5.0/api/ferroui-controls/primitives/trait-templatedcontrolimplext/)
- [`ContentControlImplExt`](/docs/0.5.0/api/ferroui-controls/trait-contentcontrolimplext/)
- [`ControlImplExt`](/docs/0.5.0/api/ferroui-controls/trait-controlimplext/)
- `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<OverlayPopupHost>`](/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/)
- [`ControlImpl`](/docs/0.5.0/api/ferroui-controls/trait-controlimpl/)
- [`TemplatedControlImpl`](/docs/0.5.0/api/ferroui-controls/primitives/trait-templatedcontrolimpl/)
- [`ContentControlImpl`](/docs/0.5.0/api/ferroui-controls/trait-contentcontrolimpl/)
- [`IFocusScope`](/docs/0.5.0/api/ferroui-base/input/trait-ifocusscope/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`InteractiveImpl`](/docs/0.5.0/api/ferroui-base/interactivity/trait-interactiveimpl/)
- [`InputElementImpl`](/docs/0.5.0/api/ferroui-base/input/trait-inputelementimpl/)
- [`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/).
