# PopupFlyoutBase

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

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

```rust
struct PopupFlyoutBase
```

The base class of flyouts that are shown in a [`Popup`](/docs/0.5.0/api/ferroui-controls/primitives/struct-popup/).

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

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

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`hide_core`](#function-hide_core)
- [`show_at_core`](#function-show_at_core)
- [`show_at_rect_core`](#function-show_at_rect_core)
- [`on_opening`](#function-on_opening)
- [`on_closing`](#function-on_closing)
- [`create_presenter`](#function-create_presenter)
- [`placement_property`](#function-placement_property)
- [`horizontal_offset_property`](#function-horizontal_offset_property)
- [`vertical_offset_property`](#function-vertical_offset_property)
- [`placement_anchor_property`](#function-placement_anchor_property)
- [`placement_gravity_property`](#function-placement_gravity_property)
- [`custom_popup_placement_callback_property`](#function-custom_popup_placement_callback_property)
- [`show_mode_property`](#function-show_mode_property)
- [`overlay_dismiss_event_pass_through_property`](#function-overlay_dismiss_event_pass_through_property)
- [`overlay_input_pass_through_element_property`](#function-overlay_input_pass_through_element_property)
- [`placement_constraint_adjustment_property`](#function-placement_constraint_adjustment_property)
- [`construct`](#function-construct)
- [`popup`](#function-popup)
- [`placement`](#function-placement)
- [`set_placement`](#function-set_placement)
- [`placement_gravity`](#function-placement_gravity)
- [`set_placement_gravity`](#function-set_placement_gravity)
- [`placement_anchor`](#function-placement_anchor)
- [`set_placement_anchor`](#function-set_placement_anchor)
- [`horizontal_offset`](#function-horizontal_offset)
- [`set_horizontal_offset`](#function-set_horizontal_offset)
- [`vertical_offset`](#function-vertical_offset)
- [`set_vertical_offset`](#function-set_vertical_offset)
- [`custom_popup_placement_callback`](#function-custom_popup_placement_callback)
- [`set_custom_popup_placement_callback`](#function-set_custom_popup_placement_callback)
- [`show_mode`](#function-show_mode)
- [`set_show_mode`](#function-set_show_mode)
- [`overlay_dismiss_event_pass_through`](#function-overlay_dismiss_event_pass_through)
- [`set_overlay_dismiss_event_pass_through`](#function-set_overlay_dismiss_event_pass_through)
- [`overlay_input_pass_through_element`](#function-overlay_input_pass_through_element)
- [`set_overlay_input_pass_through_element`](#function-set_overlay_input_pass_through_element)
- [`placement_constraint_adjustment`](#function-placement_constraint_adjustment)
- [`set_placement_constraint_adjustment`](#function-set_placement_constraint_adjustment)
- [`to_popup_host_provider`](#function-to_popup_host_provider)
- [`closing`](#function-closing)
- [`opening`](#function-opening)
- [`show_at_with`](#function-show_at_with)

<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/popup_flyout_base.rs#L114)

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

### to_ref

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

Returns a strong reference to this object.

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

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

### hide_core

```rust
fn hide_core(self: &Self, can_cancel: bool) -> bool
```

Hides the flyout; `can_cancel` tells whether the `Closing` event
is raised and may cancel. Returns true if the action was handled.

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

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

### show_at_core

```rust
fn show_at_core(self: &Self, placement_target: &Control, show_at_pointer: bool) -> bool
```

Shows the flyout at the given control, at the pointer location
when `show_at_pointer`. Returns true if the action was handled.

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

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

### show_at_rect_core

```rust
fn show_at_rect_core(self: &Self, placement_target: &Control, placement_rect: Rect) -> bool
```

Shows the flyout below an explicit rectangle in the target's
coordinates. The popup positioner applies RTL and screen constraints.
This request does not modify the flyout's placement properties.

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

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

### on_opening

```rust
fn on_opening(self: &Self, args: &CancelEventArgs)
```

Raises the `Opening` event.

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

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

### on_closing

```rust
fn on_closing(self: &Self, args: &CancelEventArgs)
```

Raises the `Closing` event.

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

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

### create_presenter

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

Used to create the content the flyout displays.

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

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

### placement_property

```rust
fn placement_property() -> &'static StyledProperty<PlacementMode>
```

Defines the `Placement` property.

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

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

### horizontal_offset_property

```rust
fn horizontal_offset_property() -> &'static StyledProperty<f64>
```

Defines the `HorizontalOffset` property.

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

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

### vertical_offset_property

```rust
fn vertical_offset_property() -> &'static StyledProperty<f64>
```

Defines the `VerticalOffset` property.

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

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

### placement_anchor_property

```rust
fn placement_anchor_property() -> &'static StyledProperty<PopupAnchor>
```

Defines the `PlacementAnchor` property.

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

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

### placement_gravity_property

```rust
fn placement_gravity_property() -> &'static StyledProperty<PopupGravity>
```

Defines the `PlacementGravity` property.

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

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

### custom_popup_placement_callback_property

```rust
fn custom_popup_placement_callback_property() -> &'static StyledProperty<Option<CustomPopupPlacementCallbackValue>>
```

Defines the `CustomPopupPlacementCallback` property.

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

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

### show_mode_property

```rust
fn show_mode_property() -> &'static StyledProperty<FlyoutShowMode>
```

Defines the `ShowMode` property.

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

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

### overlay_dismiss_event_pass_through_property

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

Defines the `OverlayDismissEventPassThrough` property.

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

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

### overlay_input_pass_through_element_property

```rust
fn overlay_input_pass_through_element_property() -> &'static StyledProperty<Option<ferroui_base::ElementRef<InputElement>>>
```

Defines the `OverlayInputPassThroughElement` property.

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

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

### placement_constraint_adjustment_property

```rust
fn placement_constraint_adjustment_property() -> &'static StyledProperty<PopupPositionerConstraintAdjustment>
```

Defines the `PlacementConstraintAdjustment` property.

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

<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/popup_flyout_base.rs#L496)

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

### popup

```rust
fn popup(self: &Self) -> Ref<Popup>
```

The popup the flyout is shown in, created on first use. For derived
classes.

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

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

### placement

```rust
fn placement(self: &Self) -> PlacementMode
```

The desired placement of the flyout in relation to its target.

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

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

### set_placement

```rust
fn set_placement(self: &Self, value: PlacementMode)
```



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

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

### placement_gravity

```rust
fn placement_gravity(self: &Self) -> PopupGravity
```

Defines in what direction the flyout should open when the placement
is `PlacementMode::AnchorAndGravity`.

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

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

### set_placement_gravity

```rust
fn set_placement_gravity(self: &Self, value: PopupGravity)
```



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

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

### placement_anchor

```rust
fn placement_anchor(self: &Self) -> PopupAnchor
```

The anchor point on the placement rect when the placement is
`PlacementMode::AnchorAndGravity`.

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

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

### set_placement_anchor

```rust
fn set_placement_anchor(self: &Self, value: PopupAnchor)
```



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

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

### horizontal_offset

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

The horizontal offset of the flyout in relation to its target.

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

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

### set_horizontal_offset

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



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

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

### vertical_offset

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

The vertical offset of the flyout in relation to its target.

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

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

### set_vertical_offset

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



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

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

### custom_popup_placement_callback

```rust
fn custom_popup_placement_callback(self: &Self) -> Option<CustomPopupPlacementCallback>
```

The callback that positions the flyout when the placement is
`PlacementMode::Custom`.

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

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

### set_custom_popup_placement_callback

```rust
fn set_custom_popup_placement_callback(self: &Self, value: Option<CustomPopupPlacementCallback>)
```



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

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

### show_mode

```rust
fn show_mode(self: &Self) -> FlyoutShowMode
```

The desired show mode.

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

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

### set_show_mode

```rust
fn set_show_mode(self: &Self, value: FlyoutShowMode)
```



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

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

### overlay_dismiss_event_pass_through

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

Whether the event that closes the flyout is passed through to the
parent window.

Clicks outside the popup cause the popup to close. When this is
false, these clicks will be handled by the popup and not be
registered by the parent window. When true, the events will be passed
through to the parent window.

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

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

### set_overlay_dismiss_event_pass_through

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



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

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

### overlay_input_pass_through_element

```rust
fn overlay_input_pass_through_element(self: &Self) -> Option<Ref<InputElement>>
```

An element that should receive pointer input events even when
underneath the flyout's overlay.

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

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

### set_overlay_input_pass_through_element

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



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

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

### placement_constraint_adjustment

```rust
fn placement_constraint_adjustment(self: &Self) -> PopupPositionerConstraintAdjustment
```

Describes how the flyout position will be adjusted if the unadjusted
position would result in the flyout being partly constrained.

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

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

### set_placement_constraint_adjustment

```rust
fn set_placement_constraint_adjustment(self: &Self, value: PopupPositionerConstraintAdjustment)
```



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

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

### to_popup_host_provider

```rust
fn to_popup_host_provider(self: &Self) -> Rc<dyn IPopupHostProvider>
```

The flyout as a popup host provider (the diagnostics contract it
implements in the reference).

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

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

### closing

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

Raised before the flyout closes; the close can be cancelled. 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/popup_flyout_base.rs#L649)

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

### opening

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

Raised before the flyout opens; the opening can be cancelled. 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/popup_flyout_base.rs#L655)

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

### show_at_with

```rust
fn show_at_with(self: &Self, placement_target: &Control, show_at_pointer: bool)
```

Shows the flyout for the given control at the current pointer
location when `show_at_pointer`, as in a context flyout.

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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`FlyoutBaseImplExt`](/docs/0.5.0/api/ferroui-controls/primitives/trait-flyoutbaseimplext/)
- [`PopupFlyoutBaseImplExt`](/docs/0.5.0/api/ferroui-controls/primitives/trait-popupflyoutbaseimplext/)
- `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<PopupFlyoutBase>`](/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/)
- [`PopupFlyoutBaseImpl`](/docs/0.5.0/api/ferroui-controls/primitives/trait-popupflyoutbaseimpl/)

## Availability

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