# RichTextBlockImpl

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

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

```rust
trait RichTextBlockImpl: ControlImpl + $crate::Upcast<RichTextBlock>
```

The overridable members introduced by the class.

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

## Members

- [`render_text`](#function-render_text)
- [`caret_visible`](#function-caret_visible)
- [`allow_hyperlink_navigation`](#function-allow_hyperlink_navigation)
- [`on_selection_changing`](#function-on_selection_changing)
- [`request_selection_change`](#function-request_selection_change)
- [`rebase_selection_on_document_change`](#function-rebase_selection_on_document_change)
- [`text_insets`](#function-text_insets)
- [`text_layout_constraint`](#function-text_layout_constraint)
- [`default_incremental_tab`](#function-default_incremental_tab)
- [`text_origin`](#function-text_origin)
- [`selection_is_visible`](#function-selection_is_visible)
- [`selection_render_brush`](#function-selection_render_brush)
- [`raise_selection_changed_event`](#function-raise_selection_changed_event)
- [`text_focus_target`](#function-text_focus_target)
- [`text_background_bounds`](#function-text_background_bounds)
- [`additional_visual_children`](#function-additional_visual_children)

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

### render_text

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

Paints text content after the background and selection highlights.

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

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

### caret_visible

```rust
fn caret_visible(this: &Self) -> bool
```

Whether the insertion caret is visible (editable views override this).

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

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

### allow_hyperlink_navigation

```rust
fn allow_hyperlink_navigation(this: &Self, modifiers: KeyModifiers) -> bool
```

Whether pointer input activates a hyperlink or edits its text.

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

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

### on_selection_changing

```rust
fn on_selection_changing(this: &Self, args: &RichTextSelectionChangedEventArgs) -> bool
```

Runs synchronously while the proposed selection is visible to readers.
Returning false cancels it unless a handler selected a different range.

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

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

### request_selection_change

```rust
fn request_selection_change(this: &Self, start: usize, end: usize) -> bool
```

Lets an editable view arbitrate a normalized selection through its editor.

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

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

### rebase_selection_on_document_change

```rust
fn rebase_selection_on_document_change(this: &Self) -> bool
```

Editors publish their final transaction selection after document changes.

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

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

### text_insets

```rust
fn text_insets(this: &Self) -> Thickness
```

Space outside the document's formatted text, including editor adornments.

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

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

### text_layout_constraint

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

The formatter constraint, independent of a scrollable view's viewport.

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

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

### default_incremental_tab

```rust
fn default_incremental_tab(this: &Self, font_size: f64) -> f64
```

Implicit tab interval for a paragraph without an assigned override.

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

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

### text_origin

```rust
fn text_origin(this: &Self) -> Point
```

Shared origin for text, inline controls, caret, selection and hit testing.

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

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

### selection_is_visible

```rust
fn selection_is_visible(this: &Self) -> bool
```

Whether the selection is currently drawn in this view (its highlight, and the
selection foreground of the selected text).

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

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

### selection_render_brush

```rust
fn selection_render_brush(this: &Self) -> Option<Rc<dyn IBrush>>
```

The selection background after the host's focus policy is applied.

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

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

### raise_selection_changed_event

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

Publishes the selection event on the owning control.

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

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

### text_focus_target

```rust
fn text_focus_target(this: &Self) -> Ref<InputElement>
```

The keyboard focus target for pointer interaction with text.

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

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

### text_background_bounds

```rust
fn text_background_bounds(this: &Self) -> Rect
```

Bounds painted by the document background; editor headers are outside it.

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

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

### additional_visual_children

```rust
fn additional_visual_children(this: &Self) -> Vec<Ref<Visual>>
```

Native framework visuals displayed beside the document's inline controls.

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

## Trait implementations

- [`RichTextBlockImpl`](/docs/0.5.0/api/ferroui-controls/trait-richtextblockimpl/)

## Availability

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