# yuiLayoutEngine

A yui layout engine record carrying items, measured, arranged, scalePercent, measuredReady, 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 yuiLayoutEngine
```

- list of yuiLayoutItem items: Stores items as list of yuiLayoutItem.
- list of yuiMeasuredLayout measured: Stores measured as list of yuiMeasuredLayout.
- list of yuiArrangedLayout arranged: Stores arranged as list of yuiArrangedLayout.
- int scalePercent: Stores scale percent as int.
- bool measuredReady: Stores measured ready as bool.
- bool arrangedReady: Stores arranged ready as bool.
- text diagnostic: Stores diagnostic as text.
- yuiLayoutEngine(): Yui layout engine.
- ItemIndex(text id) returns int: Item index.
- AddItem(yuiLayoutItem item) returns bool: Add item.
- ChildCount(text parentId) returns int: Child count.
- MeasureLeaf(int index) returns yuiLayoutSize: Measure leaf.
- MeasureRow(int index) returns yuiLayoutSize: Measure row.
- MeasureColumn(int index) returns yuiLayoutSize: Measure column.
- MeasureOverlay(int index) returns yuiLayoutSize: Measure overlay.
- MeasureNode(int index) returns yuiLayoutSize: Measure node.
- MeasureLayout(yuiLayoutConstraints constraints) returns bool: Measure layout.
- InnerRect(int index) returns yuiLayoutRect: Inner rect.
- ChildClip(int index, yuiLayoutRect inner) returns yuiLayoutRect: Child clip.
- ArrangeRowChildren(int index): Arrange row children.
- ArrangeColumnChildren(int index): Arrange column children.
- ArrangeOverlayChildren(int index): Arrange overlay children.
- ArrangeLayout(yuiLayoutRect rootRect) returns bool: Arrange layout.
- HitTest(yuiTree tree, int x, int y) returns text: Hit test.
- ValidateAgainstTree(yuiTree tree) returns bool: Validate against tree.
- RenderMeasureReport() returns text: Render measure report.
- RenderArrangeReport() returns text: Render arrange report.

## Use yuiLayoutEngine

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.
yuiLayoutEngine sample = yuiLayoutEngine()
Console.Log(Text.From(sample.scalePercent))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuilayoutengine"
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--yuiLayoutEngine/usage --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiLayoutEngine.ItemIndex

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Item index.
yuiLayoutEngine instance = yuiLayoutEngine()
text argument_id = "argument id"
int result = instance.ItemIndex(argument_id)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuilayoutengine"
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--yuiLayoutEngine/method-ItemIndex-8 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiLayoutEngine.AddItem

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Add item.
yuiLayoutEngine instance = yuiLayoutEngine()
yuiLayoutItem argument_item = yuiLayoutItem("id", "parent Id", "kind", "example", 1, 1)
bool result = instance.AddItem(argument_item)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuilayoutengine"
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--yuiLayoutEngine/method-AddItem-9 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiLayoutEngine.ChildCount

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Child count.
yuiLayoutEngine instance = yuiLayoutEngine()
text argument_parentId = "argument parent Id"
int result = instance.ChildCount(argument_parentId)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuilayoutengine"
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--yuiLayoutEngine/method-ChildCount-10 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiLayoutEngine.MeasureLeaf

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Measure leaf.
yuiLayoutEngine instance = yuiLayoutEngine()
int argument_index = 1
yuiLayoutSize result = instance.MeasureLeaf(argument_index)
Console.Log("Inspect result in your debugger")

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuilayoutengine"
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--yuiLayoutEngine/method-MeasureLeaf-11 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiLayoutEngine.MeasureRow

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Measure row.
yuiLayoutEngine instance = yuiLayoutEngine()
int argument_index = 1
yuiLayoutSize result = instance.MeasureRow(argument_index)
Console.Log("Inspect result in your debugger")

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuilayoutengine"
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--yuiLayoutEngine/method-MeasureRow-12 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiLayoutEngine.MeasureColumn

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Measure column.
yuiLayoutEngine instance = yuiLayoutEngine()
int argument_index = 1
yuiLayoutSize result = instance.MeasureColumn(argument_index)
Console.Log("Inspect result in your debugger")

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuilayoutengine"
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--yuiLayoutEngine/method-MeasureColumn-13 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiLayoutEngine.MeasureOverlay

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Measure overlay.
yuiLayoutEngine instance = yuiLayoutEngine()
int argument_index = 1
yuiLayoutSize result = instance.MeasureOverlay(argument_index)
Console.Log("Inspect result in your debugger")

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuilayoutengine"
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--yuiLayoutEngine/method-MeasureOverlay-14 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiLayoutEngine.MeasureNode

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Measure node.
yuiLayoutEngine instance = yuiLayoutEngine()
int argument_index = 1
yuiLayoutSize result = instance.MeasureNode(argument_index)
Console.Log("Inspect result in your debugger")

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuilayoutengine"
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--yuiLayoutEngine/method-MeasureNode-15 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiLayoutEngine.MeasureLayout

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Measure layout.
yuiLayoutEngine instance = yuiLayoutEngine()
yuiLayoutConstraints argument_constraints = yuiLayoutConstraints(1, 1, 1, 1, 1, "example")
bool result = instance.MeasureLayout(argument_constraints)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuilayoutengine"
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--yuiLayoutEngine/method-MeasureLayout-16 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiLayoutEngine.InnerRect

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Inner rect.
yuiLayoutEngine instance = yuiLayoutEngine()
int argument_index = 1
yuiLayoutRect result = instance.InnerRect(argument_index)
Console.Log("Inspect result in your debugger")

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuilayoutengine"
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--yuiLayoutEngine/method-InnerRect-17 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiLayoutEngine.ChildClip

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Child clip.
yuiLayoutEngine instance = yuiLayoutEngine()
int argument_index = 1
yuiLayoutRect argument_inner = yuiLayoutRect(1, 1, 1, 1)
yuiLayoutRect result = instance.ChildClip(argument_index, argument_inner)
Console.Log("Inspect result in your debugger")

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuilayoutengine"
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--yuiLayoutEngine/method-ChildClip-18 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiLayoutEngine.ArrangeRowChildren

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Arrange row children.
yuiLayoutEngine instance = yuiLayoutEngine()
int argument_index = 1
instance.ArrangeRowChildren(argument_index)
Console.Log("ArrangeRowChildren completed")

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuilayoutengine"
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--yuiLayoutEngine/method-ArrangeRowChildren-19 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiLayoutEngine.ArrangeColumnChildren

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Arrange column children.
yuiLayoutEngine instance = yuiLayoutEngine()
int argument_index = 1
instance.ArrangeColumnChildren(argument_index)
Console.Log("ArrangeColumnChildren completed")

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuilayoutengine"
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--yuiLayoutEngine/method-ArrangeColumnChildren-20 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiLayoutEngine.ArrangeOverlayChildren

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Arrange overlay children.
yuiLayoutEngine instance = yuiLayoutEngine()
int argument_index = 1
instance.ArrangeOverlayChildren(argument_index)
Console.Log("ArrangeOverlayChildren completed")

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuilayoutengine"
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--yuiLayoutEngine/method-ArrangeOverlayChildren-21 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiLayoutEngine.ArrangeLayout

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Arrange layout.
yuiLayoutEngine instance = yuiLayoutEngine()
yuiLayoutRect argument_rootRect = yuiLayoutRect(1, 1, 1, 1)
bool result = instance.ArrangeLayout(argument_rootRect)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuilayoutengine"
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--yuiLayoutEngine/method-ArrangeLayout-22 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiLayoutEngine.HitTest

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Hit test.
yuiLayoutEngine instance = yuiLayoutEngine()
yuiTree argument_tree = yuiTree("id")
int argument_x = 1
int argument_y = 1
text result = instance.HitTest(argument_tree, argument_x, argument_y)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuilayoutengine"
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--yuiLayoutEngine/method-HitTest-23 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiLayoutEngine.ValidateAgainstTree

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Validate against tree.
yuiLayoutEngine instance = yuiLayoutEngine()
yuiTree argument_tree = yuiTree("id")
bool result = instance.ValidateAgainstTree(argument_tree)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuilayoutengine"
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--yuiLayoutEngine/method-ValidateAgainstTree-24 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiLayoutEngine.RenderMeasureReport

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Render measure report.
yuiLayoutEngine instance = yuiLayoutEngine()
text result = instance.RenderMeasureReport()
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuilayoutengine"
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--yuiLayoutEngine/method-RenderMeasureReport-25 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiLayoutEngine.RenderArrangeReport

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Render arrange report.
yuiLayoutEngine instance = yuiLayoutEngine()
text result = instance.RenderArrangeReport()
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuilayoutengine"
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--yuiLayoutEngine/method-RenderArrangeReport-26 --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/layout-engine.yh

AI training permission: https://demonhunterlabs.com/ai-use
