# yuiTextEditState

A yui text edit state record carrying value, graphemes, caret, selectionAnchor, selectionFocus, and related state.

Last updated: 2026-09-09

Package: ui | Status: source-declared

Tags: cpu, method, source-example, thing, ui, yeho

Build YUI's reusable control, layout, interaction, text, accessibility, and retained-rendering models.

```yh
external thing yuiTextEditState
```

- text value: Stores value as text.
- yuiGraphemeMap graphemes: Stores graphemes as yuiGraphemeMap.
- int caret: Stores caret as int.
- int selectionAnchor: Stores selection anchor as int.
- int selectionFocus: Stores selection focus as int.
- bool focused: Stores focused as bool.
- bool composing: Stores composing as bool.
- int compositionStart: Stores composition start as int.
- int compositionEnd: Stores composition end as int.
- text compositionValue: Stores composition value as text.
- text clipboardHook: Stores clipboard hook as text.
- text undoGroup: Stores undo group as text.
- int revision: Stores revision as int.
- text diagnostic: Stores diagnostic as text.
- yuiTextEditState(text value, yuiGraphemeMap graphemes, int caret, bool focused, text clipboardHook): Yui text edit state.
- Reject(text reason) returns bool: Reject.
- ValidationIssue() returns text: Validation issue.
- SetSelection(int anchor, int focus) returns bool: Set selection.
- SelectAll() returns bool: Select all.
- MoveCaret(text direction, bool extend) returns bool: Move caret.
- BeginComposition(yuiCompositionEvent event) returns bool: Begin composition.
- UpdateComposition(yuiCompositionEvent event) returns bool: Update composition.
- ApplyEdit(text resultValue, yuiGraphemeMap resultMap, int resultCaret, text inputKind, text undoGroup) returns bool: Apply edit.
- ApplyAtomicReplacement(text replacement, int selectionStart, int selectionEnd, text inputKind, text nextUndoGroup) returns bool: Apply atomic replacement.
- ApplyCommittedText(text committed, text nextUndoGroup) returns bool: Apply committed text.
- CommitAtomicComposition(text committed, text nextUndoGroup) returns bool: Commit atomic composition.
- ApplyCommittedAppend(text committed, text nextUndoGroup) returns bool: Apply committed append.
- DeleteAdjacent(text direction, text nextUndoGroup) returns bool: Delete adjacent.
- CommitComposition(yuiCompositionEvent event, text resultValue, yuiGraphemeMap resultMap, int resultCaret, text undoGroup) returns bool: Commit composition.
- CancelComposition(yuiCompositionEvent event) returns bool: Cancel composition.
- Clipboard(text operation) returns yuiClipboardRequest: Clipboard.
- ApplyClipboardResult(yuiClipboardRequest request, text clipboardValue, text nextUndoGroup) returns bool: Apply clipboard result.
- RenderReport() returns text: Render report.

## Use yuiTextEditState

A complete small caller. Values are illustrative; check the returned result and package requirements before connecting live resources.

Verification: type checked

```yh
using ui

// Build YUI's reusable control, layout, interaction, text, accessibility, and retained-rendering models.
yuiTextEditState sample = yuiTextEditState("value", yuiGraphemeMap(1, "example"), 1, true, "clipboard Hook")
Console.Log(Text.From(sample.value))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuitexteditstate"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "graphics.image"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image"

[[dependencies]]
package = "graphics.text"
version = "0.1.0"
path = "../../../yeho/packages/graphics/text"

[[dependencies]]
package = "host.ui_services"
version = "0.1.0"
path = "../../../yeho/packages/host/ui_services"

[[dependencies]]
package = "ui"
version = "0.2.0"
path = "../../../yeho/packages/ui"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/ui--yuiTextEditState/usage --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiTextEditState.Reject

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Reject.
yuiTextEditState instance = yuiTextEditState("value", yuiGraphemeMap(1, "example"), 1, true, "clipboard Hook")
text argument_reason = "argument reason"
bool result = instance.Reject(argument_reason)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuitexteditstate"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "graphics.image"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image"

[[dependencies]]
package = "graphics.text"
version = "0.1.0"
path = "../../../yeho/packages/graphics/text"

[[dependencies]]
package = "host.ui_services"
version = "0.1.0"
path = "../../../yeho/packages/host/ui_services"

[[dependencies]]
package = "ui"
version = "0.2.0"
path = "../../../yeho/packages/ui"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/ui--yuiTextEditState/method-Reject-15 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiTextEditState.ValidationIssue

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Validation issue.
yuiTextEditState instance = yuiTextEditState("value", yuiGraphemeMap(1, "example"), 1, true, "clipboard Hook")
text result = instance.ValidationIssue()
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuitexteditstate"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "graphics.image"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image"

[[dependencies]]
package = "graphics.text"
version = "0.1.0"
path = "../../../yeho/packages/graphics/text"

[[dependencies]]
package = "host.ui_services"
version = "0.1.0"
path = "../../../yeho/packages/host/ui_services"

[[dependencies]]
package = "ui"
version = "0.2.0"
path = "../../../yeho/packages/ui"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/ui--yuiTextEditState/method-ValidationIssue-16 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiTextEditState.SetSelection

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Set selection.
yuiTextEditState instance = yuiTextEditState("value", yuiGraphemeMap(1, "example"), 1, true, "clipboard Hook")
int argument_anchor = 1
int argument_focus = 1
bool result = instance.SetSelection(argument_anchor, argument_focus)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuitexteditstate"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "graphics.image"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image"

[[dependencies]]
package = "graphics.text"
version = "0.1.0"
path = "../../../yeho/packages/graphics/text"

[[dependencies]]
package = "host.ui_services"
version = "0.1.0"
path = "../../../yeho/packages/host/ui_services"

[[dependencies]]
package = "ui"
version = "0.2.0"
path = "../../../yeho/packages/ui"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/ui--yuiTextEditState/method-SetSelection-17 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiTextEditState.SelectAll

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Select all.
yuiTextEditState instance = yuiTextEditState("value", yuiGraphemeMap(1, "example"), 1, true, "clipboard Hook")
bool result = instance.SelectAll()
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuitexteditstate"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "graphics.image"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image"

[[dependencies]]
package = "graphics.text"
version = "0.1.0"
path = "../../../yeho/packages/graphics/text"

[[dependencies]]
package = "host.ui_services"
version = "0.1.0"
path = "../../../yeho/packages/host/ui_services"

[[dependencies]]
package = "ui"
version = "0.2.0"
path = "../../../yeho/packages/ui"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/ui--yuiTextEditState/method-SelectAll-18 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiTextEditState.MoveCaret

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Move caret.
yuiTextEditState instance = yuiTextEditState("value", yuiGraphemeMap(1, "example"), 1, true, "clipboard Hook")
text argument_direction = "argument direction"
bool argument_extend = true
bool result = instance.MoveCaret(argument_direction, argument_extend)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuitexteditstate"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "graphics.image"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image"

[[dependencies]]
package = "graphics.text"
version = "0.1.0"
path = "../../../yeho/packages/graphics/text"

[[dependencies]]
package = "host.ui_services"
version = "0.1.0"
path = "../../../yeho/packages/host/ui_services"

[[dependencies]]
package = "ui"
version = "0.2.0"
path = "../../../yeho/packages/ui"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/ui--yuiTextEditState/method-MoveCaret-19 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiTextEditState.BeginComposition

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Begin composition.
yuiTextEditState instance = yuiTextEditState("value", yuiGraphemeMap(1, "example"), 1, true, "clipboard Hook")
yuiCompositionEvent argument_event = yuiCompositionEvent("phase", 1, 1, "value", "example")
bool result = instance.BeginComposition(argument_event)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuitexteditstate"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "graphics.image"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image"

[[dependencies]]
package = "graphics.text"
version = "0.1.0"
path = "../../../yeho/packages/graphics/text"

[[dependencies]]
package = "host.ui_services"
version = "0.1.0"
path = "../../../yeho/packages/host/ui_services"

[[dependencies]]
package = "ui"
version = "0.2.0"
path = "../../../yeho/packages/ui"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/ui--yuiTextEditState/method-BeginComposition-20 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiTextEditState.UpdateComposition

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Update composition.
yuiTextEditState instance = yuiTextEditState("value", yuiGraphemeMap(1, "example"), 1, true, "clipboard Hook")
yuiCompositionEvent argument_event = yuiCompositionEvent("phase", 1, 1, "value", "example")
bool result = instance.UpdateComposition(argument_event)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuitexteditstate"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "graphics.image"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image"

[[dependencies]]
package = "graphics.text"
version = "0.1.0"
path = "../../../yeho/packages/graphics/text"

[[dependencies]]
package = "host.ui_services"
version = "0.1.0"
path = "../../../yeho/packages/host/ui_services"

[[dependencies]]
package = "ui"
version = "0.2.0"
path = "../../../yeho/packages/ui"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/ui--yuiTextEditState/method-UpdateComposition-21 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiTextEditState.ApplyEdit

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Apply edit.
yuiTextEditState instance = yuiTextEditState("value", yuiGraphemeMap(1, "example"), 1, true, "clipboard Hook")
text argument_resultValue = "argument result Value"
yuiGraphemeMap argument_resultMap = yuiGraphemeMap(1, "example")
int argument_resultCaret = 1
text argument_inputKind = "argument input Kind"
text argument_undoGroup = "argument undo Group"
bool result = instance.ApplyEdit(argument_resultValue, argument_resultMap, argument_resultCaret, argument_inputKind, argument_undoGroup)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuitexteditstate"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "graphics.image"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image"

[[dependencies]]
package = "graphics.text"
version = "0.1.0"
path = "../../../yeho/packages/graphics/text"

[[dependencies]]
package = "host.ui_services"
version = "0.1.0"
path = "../../../yeho/packages/host/ui_services"

[[dependencies]]
package = "ui"
version = "0.2.0"
path = "../../../yeho/packages/ui"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/ui--yuiTextEditState/method-ApplyEdit-22 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiTextEditState.ApplyAtomicReplacement

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Apply atomic replacement.
yuiTextEditState instance = yuiTextEditState("value", yuiGraphemeMap(1, "example"), 1, true, "clipboard Hook")
text argument_replacement = "argument replacement"
int argument_selectionStart = 1
int argument_selectionEnd = 1
text argument_inputKind = "argument input Kind"
text argument_nextUndoGroup = "argument next Undo Group"
bool result = instance.ApplyAtomicReplacement(argument_replacement, argument_selectionStart, argument_selectionEnd, argument_inputKind, argument_nextUndoGroup)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuitexteditstate"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "graphics.image"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image"

[[dependencies]]
package = "graphics.text"
version = "0.1.0"
path = "../../../yeho/packages/graphics/text"

[[dependencies]]
package = "host.ui_services"
version = "0.1.0"
path = "../../../yeho/packages/host/ui_services"

[[dependencies]]
package = "ui"
version = "0.2.0"
path = "../../../yeho/packages/ui"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/ui--yuiTextEditState/method-ApplyAtomicReplacement-23 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiTextEditState.ApplyCommittedText

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Apply committed text.
yuiTextEditState instance = yuiTextEditState("value", yuiGraphemeMap(1, "example"), 1, true, "clipboard Hook")
text argument_committed = "argument committed"
text argument_nextUndoGroup = "argument next Undo Group"
bool result = instance.ApplyCommittedText(argument_committed, argument_nextUndoGroup)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuitexteditstate"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "graphics.image"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image"

[[dependencies]]
package = "graphics.text"
version = "0.1.0"
path = "../../../yeho/packages/graphics/text"

[[dependencies]]
package = "host.ui_services"
version = "0.1.0"
path = "../../../yeho/packages/host/ui_services"

[[dependencies]]
package = "ui"
version = "0.2.0"
path = "../../../yeho/packages/ui"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/ui--yuiTextEditState/method-ApplyCommittedText-24 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiTextEditState.CommitAtomicComposition

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Commit atomic composition.
yuiTextEditState instance = yuiTextEditState("value", yuiGraphemeMap(1, "example"), 1, true, "clipboard Hook")
text argument_committed = "argument committed"
text argument_nextUndoGroup = "argument next Undo Group"
bool result = instance.CommitAtomicComposition(argument_committed, argument_nextUndoGroup)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuitexteditstate"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "graphics.image"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image"

[[dependencies]]
package = "graphics.text"
version = "0.1.0"
path = "../../../yeho/packages/graphics/text"

[[dependencies]]
package = "host.ui_services"
version = "0.1.0"
path = "../../../yeho/packages/host/ui_services"

[[dependencies]]
package = "ui"
version = "0.2.0"
path = "../../../yeho/packages/ui"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/ui--yuiTextEditState/method-CommitAtomicComposition-25 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiTextEditState.ApplyCommittedAppend

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Apply committed append.
yuiTextEditState instance = yuiTextEditState("value", yuiGraphemeMap(1, "example"), 1, true, "clipboard Hook")
text argument_committed = "argument committed"
text argument_nextUndoGroup = "argument next Undo Group"
bool result = instance.ApplyCommittedAppend(argument_committed, argument_nextUndoGroup)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuitexteditstate"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "graphics.image"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image"

[[dependencies]]
package = "graphics.text"
version = "0.1.0"
path = "../../../yeho/packages/graphics/text"

[[dependencies]]
package = "host.ui_services"
version = "0.1.0"
path = "../../../yeho/packages/host/ui_services"

[[dependencies]]
package = "ui"
version = "0.2.0"
path = "../../../yeho/packages/ui"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/ui--yuiTextEditState/method-ApplyCommittedAppend-26 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiTextEditState.DeleteAdjacent

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Delete adjacent.
yuiTextEditState instance = yuiTextEditState("value", yuiGraphemeMap(1, "example"), 1, true, "clipboard Hook")
text argument_direction = "argument direction"
text argument_nextUndoGroup = "argument next Undo Group"
bool result = instance.DeleteAdjacent(argument_direction, argument_nextUndoGroup)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuitexteditstate"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "graphics.image"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image"

[[dependencies]]
package = "graphics.text"
version = "0.1.0"
path = "../../../yeho/packages/graphics/text"

[[dependencies]]
package = "host.ui_services"
version = "0.1.0"
path = "../../../yeho/packages/host/ui_services"

[[dependencies]]
package = "ui"
version = "0.2.0"
path = "../../../yeho/packages/ui"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/ui--yuiTextEditState/method-DeleteAdjacent-27 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiTextEditState.CommitComposition

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Commit composition.
yuiTextEditState instance = yuiTextEditState("value", yuiGraphemeMap(1, "example"), 1, true, "clipboard Hook")
yuiCompositionEvent argument_event = yuiCompositionEvent("phase", 1, 1, "value", "example")
text argument_resultValue = "argument result Value"
yuiGraphemeMap argument_resultMap = yuiGraphemeMap(1, "example")
int argument_resultCaret = 1
text argument_undoGroup = "argument undo Group"
bool result = instance.CommitComposition(argument_event, argument_resultValue, argument_resultMap, argument_resultCaret, argument_undoGroup)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuitexteditstate"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "graphics.image"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image"

[[dependencies]]
package = "graphics.text"
version = "0.1.0"
path = "../../../yeho/packages/graphics/text"

[[dependencies]]
package = "host.ui_services"
version = "0.1.0"
path = "../../../yeho/packages/host/ui_services"

[[dependencies]]
package = "ui"
version = "0.2.0"
path = "../../../yeho/packages/ui"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/ui--yuiTextEditState/method-CommitComposition-28 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiTextEditState.CancelComposition

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Cancel composition.
yuiTextEditState instance = yuiTextEditState("value", yuiGraphemeMap(1, "example"), 1, true, "clipboard Hook")
yuiCompositionEvent argument_event = yuiCompositionEvent("phase", 1, 1, "value", "example")
bool result = instance.CancelComposition(argument_event)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuitexteditstate"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "graphics.image"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image"

[[dependencies]]
package = "graphics.text"
version = "0.1.0"
path = "../../../yeho/packages/graphics/text"

[[dependencies]]
package = "host.ui_services"
version = "0.1.0"
path = "../../../yeho/packages/host/ui_services"

[[dependencies]]
package = "ui"
version = "0.2.0"
path = "../../../yeho/packages/ui"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/ui--yuiTextEditState/method-CancelComposition-29 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiTextEditState.Clipboard

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Clipboard.
yuiTextEditState instance = yuiTextEditState("value", yuiGraphemeMap(1, "example"), 1, true, "clipboard Hook")
text argument_operation = "argument operation"
yuiClipboardRequest result = instance.Clipboard(argument_operation)
Console.Log("Inspect result in your debugger")

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuitexteditstate"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "graphics.image"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image"

[[dependencies]]
package = "graphics.text"
version = "0.1.0"
path = "../../../yeho/packages/graphics/text"

[[dependencies]]
package = "host.ui_services"
version = "0.1.0"
path = "../../../yeho/packages/host/ui_services"

[[dependencies]]
package = "ui"
version = "0.2.0"
path = "../../../yeho/packages/ui"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/ui--yuiTextEditState/method-Clipboard-30 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiTextEditState.ApplyClipboardResult

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Apply clipboard result.
yuiTextEditState instance = yuiTextEditState("value", yuiGraphemeMap(1, "example"), 1, true, "clipboard Hook")
yuiClipboardRequest argument_request = yuiClipboardRequest("operation", "hook", "value", 1, 1, 1)
text argument_clipboardValue = "argument clipboard Value"
text argument_nextUndoGroup = "argument next Undo Group"
bool result = instance.ApplyClipboardResult(argument_request, argument_clipboardValue, argument_nextUndoGroup)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuitexteditstate"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "graphics.image"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image"

[[dependencies]]
package = "graphics.text"
version = "0.1.0"
path = "../../../yeho/packages/graphics/text"

[[dependencies]]
package = "host.ui_services"
version = "0.1.0"
path = "../../../yeho/packages/host/ui_services"

[[dependencies]]
package = "ui"
version = "0.2.0"
path = "../../../yeho/packages/ui"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/ui--yuiTextEditState/method-ApplyClipboardResult-31 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiTextEditState.RenderReport

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Render report.
yuiTextEditState instance = yuiTextEditState("value", yuiGraphemeMap(1, "example"), 1, true, "clipboard Hook")
text result = instance.RenderReport()
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuitexteditstate"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "graphics.image"
version = "0.1.0"
path = "../../../yeho/packages/graphics/image"

[[dependencies]]
package = "graphics.text"
version = "0.1.0"
path = "../../../yeho/packages/graphics/text"

[[dependencies]]
package = "host.ui_services"
version = "0.1.0"
path = "../../../yeho/packages/host/ui_services"

[[dependencies]]
package = "ui"
version = "0.2.0"
path = "../../../yeho/packages/ui"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/ui--yuiTextEditState/method-RenderReport-32 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


Package presence and a declaration do not establish support on every host. Host services need their platform and lifecycle setup.

Source: yeho/packages/ui/text-definitions.yh

AI training permission: https://demonhunterlabs.com/ai-use
