# LayoutableImpl

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/layout/trait-layoutableimpl/

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

```rust
trait LayoutableImpl: VisualImpl + $crate::Upcast<Layoutable>
```

The overridable members introduced by the class.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/layout/layoutable.rs#L68)

## Members

- [`apply_template`](#function-apply_template)
- [`measure_core`](#function-measure_core)
- [`measure_override`](#function-measure_override)
- [`measure_hold_override`](#function-measure_hold_override)
- [`arrange_core`](#function-arrange_core)
- [`arrange_override`](#function-arrange_override)
- [`on_measure_invalidated`](#function-on_measure_invalidated)

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

### apply_template

```rust
fn apply_template(this: &Self)
```

Creates the visual children of the control, if necessary.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/layout/layoutable.rs#L68)

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

### measure_core

```rust
fn measure_core(this: &Self, available_size: Size) -> Size
```

The default implementation of the control's measure pass.

This calculates the desired size taking into account the control's
margin and min/max/explicit size, and calls `measure_override` for
the content. Usually `measure_override` is what you want to
override.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/layout/layoutable.rs#L68)

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

### measure_override

```rust
fn measure_override(this: &Self, available_size: Size) -> Size
```

Measures the control and its child elements as part of a layout
pass. Returns the size the control would like to be.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/layout/layoutable.rs#L68)

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

### measure_hold_override

```rust
fn measure_hold_override(this: &Self, constraint: Size) -> Option<crate::layout::MeasureHold>
```

The range of constraints, around the one `measure_override` was just given, over which
it returns the same size and leaves the descendants as they are, or `None` (the
default) when only that constraint is known to. An addition (desktop-performance.md
section 9.15): an element is not measured again at an available size inside the hold.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/layout/layoutable.rs#L68)

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

### arrange_core

```rust
fn arrange_core(this: &Self, final_rect: Rect)
```

The default implementation of the control's arrange pass.

This calculates the final bounds taking into account the control's
margin, alignment and size constraints, and calls
`arrange_override` for the content. Usually `arrange_override` is
what you want to override.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/layout/layoutable.rs#L68)

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

### arrange_override

```rust
fn arrange_override(this: &Self, final_size: Size) -> Size
```

Positions child elements as part of a layout pass. Returns the
size used.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/layout/layoutable.rs#L68)

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

### on_measure_invalidated

```rust
fn on_measure_invalidated(this: &Self)
```

Called by `invalidate_measure`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/layout/layoutable.rs#L68)

## Trait implementations

- [`LayoutableImpl`](/docs/0.5.0/api/ferroui-base/layout/trait-layoutableimpl/)

## Availability

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