# TextBlockImpl

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

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

```rust
trait TextBlockImpl: ControlImpl + $crate::Upcast<TextBlock>
```

The overridable members introduced by the class.

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

## Members

- [`render_text_layout`](#function-render_text_layout)
- [`create_text_layout`](#function-create_text_layout)

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

### render_text_layout

```rust
fn render_text_layout(this: &Self, context: &mut DrawingContext<'_>, origin: Point)
```

Renders the text layout to a drawing context.

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

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

### create_text_layout

```rust
fn create_text_layout(this: &Self, text: Option<&str>) -> Rc<TextLayout>
```

Creates the `TextLayout` used to render the text.

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

## Trait implementations

- [`TextBlockImpl`](/docs/0.5.0/api/ferroui-controls/trait-textblockimpl/)

## Availability

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