# FlyoutBase

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

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

```rust
struct FlyoutBase
```

The base class of flyouts.

This class is abstract: only its subclasses can be created.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/flyouts/flyout_base.rs#L16)

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`show_at`](#function-show_at)
- [`hide`](#function-hide)
- [`on_opened`](#function-on_opened)
- [`on_closed`](#function-on_closed)
- [`is_open_property`](#function-is_open_property)
- [`target_property`](#function-target_property)
- [`attached_flyout_property`](#function-attached_flyout_property)
- [`construct`](#function-construct)
- [`opened`](#function-opened)
- [`closed`](#function-closed)
- [`is_open`](#function-is_open)
- [`set_is_open`](#function-set_is_open)
- [`target`](#function-target)
- [`set_target`](#function-set_target)
- [`get_attached_flyout`](#function-get_attached_flyout)
- [`set_attached_flyout`](#function-set_attached_flyout)
- [`show_attached_flyout`](#function-show_attached_flyout)

<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/flyouts/flyout_base.rs#L24)

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

### to_ref

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

Returns a strong reference to this object.

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

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

### show_at

```rust
fn show_at(self: &Self, placement_target: &Control)
```

Shows the flyout at the given control.

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

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

### hide

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

Hides the flyout.

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

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

### on_opened

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

Raises the `Opened` event.

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

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

### on_closed

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

Raises the `Closed` event.

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

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

### is_open_property

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

Defines the `IsOpen` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/flyouts/flyout_base.rs#L61)

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

### target_property

```rust
fn target_property() -> &'static DirectProperty<FlyoutBase, Option<ElementRef<Control>>>
```

Defines the `Target` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/flyouts/flyout_base.rs#L61)

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

### attached_flyout_property

```rust
fn attached_flyout_property() -> &'static AttachedProperty<Option<Ref<FlyoutBase>>>
```

Defines the `AttachedFlyout` attached property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/flyouts/flyout_base.rs#L61)

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

### construct

```rust
fn construct() -> Self
```

Creates the class data; see `ferroui_base::FerroObject::construct`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/flyouts/flyout_base.rs#L87)

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

### opened

```rust
fn opened(self: &Self, handler: impl Fn() -> () + 'static) -> Subscription
```

Raised when the flyout is opened. Dropping the returned guard removes the handler;
`Subscription::detach` keeps it for the life of the flyout.

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

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

### closed

```rust
fn closed(self: &Self, handler: impl Fn() -> () + 'static) -> Subscription
```

Raised when the flyout is closed. Dropping the returned guard removes the handler;
`Subscription::detach` keeps it for the life of the flyout.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/flyouts/flyout_base.rs#L114)

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

### is_open

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

Whether this flyout is currently open.

Setting this property to `true` will show the flyout at the last
known placement target. If no target has been set via `show_at`,
setting this to `true` will have no effect.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/flyouts/flyout_base.rs#L123)

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

### set_is_open

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/flyouts/flyout_base.rs#L127)

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

### target

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

The target used for showing the flyout.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/flyouts/flyout_base.rs#L132)

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

### set_target

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

Sets the target used for showing the flyout. For derived classes.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/flyouts/flyout_base.rs#L137)

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

### get_attached_flyout

```rust
fn get_attached_flyout(element: &Control) -> Option<Ref<FlyoutBase>>
```

Gets the flyout attached to `element`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/flyouts/flyout_base.rs#L142)

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

### set_attached_flyout

```rust
fn set_attached_flyout(element: &Control, value: impl Into<Nullable<FlyoutBase>>)
```

Attaches a flyout to `element`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/flyouts/flyout_base.rs#L147)

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

### show_attached_flyout

```rust
fn show_attached_flyout(flyout_owner: &Control)
```

Shows the flyout attached to `flyout_owner`, if any, at it.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/flyouts/flyout_base.rs#L152)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`FlyoutBaseImplExt`](/docs/0.5.0/api/ferroui-controls/primitives/trait-flyoutbaseimplext/)
- `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`
- [`FerroObjectImplExt`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimplext/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<FlyoutBase>`](/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/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`FlyoutBaseImpl`](/docs/0.5.0/api/ferroui-controls/primitives/trait-flyoutbaseimpl/)

## Availability

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