# PopupPositionRequest

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

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

```rust
struct PopupPositionRequest
```

A request to position a popup relative to a target.

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

## Members

- [`target`](#function-target)
- [`placement`](#function-placement)
- [`offset`](#function-offset)
- [`anchor`](#function-anchor)
- [`gravity`](#function-gravity)
- [`constraint_adjustment`](#function-constraint_adjustment)
- [`anchor_rect`](#function-anchor_rect)
- [`placement_callback`](#function-placement_callback)

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

### target

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

The placement target.

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

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

### placement

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

The placement mode.

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

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

### offset

```rust
fn offset(self: &Self) -> Point
```

The offset of the popup from the computed position.

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

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

### anchor

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

The anchor point on the anchor rectangle.

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

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

### gravity

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

The direction in which the popup opens.

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

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

### constraint_adjustment

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

How the position is adjusted when the popup is constrained.

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

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

### anchor_rect

```rust
fn anchor_rect(self: &Self) -> Option<Rect>
```

The anchor rectangle within the target, if one is set.

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

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

### placement_callback

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

The custom placement callback, if one is set.

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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Clone`

## Availability

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