# TextPresenter

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/presenters/struct-textpresenter/

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

```rust
struct TextPresenter
```

The control that displays the text of a text box: the text, the
selection, the pre-edit text of an input method and the caret.

Every text position (`CaretIndex`, `SelectionStart`, `SelectionEnd`, the
positions of `CharacterHit`) is a UTF-16 code unit index.

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

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`create_text_layout`](#function-create_text_layout)
- [`invalidate_text_layout`](#function-invalidate_text_layout)
- [`text_paragraph_styles_property`](#function-text_paragraph_styles_property)
- [`text_style_overrides_property`](#function-text_style_overrides_property)
- [`show_selection_highlight_property`](#function-show_selection_highlight_property)
- [`caret_index_property`](#function-caret_index_property)
- [`reveal_password_property`](#function-reveal_password_property)
- [`password_char_property`](#function-password_char_property)
- [`selection_brush_property`](#function-selection_brush_property)
- [`selection_foreground_brush_property`](#function-selection_foreground_brush_property)
- [`caret_brush_property`](#function-caret_brush_property)
- [`caret_blink_interval_property`](#function-caret_blink_interval_property)
- [`selection_start_property`](#function-selection_start_property)
- [`selection_end_property`](#function-selection_end_property)
- [`text_property`](#function-text_property)
- [`preedit_text_property`](#function-preedit_text_property)
- [`preedit_text_cursor_position_property`](#function-preedit_text_cursor_position_property)
- [`text_alignment_property`](#function-text_alignment_property)
- [`text_wrapping_property`](#function-text_wrapping_property)
- [`line_height_property`](#function-line_height_property)
- [`letter_spacing_property`](#function-letter_spacing_property)
- [`background_property`](#function-background_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`caret_bounds_changed`](#function-caret_bounds_changed)
- [`background`](#function-background)
- [`set_background`](#function-set_background)
- [`show_selection_highlight`](#function-show_selection_highlight)
- [`set_show_selection_highlight`](#function-set_show_selection_highlight)
- [`text`](#function-text)
- [`set_text`](#function-set_text)
- [`preedit_text`](#function-preedit_text)
- [`set_preedit_text`](#function-set_preedit_text)
- [`preedit_text_cursor_position`](#function-preedit_text_cursor_position)
- [`set_preedit_text_cursor_position`](#function-set_preedit_text_cursor_position)
- [`text_style_overrides`](#function-text_style_overrides)
- [`text_paragraph_styles`](#function-text_paragraph_styles)
- [`set_text_paragraph_styles`](#function-set_text_paragraph_styles)
- [`set_text_style_overrides`](#function-set_text_style_overrides)
- [`font_family`](#function-font_family)
- [`set_font_family`](#function-set_font_family)
- [`font_features`](#function-font_features)
- [`set_font_features`](#function-set_font_features)
- [`font_size`](#function-font_size)
- [`set_font_size`](#function-set_font_size)
- [`font_style`](#function-font_style)
- [`set_font_style`](#function-set_font_style)
- [`font_weight`](#function-font_weight)
- [`set_font_weight`](#function-set_font_weight)
- [`font_stretch`](#function-font_stretch)
- [`set_font_stretch`](#function-set_font_stretch)
- [`foreground`](#function-foreground)
- [`set_foreground`](#function-set_foreground)
- [`text_wrapping`](#function-text_wrapping)
- [`set_text_wrapping`](#function-set_text_wrapping)
- [`line_height`](#function-line_height)
- [`set_line_height`](#function-set_line_height)
- [`letter_spacing`](#function-letter_spacing)
- [`set_letter_spacing`](#function-set_letter_spacing)
- [`text_alignment`](#function-text_alignment)
- [`set_text_alignment`](#function-set_text_alignment)
- [`text_layout`](#function-text_layout)
- [`caret_index`](#function-caret_index)
- [`set_caret_index`](#function-set_caret_index)
- [`cursor_rectangle`](#function-cursor_rectangle)
- [`password_char`](#function-password_char)
- [`set_password_char`](#function-set_password_char)
- [`reveal_password`](#function-reveal_password)
- [`set_reveal_password`](#function-set_reveal_password)
- [`selection_brush`](#function-selection_brush)
- [`set_selection_brush`](#function-set_selection_brush)
- [`selection_foreground_brush`](#function-selection_foreground_brush)
- [`set_selection_foreground_brush`](#function-set_selection_foreground_brush)
- [`caret_brush`](#function-caret_brush)
- [`set_caret_brush`](#function-set_caret_brush)
- [`caret_blink_interval`](#function-caret_blink_interval)
- [`set_caret_blink_interval`](#function-set_caret_blink_interval)
- [`selection_start`](#function-selection_start)
- [`set_selection_start`](#function-set_selection_start)
- [`selection_end`](#function-selection_end)
- [`set_selection_end`](#function-set_selection_end)
- [`current_im_client`](#function-current_im_client)
- [`set_current_im_client`](#function-set_current_im_client)
- [`show_caret`](#function-show_caret)
- [`hide_caret`](#function-hide_caret)
- [`move_caret_to_text_position`](#function-move_caret_to_text_position)
- [`move_caret_to_point`](#function-move_caret_to_point)
- [`move_caret_vertical`](#function-move_caret_vertical)
- [`get_next_character_hit`](#function-get_next_character_hit)
- [`move_caret_horizontal`](#function-move_caret_horizontal)

<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/presenters/text_presenter.rs#L83)

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

### to_ref

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

Returns a strong reference to this object.

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

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

### create_text_layout

```rust
fn create_text_layout(self: &Self) -> Rc<TextLayout>
```

Creates the `TextLayout` used to render the text.

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

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

### invalidate_text_layout

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

Drops the text layout and the shaped runs it was built from.

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

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

### text_paragraph_styles_property

```rust
fn text_paragraph_styles_property() -> &'static StyledProperty<Option<TextParagraphStyles>>
```

Defines the `TextParagraphStyles` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L378)

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

### text_style_overrides_property

```rust
fn text_style_overrides_property() -> &'static StyledProperty<Option<TextStyleOverrides>>
```

Defines the `TextStyleOverrides` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L378)

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

### show_selection_highlight_property

```rust
fn show_selection_highlight_property() -> &'static StyledProperty<bool>
```

Defines the `ShowSelectionHighlight` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L378)

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

### caret_index_property

```rust
fn caret_index_property() -> &'static StyledProperty<i32>
```

Defines the `CaretIndex` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L378)

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

### reveal_password_property

```rust
fn reveal_password_property() -> &'static StyledProperty<bool>
```

Defines the `RevealPassword` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L378)

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

### password_char_property

```rust
fn password_char_property() -> &'static StyledProperty<char>
```

Defines the `PasswordChar` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L378)

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

### selection_brush_property

```rust
fn selection_brush_property() -> &'static StyledProperty<Option<Rc<dyn IBrush>>>
```

Defines the `SelectionBrush` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L378)

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

### selection_foreground_brush_property

```rust
fn selection_foreground_brush_property() -> &'static StyledProperty<Option<Rc<dyn IBrush>>>
```

Defines the `SelectionForegroundBrush` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L378)

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

### caret_brush_property

```rust
fn caret_brush_property() -> &'static StyledProperty<Option<Rc<dyn IBrush>>>
```

Defines the `CaretBrush` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L378)

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

### caret_blink_interval_property

```rust
fn caret_blink_interval_property() -> &'static StyledProperty<Duration>
```

Defines the `CaretBlinkInterval` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L378)

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

### selection_start_property

```rust
fn selection_start_property() -> &'static StyledProperty<i32>
```

Defines the `SelectionStart` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L378)

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

### selection_end_property

```rust
fn selection_end_property() -> &'static StyledProperty<i32>
```

Defines the `SelectionEnd` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L378)

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

### text_property

```rust
fn text_property() -> &'static StyledProperty<Option<String>>
```

Defines the `Text` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L378)

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

### preedit_text_property

```rust
fn preedit_text_property() -> &'static StyledProperty<Option<String>>
```

Defines the `PreeditText` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L378)

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

### preedit_text_cursor_position_property

```rust
fn preedit_text_cursor_position_property() -> &'static StyledProperty<Option<i32>>
```

Defines the `PreeditTextCursorPosition` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L378)

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

### text_alignment_property

```rust
fn text_alignment_property() -> &'static AttachedProperty<TextAlignment>
```

Defines the `TextAlignment` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L378)

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

### text_wrapping_property

```rust
fn text_wrapping_property() -> &'static AttachedProperty<TextWrapping>
```

Defines the `TextWrapping` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L378)

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

### line_height_property

```rust
fn line_height_property() -> &'static AttachedProperty<f64>
```

Defines the `LineHeight` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L378)

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

### letter_spacing_property

```rust
fn letter_spacing_property() -> &'static AttachedProperty<f64>
```

Defines the `LetterSpacing` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L378)

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

### background_property

```rust
fn background_property() -> &'static StyledProperty<Option<Rc<dyn IBrush>>>
```

Defines the `Background` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L378)

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

### construct

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

Creates the class data; see `ferroui_base::FerroObject::construct`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L538)

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

### new

```rust
fn new() -> Ref<Self>
```

Initializes a new instance of the `TextPresenter` class.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L581)

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

### caret_bounds_changed

```rust
fn caret_bounds_changed(self: &Self, handler: impl Fn() -> () + 'static) -> Subscription
```

Occurs when the bounds of the caret change.

Dropping the returned guard removes the handler;
`Subscription::detach` keeps it for the life of the presenter.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L589)

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

### background

```rust
fn background(self: &Self) -> Option<Rc<dyn IBrush>>
```

A brush used to paint the control's background.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L600)

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

### set_background

```rust
fn set_background(self: &Self, value: Option<Rc<dyn IBrush>>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L604)

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

### show_selection_highlight

```rust
fn show_selection_highlight(self: &Self) -> bool
```

Whether the presenter shows a selection highlight.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L609)

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

### set_show_selection_highlight

```rust
fn set_show_selection_highlight(self: &Self, value: bool)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L613)

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

### text

```rust
fn text(self: &Self) -> Option<String>
```

The text.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L618)

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

### set_text

```rust
fn set_text(self: &Self, value: Option<&str>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L622)

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

### preedit_text

```rust
fn preedit_text(self: &Self) -> Option<String>
```

The text an input method is composing, displayed at the caret.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L627)

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

### set_preedit_text

```rust
fn set_preedit_text(self: &Self, value: Option<&str>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L631)

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

### preedit_text_cursor_position

```rust
fn preedit_text_cursor_position(self: &Self) -> Option<i32>
```

The position of the cursor within the pre-edit text.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L636)

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

### set_preedit_text_cursor_position

```rust
fn set_preedit_text_cursor_position(self: &Self, value: Option<i32>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L640)

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

### text_style_overrides

```rust
fn text_style_overrides(self: &Self) -> Option<TextStyleOverrides>
```

Complete run properties at UTF-16 ranges of committed `Text`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L645)

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

### text_paragraph_styles

```rust
fn text_paragraph_styles(self: &Self) -> Option<TextParagraphStyles>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L649)

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

### set_text_paragraph_styles

```rust
fn set_text_paragraph_styles(self: &Self, value: Option<TextParagraphStyles>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L653)

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

### set_text_style_overrides

```rust
fn set_text_style_overrides(self: &Self, value: Option<TextStyleOverrides>)
```

Selection colors and IME decorations preserve these properties. The
collection is immutable; assign a new one after editing the text.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L659)

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

### font_family

```rust
fn font_family(self: &Self) -> FontFamily
```

The font family.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L664)

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

### set_font_family

```rust
fn set_font_family(self: &Self, value: FontFamily)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L668)

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

### font_features

```rust
fn font_features(self: &Self) -> Option<FontFeatureCollection>
```

The font features.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L673)

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

### set_font_features

```rust
fn set_font_features(self: &Self, value: Option<FontFeatureCollection>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L677)

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

### font_size

```rust
fn font_size(self: &Self) -> f64
```

The font size.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L682)

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

### set_font_size

```rust
fn set_font_size(self: &Self, value: f64)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L686)

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

### font_style

```rust
fn font_style(self: &Self) -> FontStyle
```

The font style.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L691)

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

### set_font_style

```rust
fn set_font_style(self: &Self, value: FontStyle)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L695)

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

### font_weight

```rust
fn font_weight(self: &Self) -> FontWeight
```

The font weight.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L700)

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

### set_font_weight

```rust
fn set_font_weight(self: &Self, value: FontWeight)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L704)

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

### font_stretch

```rust
fn font_stretch(self: &Self) -> FontStretch
```

The font stretch.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L709)

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

### set_font_stretch

```rust
fn set_font_stretch(self: &Self, value: FontStretch)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L713)

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

### foreground

```rust
fn foreground(self: &Self) -> Option<Rc<dyn IBrush>>
```

A brush used to paint the text.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L718)

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

### set_foreground

```rust
fn set_foreground(self: &Self, value: Option<Rc<dyn IBrush>>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L722)

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

### text_wrapping

```rust
fn text_wrapping(self: &Self) -> TextWrapping
```

The control's text wrapping mode.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L727)

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

### set_text_wrapping

```rust
fn set_text_wrapping(self: &Self, value: TextWrapping)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L731)

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

### line_height

```rust
fn line_height(self: &Self) -> f64
```

The line height. By default, this is set to NaN, which determines the
appropriate height automatically.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L737)

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

### set_line_height

```rust
fn set_line_height(self: &Self, value: f64)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L741)

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

### letter_spacing

```rust
fn letter_spacing(self: &Self) -> f64
```

The letter spacing.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L746)

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

### set_letter_spacing

```rust
fn set_letter_spacing(self: &Self, value: f64)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L750)

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

### text_alignment

```rust
fn text_alignment(self: &Self) -> TextAlignment
```

The text alignment.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L755)

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

### set_text_alignment

```rust
fn set_text_alignment(self: &Self, value: TextAlignment)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L759)

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

### text_layout

```rust
fn text_layout(self: &Self) -> Rc<TextLayout>
```

The `TextLayout` used to render the text.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L764)

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

### caret_index

```rust
fn caret_index(self: &Self) -> i32
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L781)

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

### set_caret_index

```rust
fn set_caret_index(self: &Self, value: i32)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L785)

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

### cursor_rectangle

```rust
fn cursor_rectangle(self: &Self) -> Rect
```

The caret rectangle relative to this presenter.

The rectangle has zero width. Its X/Y position and height describe the
caret location within the presenter's text layout coordinates.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L793)

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

### password_char

```rust
fn password_char(self: &Self) -> char
```

The character displayed in place of every character of the text
(`'\0'`: none).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L801)

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

### set_password_char

```rust
fn set_password_char(self: &Self, value: char)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L805)

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

### reveal_password

```rust
fn reveal_password(self: &Self) -> bool
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L809)

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

### set_reveal_password

```rust
fn set_reveal_password(self: &Self, value: bool)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L813)

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

### selection_brush

```rust
fn selection_brush(self: &Self) -> Option<Rc<dyn IBrush>>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L817)

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

### set_selection_brush

```rust
fn set_selection_brush(self: &Self, value: Option<Rc<dyn IBrush>>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L821)

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

### selection_foreground_brush

```rust
fn selection_foreground_brush(self: &Self) -> Option<Rc<dyn IBrush>>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L825)

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

### set_selection_foreground_brush

```rust
fn set_selection_foreground_brush(self: &Self, value: Option<Rc<dyn IBrush>>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L829)

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

### caret_brush

```rust
fn caret_brush(self: &Self) -> Option<Rc<dyn IBrush>>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L833)

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

### set_caret_brush

```rust
fn set_caret_brush(self: &Self, value: Option<Rc<dyn IBrush>>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L837)

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

### caret_blink_interval

```rust
fn caret_blink_interval(self: &Self) -> Duration
```

The caret blink rate.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L842)

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

### set_caret_blink_interval

```rust
fn set_caret_blink_interval(self: &Self, value: Duration)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L846)

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

### selection_start

```rust
fn selection_start(self: &Self) -> i32
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L850)

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

### set_selection_start

```rust
fn set_selection_start(self: &Self, value: i32)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L854)

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

### selection_end

```rust
fn selection_end(self: &Self) -> i32
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L858)

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

### set_selection_end

```rust
fn set_selection_end(self: &Self, value: i32)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L862)

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

### current_im_client

```rust
fn current_im_client(self: &Self) -> Option<Rc<TextBoxTextInputMethodClient>>
```

The input method client that currently edits the text of the
presenter. The client refers to the presenter, so the presenter
refers to it weakly.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L876)

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

### set_current_im_client

```rust
fn set_current_im_client(self: &Self, value: Option<Rc<TextBoxTextInputMethodClient>>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L880)

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

### show_caret

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L984)

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

### hide_caret

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L1038)

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

### move_caret_to_text_position

```rust
fn move_caret_to_text_position(self: &Self, text_position: i32, trailing_edge: bool)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L1184)

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

### move_caret_to_point

```rust
fn move_caret_to_point(self: &Self, point: Point)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L1194)

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

### move_caret_vertical

```rust
fn move_caret_vertical(self: &Self, direction: LogicalDirection)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L1204)

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

### get_next_character_hit

```rust
fn get_next_character_hit(self: &Self, direction: LogicalDirection) -> CharacterHit
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L1285)

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

### move_caret_horizontal

```rust
fn move_caret_horizontal(self: &Self, direction: LogicalDirection)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/presenters/text_presenter.rs#L1357)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`TextPresenterImplExt`](/docs/0.5.0/api/ferroui-controls/presenters/trait-textpresenterimplext/)
- [`ControlImplExt`](/docs/0.5.0/api/ferroui-controls/trait-controlimplext/)
- `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`
- [`InputElementImplExt`](/docs/0.5.0/api/ferroui-base/input/trait-inputelementimplext/)
- [`InteractiveImplExt`](/docs/0.5.0/api/ferroui-base/interactivity/trait-interactiveimplext/)
- [`LayoutableImplExt`](/docs/0.5.0/api/ferroui-base/layout/trait-layoutableimplext/)
- [`FerroObjectImplExt`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimplext/)
- [`StyledElementImplExt`](/docs/0.5.0/api/ferroui-base/trait-styledelementimplext/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- [`VisualImplExt`](/docs/0.5.0/api/ferroui-base/trait-visualimplext/)
- `ErasedDestructor`
- `IntoEither`
- `Drop`
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<TextPresenter>`](/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/)
- [`DefaultConstructible`](/docs/0.5.0/api/ferroui-base/trait-defaultconstructible/)
- [`InteractiveImpl`](/docs/0.5.0/api/ferroui-base/interactivity/trait-interactiveimpl/)
- [`InputElementImpl`](/docs/0.5.0/api/ferroui-base/input/trait-inputelementimpl/)
- [`ControlImpl`](/docs/0.5.0/api/ferroui-controls/trait-controlimpl/)
- [`StyledElementImpl`](/docs/0.5.0/api/ferroui-base/trait-styledelementimpl/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`VisualImpl`](/docs/0.5.0/api/ferroui-base/trait-visualimpl/)
- [`LayoutableImpl`](/docs/0.5.0/api/ferroui-base/layout/trait-layoutableimpl/)
- [`TextPresenterImpl`](/docs/0.5.0/api/ferroui-controls/presenters/trait-textpresenterimpl/)

## Availability

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