# ITextEditProvider

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/automation/provider/trait-itexteditprovider/

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

```rust
trait ITextEditProvider: ITextProvider
```

WinUI's TextEdit pattern, which inherits Text independently of Text2.
Returned ranges use the same live document and UTF-16 positions as Text.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/provider/i_text_edit_provider.rs#L36)

## Members

- [`raises_text_edit_events_through_peer`](#function-raises_text_edit_events_through_peer)
- [`get_active_composition`](#function-get_active_composition)
- [`get_conversion_target`](#function-get_conversion_target)
- [`text_edit_text_changed`](#function-text_edit_text_changed)

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

### raises_text_edit_events_through_peer

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

Whether this provider's owner already sends its causes through
AutomationPeer's platform event route. Backends then avoid installing a
second forwarding observer. Custom providers keep the default route.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/provider/i_text_edit_provider.rs#L40)

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

### get_active_composition

```rust
fn get_active_composition(self: &Self) -> Result<Option<Rc<dyn ITextRangeProvider>>, ProviderError>
```

The full active IME preview, regardless of the caret within it. A live
owner with no active composition returns `None`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/provider/i_text_edit_provider.rs#L46)

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

### get_conversion_target

```rust
fn get_conversion_target(self: &Self) -> Result<Option<Rc<dyn ITextRangeProvider>>, ProviderError>
```

The IME's distinct conversion target, when the input backend supplies
one. A composition or selection alone does not identify a target.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/provider/i_text_edit_provider.rs#L50)

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

### text_edit_text_changed

```rust
fn text_edit_text_changed(self: &Self, handler: Rc<dyn Fn(&TextEditTextChangedEventArgs) -> ()>) -> Result<Rc<dyn IDisposable>, ProviderError>
```

Observes the model's known text-edit causes, without interpreting
ordinary text/selection changes as autocorrection or composition.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/provider/i_text_edit_provider.rs#L54)

## Trait implementations

- [`ITextEditProvider`](/docs/0.5.0/api/ferroui-controls/automation/provider/trait-itexteditprovider/)

## Availability

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