# ILayoutManager

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

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

```rust
trait ILayoutManager
```

Manages measuring and arranging of controls.

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

## Members

- [`add_layout_updated`](#function-add_layout_updated)
- [`remove_layout_updated`](#function-remove_layout_updated)
- [`invalidate_measure`](#function-invalidate_measure)
- [`invalidate_arrange`](#function-invalidate_arrange)
- [`execute_layout_pass`](#function-execute_layout_pass)
- [`execute_initial_layout_pass`](#function-execute_initial_layout_pass)
- [`register_effective_viewport_listener`](#function-register_effective_viewport_listener)
- [`unregister_effective_viewport_listener`](#function-unregister_effective_viewport_listener)
- [`dispose`](#function-dispose)
- [`as_bring_into_view_layout_manager`](#function-as_bring_into_view_layout_manager)

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

### add_layout_updated

```rust
fn add_layout_updated(self: &Self, handler: Rc<dyn Fn() -> ()>) -> u64
```

Subscribes to the event raised when the layout manager completes a
layout pass. Returns a token for
`remove_layout_updated`.

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

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

### remove_layout_updated

```rust
fn remove_layout_updated(self: &Self, token: u64)
```

Unsubscribes a layout updated handler.

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

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

### invalidate_measure

```rust
fn invalidate_measure(self: &Self, control: &Layoutable)
```

Notifies the layout manager that a control requires a measure.

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

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

### invalidate_arrange

```rust
fn invalidate_arrange(self: &Self, control: &Layoutable)
```

Notifies the layout manager that a control requires an arrange.

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

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

### execute_layout_pass

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

Executes a layout pass.

You should not usually need to call this method explicitly: the layout
manager schedules layout passes itself.

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

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

### execute_initial_layout_pass

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

Executes the initial layout pass on a layout root.

You should not usually need to call this method explicitly: it is
called by the layout root when it is first shown.

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

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

### register_effective_viewport_listener

```rust
fn register_effective_viewport_listener(self: &Self, control: &Layoutable)
```

Registers a control as wanting to receive effective viewport
notifications.

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

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

### unregister_effective_viewport_listener

```rust
fn unregister_effective_viewport_listener(self: &Self, control: &Layoutable)
```

Unregisters a control from receiving effective viewport notifications.

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

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

### dispose

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

Releases the layout manager.

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

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

### as_bring_into_view_layout_manager

```rust
fn as_bring_into_view_layout_manager(self: &Self) -> Option<&dyn IBringIntoViewLayoutManager>
```

The layout manager viewed as one that handles bring-into-view
requests, if it does.

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

## Trait implementations

- [`ILayoutManager`](/docs/0.5.0/api/ferroui-base/layout/trait-ilayoutmanager/)

## Availability

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