# PopupRoot

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

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

```rust
struct PopupRoot
```

The root window of a [`Popup`](/docs/0.5.0/api/ferroui-controls/primitives/struct-popup/).

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

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`transform_property`](#function-transform_property)
- [`window_manager_add_shadow_hint_property`](#function-window_manager_add_shadow_hint_property)
- [`transform`](#function-transform)
- [`set_transform`](#function-set_transform)
- [`window_manager_add_shadow_hint`](#function-window_manager_add_shadow_hint)
- [`set_window_manager_add_shadow_hint`](#function-set_window_manager_add_shadow_hint)
- [`parent_top_level`](#function-parent_top_level)
- [`dispose`](#function-dispose)
- [`configure_position`](#function-configure_position)
- [`set_child`](#function-set_child)
- [`take_focus`](#function-take_focus)
- [`to_popup_host`](#function-to_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/popup_root.rs#L37)

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

### to_ref

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

Returns a strong reference to this object.

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

<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/popup_root.rs#L209)

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

### window_manager_add_shadow_hint_property

```rust
fn window_manager_add_shadow_hint_property() -> &'static StyledProperty<bool>
```

Defines the `WindowManagerAddShadowHint` property.

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

<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/popup_root.rs#L267)

<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/popup_root.rs#L271)

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

### window_manager_add_shadow_hint

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

A hint to the window manager that a shadow should be added to the
popup.

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

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

### set_window_manager_add_shadow_hint

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



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

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

### parent_top_level

```rust
fn parent_top_level(self: &Self) -> Option<Ref<TopLevel>>
```

The top-level the popup belongs to; `None` once that top-level is
gone (the popup root does not keep its parent alive).

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

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

### dispose

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

Releases the platform implementation and closes the popup root.

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

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

### configure_position

```rust
fn configure_position(self: &Self, 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/popup_root.rs#L321)

<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/popup_root.rs#L328)

<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/popup_root.rs#L333)

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

### to_popup_host

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

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

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

## 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/)
- [`TopLevelImplExt`](/docs/0.5.0/api/ferroui-controls/trait-toplevelimplext/)
- [`WindowBaseImplExt`](/docs/0.5.0/api/ferroui-controls/trait-windowbaseimplext/)
- `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<PopupRoot>`](/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/)
- [`VisualImpl`](/docs/0.5.0/api/ferroui-base/trait-visualimpl/)
- [`TemplatedControlImpl`](/docs/0.5.0/api/ferroui-controls/primitives/trait-templatedcontrolimpl/)
- [`ContentControlImpl`](/docs/0.5.0/api/ferroui-controls/trait-contentcontrolimpl/)
- [`ControlImpl`](/docs/0.5.0/api/ferroui-controls/trait-controlimpl/)
- [`TopLevelImpl`](/docs/0.5.0/api/ferroui-controls/trait-toplevelimpl/)
- [`IFocusScope`](/docs/0.5.0/api/ferroui-base/input/trait-ifocusscope/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`StyledElementImpl`](/docs/0.5.0/api/ferroui-base/trait-styledelementimpl/)
- [`InteractiveImpl`](/docs/0.5.0/api/ferroui-base/interactivity/trait-interactiveimpl/)
- [`InputElementImpl`](/docs/0.5.0/api/ferroui-base/input/trait-inputelementimpl/)
- [`IHostedVisualTreeRoot`](/docs/0.5.0/api/ferroui-base/visual_tree/trait-ihostedvisualtreeroot/)
- [`LayoutableImpl`](/docs/0.5.0/api/ferroui-base/layout/trait-layoutableimpl/)
- [`WindowBaseImpl`](/docs/0.5.0/api/ferroui-controls/trait-windowbaseimpl/)

## Availability

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