# IPopupHost

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/primitives/trait-ipopuphost/

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

```rust
trait IPopupHost: IDisposable + IFocusScope
```

Represents the top-level control opened by a `Popup`.

A popup host can be either be a popup window created by the operating
system ([`PopupRoot`](/docs/0.5.0/api/ferroui-controls/primitives/struct-popuproot/)) or an [`OverlayPopupHost`](/docs/0.5.0/api/ferroui-controls/primitives/struct-overlaypopuphost/) which is created on a
popup overlay layer.

Both hosts convert to `Rc<dyn IPopupHost>` with `to_popup_host()`
(internal upstream).

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

## Members

- [`width`](#function-width)
- [`set_width`](#function-set_width)
- [`min_width`](#function-min_width)
- [`set_min_width`](#function-set_min_width)
- [`max_width`](#function-max_width)
- [`set_max_width`](#function-set_max_width)
- [`height`](#function-height)
- [`set_height`](#function-set_height)
- [`min_height`](#function-min_height)
- [`set_min_height`](#function-set_min_height)
- [`max_height`](#function-max_height)
- [`set_max_height`](#function-set_max_height)
- [`presenter`](#function-presenter)
- [`topmost`](#function-topmost)
- [`set_topmost`](#function-set_topmost)
- [`is_hit_test_visible`](#function-is_hit_test_visible)
- [`set_is_hit_test_visible`](#function-set_is_hit_test_visible)
- [`transform`](#function-transform)
- [`set_transform`](#function-set_transform)
- [`hosted_visual_tree_root`](#function-hosted_visual_tree_root)
- [`template_applied`](#function-template_applied)
- [`configure_position`](#function-configure_position)
- [`set_child`](#function-set_child)
- [`show`](#function-show)
- [`hide`](#function-hide)
- [`take_focus`](#function-take_focus)
- [`as_control`](#function-as_control)
- [`as_popup_root`](#function-as_popup_root)
- [`as_overlay_popup_host`](#function-as_overlay_popup_host)

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

### width

```rust
fn width(self: &Self) -> f64
```

Gets the fixed width of the popup.

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

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

### set_width

```rust
fn set_width(self: &Self, value: f64)
```

Sets the fixed width of the popup.

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

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

### min_width

```rust
fn min_width(self: &Self) -> f64
```

Gets the minimum width of the popup.

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

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

### set_min_width

```rust
fn set_min_width(self: &Self, value: f64)
```

Sets the minimum width of the popup.

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

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

### max_width

```rust
fn max_width(self: &Self) -> f64
```

Gets the maximum width of the popup.

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

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

### set_max_width

```rust
fn set_max_width(self: &Self, value: f64)
```

Sets the maximum width of the popup.

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

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

### height

```rust
fn height(self: &Self) -> f64
```

Gets the fixed height of the popup.

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

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

### set_height

```rust
fn set_height(self: &Self, value: f64)
```

Sets the fixed height of the popup.

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

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

### min_height

```rust
fn min_height(self: &Self) -> f64
```

Gets the minimum height of the popup.

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

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

### set_min_height

```rust
fn set_min_height(self: &Self, value: f64)
```

Sets the minimum height of the popup.

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

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

### max_height

```rust
fn max_height(self: &Self) -> f64
```

Gets the maximum height of the popup.

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

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

### set_max_height

```rust
fn set_max_height(self: &Self, value: f64)
```

Sets the maximum height of the popup.

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

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

### presenter

```rust
fn presenter(self: &Self) -> Option<Ref<ContentPresenter>>
```

Gets the presenter from the control's template.

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

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

### topmost

```rust
fn topmost(self: &Self) -> bool
```

Gets whether the popup appears on top of all other windows.

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

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

### set_topmost

```rust
fn set_topmost(self: &Self, value: bool)
```

Sets whether the popup appears on top of all other windows.

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

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

### is_hit_test_visible

```rust
fn is_hit_test_visible(self: &Self) -> bool
```

Gets whether the popup takes part in pointer hit testing.

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

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

### set_is_hit_test_visible

```rust
fn set_is_hit_test_visible(self: &Self, value: bool)
```

Sets whether the popup takes part in pointer hit testing.

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

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

### transform

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

Gets a transform that will be applied to the popup.

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

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

### set_transform

```rust
fn set_transform(self: &Self, value: Option<Ref<Transform>>)
```

Sets a transform that will be applied to the popup.

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

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

### hosted_visual_tree_root

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

Gets the root of the visual tree in the case where the popup is
presented using a separate visual tree.

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

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

### template_applied

```rust
fn template_applied(self: &Self, handler: Rc<dyn Fn(&TemplateAppliedEventArgs) -> ()>) -> Rc<dyn IDisposable>
```

Raised when the control's template is applied. Disposing the
returned handle unsubscribes.

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

<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/i_popup_host.rs#L87)

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

### set_child

```rust
fn set_child(self: &Self, control: Option<Ref<Control>>)
```

Sets the control to display in the popup.

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

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

### show

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

Shows the popup.

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

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

### hide

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

Hides the popup.

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

<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/i_popup_host.rs#L99)

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

### as_control

```rust
fn as_control(self: &Self) -> Ref<Control>
```

The control that is the host (the host cast to a control).

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

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

### as_popup_root

```rust
fn as_popup_root(self: &Self) -> Option<Ref<PopupRoot>>
```

The host as a popup root, if it is one.

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

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

### as_overlay_popup_host

```rust
fn as_overlay_popup_host(self: &Self) -> Option<Ref<OverlayPopupHost>>
```

The host as an overlay popup host, if it is one.

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

## Availability

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