# IInlineHost

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/documents/trait-iinlinehost/

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

```rust
trait IInlineHost
```

The control that hosts inlines: it is told when they change and owns the
visuals of embedded controls.

Handles are `Rc<dyn IInlineHost>`. A host is the parent of its inlines, so
its handle refers to it weakly: every member does nothing once the host is
gone.

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

## Members

- [`invalidate`](#function-invalidate)
- [`invalidate_layout`](#function-invalidate_layout)
- [`invalidate_render`](#function-invalidate_render)
- [`with_visual_children`](#function-with_visual_children)
- [`as_text_block`](#function-as_text_block)

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

### invalidate

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

Invalidates the text of the host.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/documents/i_inline_host.rs#L13)

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

### invalidate_layout

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

Rebuilds formatted text after inherited presentation changes. Document
collection hosts forward this to the view without publishing a model edit.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/documents/i_inline_host.rs#L17)

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

### invalidate_render

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

Invalidates interaction visuals without changing document content or
formatted text. A host with separate drawing invalidation overrides it.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/documents/i_inline_host.rs#L21)

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

### with_visual_children

```rust
fn with_visual_children(self: &Self, f: &mut dyn FnMut(&FerroList<Ref<Visual>>) -> ())
```

Runs `f` with the visual children of the host.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/documents/i_inline_host.rs#L24)

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

### as_text_block

```rust
fn as_text_block(self: &Self) -> Option<Ref<TextBlock>>
```

The host as a text block (C# `host is TextBlock`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/documents/i_inline_host.rs#L27)

## Availability

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