# WrapPanel

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

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

```rust
struct WrapPanel
```

Positions child elements in sequential position from left to right,
breaking content to the next line at the edge of the containing box.
Subsequent ordering happens sequentially from top to bottom or from right
to left, depending on the value of the `Orientation` property.

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

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`item_spacing_property`](#function-item_spacing_property)
- [`line_spacing_property`](#function-line_spacing_property)
- [`orientation_property`](#function-orientation_property)
- [`items_alignment_property`](#function-items_alignment_property)
- [`item_width_property`](#function-item_width_property)
- [`item_height_property`](#function-item_height_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`item_spacing`](#function-item_spacing)
- [`set_item_spacing`](#function-set_item_spacing)
- [`line_spacing`](#function-line_spacing)
- [`set_line_spacing`](#function-set_line_spacing)
- [`orientation`](#function-orientation)
- [`set_orientation`](#function-set_orientation)
- [`items_alignment`](#function-items_alignment)
- [`set_items_alignment`](#function-set_items_alignment)
- [`item_width`](#function-item_width)
- [`set_item_width`](#function-set_item_width)
- [`item_height`](#function-item_height)
- [`set_item_height`](#function-set_item_height)

<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/wrap_panel.rs#L50)

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

### to_ref

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

Returns a strong reference to this object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/wrap_panel.rs#L50)

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

### item_spacing_property

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

Defines the `ItemSpacing` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/wrap_panel.rs#L391)

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

### line_spacing_property

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

Defines the `LineSpacing` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/wrap_panel.rs#L391)

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

### orientation_property

```rust
fn orientation_property() -> &'static StyledProperty<Orientation>
```

Defines the `Orientation` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/wrap_panel.rs#L391)

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

### items_alignment_property

```rust
fn items_alignment_property() -> &'static StyledProperty<WrapPanelItemsAlignment>
```

Defines the `ItemsAlignment` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/wrap_panel.rs#L391)

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

### item_width_property

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

Defines the `ItemWidth` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/wrap_panel.rs#L391)

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

### item_height_property

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

Defines the `ItemHeight` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/wrap_panel.rs#L391)

<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/wrap_panel.rs#L448)

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

### new

```rust
fn new() -> Ref<Self>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/wrap_panel.rs#L452)

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

### item_spacing

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

The spacing between items.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/wrap_panel.rs#L457)

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

### set_item_spacing

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/wrap_panel.rs#L461)

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

### line_spacing

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

The spacing between lines.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/wrap_panel.rs#L466)

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

### set_line_spacing

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/wrap_panel.rs#L470)

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

### orientation

```rust
fn orientation(self: &Self) -> Orientation
```

The orientation in which child controls will be layed out.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/wrap_panel.rs#L475)

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

### set_orientation

```rust
fn set_orientation(self: &Self, value: Orientation)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/wrap_panel.rs#L479)

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

### items_alignment

```rust
fn items_alignment(self: &Self) -> WrapPanelItemsAlignment
```

The alignment of items in the panel.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/wrap_panel.rs#L484)

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

### set_items_alignment

```rust
fn set_items_alignment(self: &Self, value: WrapPanelItemsAlignment)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/wrap_panel.rs#L488)

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

### item_width

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

The width of all items in the panel.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/wrap_panel.rs#L493)

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

### set_item_width

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/wrap_panel.rs#L497)

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

### item_height

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

The height of all items in the panel.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/wrap_panel.rs#L502)

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

### set_item_height

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/wrap_panel.rs#L506)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`ControlImplExt`](/docs/0.5.0/api/ferroui-controls/trait-controlimplext/)
- [`PanelImplExt`](/docs/0.5.0/api/ferroui-controls/trait-panelimplext/)
- `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<WrapPanel>`](/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/)
- [`DefaultConstructible`](/docs/0.5.0/api/ferroui-base/trait-defaultconstructible/)
- [`StyledElementImpl`](/docs/0.5.0/api/ferroui-base/trait-styledelementimpl/)
- [`VisualImpl`](/docs/0.5.0/api/ferroui-base/trait-visualimpl/)
- [`InteractiveImpl`](/docs/0.5.0/api/ferroui-base/interactivity/trait-interactiveimpl/)
- [`InputElementImpl`](/docs/0.5.0/api/ferroui-base/input/trait-inputelementimpl/)
- [`ControlImpl`](/docs/0.5.0/api/ferroui-controls/trait-controlimpl/)
- [`PanelImpl`](/docs/0.5.0/api/ferroui-controls/trait-panelimpl/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`LayoutableImpl`](/docs/0.5.0/api/ferroui-base/layout/trait-layoutableimpl/)
- [`INavigableContainer`](/docs/0.5.0/api/ferroui-base/input/trait-inavigablecontainer/)

## Availability

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