# Layout

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls-repeater/layouts/struct-layout/

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

```rust
struct Layout
```

Host-independent layout object. A single instance can keep independent
per-host state through each context's `LayoutState`.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Repeater/layouts/layout.rs#L28)

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`create_default_item_transition_provider`](#function-create_default_item_transition_provider)
- [`construct`](#function-construct)
- [`initialize_for_context`](#function-initialize_for_context)
- [`uninitialize_for_context`](#function-uninitialize_for_context)
- [`measure`](#function-measure)
- [`arrange`](#function-arrange)
- [`on_items_changed`](#function-on_items_changed)
- [`measure_invalidated`](#function-measure_invalidated)
- [`arrange_invalidated`](#function-arrange_invalidated)
- [`invalidate_measure`](#function-invalidate_measure)
- [`invalidate_arrange`](#function-invalidate_arrange)
- [`index_based_layout_orientation`](#function-index_based_layout_orientation)
- [`set_index_based_layout_orientation`](#function-set_index_based_layout_orientation)
- [`layout_id`](#function-layout_id)
- [`set_layout_id`](#function-set_layout_id)

<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.Repeater/layouts/layout.rs#L38)

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

### to_ref

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

Returns a strong reference to this object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Repeater/layouts/layout.rs#L38)

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

### create_default_item_transition_provider

```rust
fn create_default_item_transition_provider(self: &Self) -> Option<Ref<ItemCollectionTransitionProvider>>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Repeater/layouts/layout.rs#L38)

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

### construct

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Repeater/layouts/layout.rs#L53)

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

### initialize_for_context

```rust
fn initialize_for_context(self: &Self, context: &Ref<LayoutContext>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Repeater/layouts/layout.rs#L65)

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

### uninitialize_for_context

```rust
fn uninitialize_for_context(self: &Self, context: &Ref<LayoutContext>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Repeater/layouts/layout.rs#L74)

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

### measure

```rust
fn measure(self: &Self, context: &Ref<LayoutContext>, available_size: Size) -> Size
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Repeater/layouts/layout.rs#L83)

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

### arrange

```rust
fn arrange(self: &Self, context: &Ref<LayoutContext>, final_size: Size) -> Size
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Repeater/layouts/layout.rs#L92)

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

### on_items_changed

```rust
fn on_items_changed(self: &Self, context: &Ref<LayoutContext>, args: &ItemsChangedEventArgs<'_>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Repeater/layouts/layout.rs#L101)

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

### measure_invalidated

```rust
fn measure_invalidated(self: &Self, handler: impl Fn() -> () + 'static) -> Rc<dyn IDisposable>
```



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

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

### arrange_invalidated

```rust
fn arrange_invalidated(self: &Self, handler: impl Fn() -> () + 'static) -> Rc<dyn IDisposable>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Repeater/layouts/layout.rs#L117)

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

### invalidate_measure

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Repeater/layouts/layout.rs#L126)

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

### invalidate_arrange

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Repeater/layouts/layout.rs#L131)

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

### index_based_layout_orientation

```rust
fn index_based_layout_orientation(self: &Self) -> IndexBasedLayoutOrientation
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Repeater/layouts/layout.rs#L136)

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

### set_index_based_layout_orientation

```rust
fn set_index_based_layout_orientation(self: &Self, value: IndexBasedLayoutOrientation)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Repeater/layouts/layout.rs#L141)

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

### layout_id

```rust
fn layout_id(self: &Self) -> String
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Repeater/layouts/layout.rs#L144)

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

### set_layout_id

```rust
fn set_layout_id(self: &Self, value: String)
```



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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`LayoutImplExt`](/docs/0.5.0/api/ferroui-controls-repeater/layouts/trait-layoutimplext/)
- `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<Layout>`](/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/)
- [`LayoutImpl`](/docs/0.5.0/api/ferroui-controls-repeater/layouts/trait-layoutimpl/)

## Availability

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