# yuiFocusModel

A yui focus model record carrying entries, scopes, focusedNodeId, previousFocusedNodeId, activeScopeId, 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 yuiFocusModel
```

- list of yuiFocusEntry entries: Stores entries as list of yuiFocusEntry.
- list of yuiFocusScope scopes: Stores scopes as list of yuiFocusScope.
- text focusedNodeId: Stores focused node id as text.
- text previousFocusedNodeId: Stores previous focused node id as text.
- text activeScopeId: Stores active scope id as text.
- bool focusVisible: Stores focus visible as bool.
- text diagnostic: Stores diagnostic as text.
- yuiFocusModel(): Yui focus model.
- EntryIndex(text nodeId) returns int: Entry index.
- ScopeIndex(text scopeId) returns int: Scope index.
- AddEntry(yuiFocusEntry entry) returns bool: Add entry.
- AddScope(yuiFocusScope scope) returns bool: Add scope.
- EntryAvailable(yuiTree tree, int index) returns bool: Entry available.
- SetFocus(yuiTree tree, text nodeId, bool keyboardVisible) returns bool: Set focus.
- ClearFocus(): Clear focus.
- Reconcile(yuiTree tree): Reconcile.
- CandidateAfter(yuiTree tree, int currentIndex, int direction) returns int: Candidate after.
- BoundaryCandidate(yuiTree tree, int direction) returns int: Boundary candidate.
- ActiveScopeWraps() returns bool: Active scope wraps.
- MoveTab(yuiTree tree, int direction) returns bool: Move tab.
- DirectionCandidate(yuiTree tree, text direction) returns int: Direction candidate.
- MoveDirection(yuiTree tree, text direction) returns bool: Move direction.
- EnterScope(yuiTree tree, text scopeId) returns bool: Enter scope.
- LeaveScope(yuiTree tree) returns bool: Leave scope.
- HandleEscape(yuiTree tree) returns bool: Handle escape.
- RenderFocusReport() returns text: Render focus report.

## Use yuiFocusModel

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.
yuiFocusModel sample = yuiFocusModel()
Console.Log(Text.From(sample.focusedNodeId))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuifocusmodel"
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--yuiFocusModel/usage --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiFocusModel.EntryIndex

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Entry index.
yuiFocusModel instance = yuiFocusModel()
text argument_nodeId = "argument node Id"
int result = instance.EntryIndex(argument_nodeId)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuifocusmodel"
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--yuiFocusModel/method-EntryIndex-8 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiFocusModel.ScopeIndex

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Scope index.
yuiFocusModel instance = yuiFocusModel()
text argument_scopeId = "argument scope Id"
int result = instance.ScopeIndex(argument_scopeId)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuifocusmodel"
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--yuiFocusModel/method-ScopeIndex-9 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiFocusModel.AddEntry

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Add entry.
yuiFocusModel instance = yuiFocusModel()
yuiFocusEntry argument_entry = yuiFocusEntry("node Id", "scope Id", 1, 1, 1, 1, 1, true)
bool result = instance.AddEntry(argument_entry)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuifocusmodel"
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--yuiFocusModel/method-AddEntry-10 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiFocusModel.AddScope

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Add scope.
yuiFocusModel instance = yuiFocusModel()
yuiFocusScope argument_scope = yuiFocusScope("id", "root Node Id", true, true)
bool result = instance.AddScope(argument_scope)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuifocusmodel"
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--yuiFocusModel/method-AddScope-11 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiFocusModel.EntryAvailable

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Entry available.
yuiFocusModel instance = yuiFocusModel()
yuiTree argument_tree = yuiTree("id")
int argument_index = 1
bool result = instance.EntryAvailable(argument_tree, argument_index)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuifocusmodel"
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--yuiFocusModel/method-EntryAvailable-12 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiFocusModel.SetFocus

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Set focus.
yuiFocusModel instance = yuiFocusModel()
yuiTree argument_tree = yuiTree("id")
text argument_nodeId = "argument node Id"
bool argument_keyboardVisible = true
bool result = instance.SetFocus(argument_tree, argument_nodeId, argument_keyboardVisible)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuifocusmodel"
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--yuiFocusModel/method-SetFocus-13 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiFocusModel.ClearFocus

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Clear focus.
yuiFocusModel instance = yuiFocusModel()
instance.ClearFocus()
Console.Log("ClearFocus completed")

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuifocusmodel"
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--yuiFocusModel/method-ClearFocus-14 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiFocusModel.Reconcile

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Reconcile.
yuiFocusModel instance = yuiFocusModel()
yuiTree argument_tree = yuiTree("id")
instance.Reconcile(argument_tree)
Console.Log("Reconcile completed")

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuifocusmodel"
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--yuiFocusModel/method-Reconcile-15 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiFocusModel.CandidateAfter

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Candidate after.
yuiFocusModel instance = yuiFocusModel()
yuiTree argument_tree = yuiTree("id")
int argument_currentIndex = 1
int argument_direction = 1
int result = instance.CandidateAfter(argument_tree, argument_currentIndex, argument_direction)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuifocusmodel"
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--yuiFocusModel/method-CandidateAfter-16 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiFocusModel.BoundaryCandidate

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Boundary candidate.
yuiFocusModel instance = yuiFocusModel()
yuiTree argument_tree = yuiTree("id")
int argument_direction = 1
int result = instance.BoundaryCandidate(argument_tree, argument_direction)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuifocusmodel"
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--yuiFocusModel/method-BoundaryCandidate-17 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiFocusModel.ActiveScopeWraps

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Active scope wraps.
yuiFocusModel instance = yuiFocusModel()
bool result = instance.ActiveScopeWraps()
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuifocusmodel"
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--yuiFocusModel/method-ActiveScopeWraps-18 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiFocusModel.MoveTab

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Move tab.
yuiFocusModel instance = yuiFocusModel()
yuiTree argument_tree = yuiTree("id")
int argument_direction = 1
bool result = instance.MoveTab(argument_tree, argument_direction)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuifocusmodel"
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--yuiFocusModel/method-MoveTab-19 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiFocusModel.DirectionCandidate

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Direction candidate.
yuiFocusModel instance = yuiFocusModel()
yuiTree argument_tree = yuiTree("id")
text argument_direction = "argument direction"
int result = instance.DirectionCandidate(argument_tree, argument_direction)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuifocusmodel"
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--yuiFocusModel/method-DirectionCandidate-20 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiFocusModel.MoveDirection

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Move direction.
yuiFocusModel instance = yuiFocusModel()
yuiTree argument_tree = yuiTree("id")
text argument_direction = "argument direction"
bool result = instance.MoveDirection(argument_tree, argument_direction)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuifocusmodel"
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--yuiFocusModel/method-MoveDirection-21 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiFocusModel.EnterScope

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Enter scope.
yuiFocusModel instance = yuiFocusModel()
yuiTree argument_tree = yuiTree("id")
text argument_scopeId = "argument scope Id"
bool result = instance.EnterScope(argument_tree, argument_scopeId)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuifocusmodel"
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--yuiFocusModel/method-EnterScope-22 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiFocusModel.LeaveScope

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Leave scope.
yuiFocusModel instance = yuiFocusModel()
yuiTree argument_tree = yuiTree("id")
bool result = instance.LeaveScope(argument_tree)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuifocusmodel"
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--yuiFocusModel/method-LeaveScope-23 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiFocusModel.HandleEscape

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Handle escape.
yuiFocusModel instance = yuiFocusModel()
yuiTree argument_tree = yuiTree("id")
bool result = instance.HandleEscape(argument_tree)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuifocusmodel"
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--yuiFocusModel/method-HandleEscape-24 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiFocusModel.RenderFocusReport

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Render focus report.
yuiFocusModel instance = yuiFocusModel()
text result = instance.RenderFocusReport()
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuifocusmodel"
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--yuiFocusModel/method-RenderFocusReport-25 --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/interaction-focus.yh

AI training permission: https://demonhunterlabs.com/ai-use
