# yuiCoreControlSpec

A yui core control spec record carrying kind, authoringTag, metadata, interactive, focusable, 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 yuiCoreControlSpec
```

- text kind: Stores kind as text.
- text authoringTag: Stores authoring tag as text.
- yuiComponentMetadata metadata: Stores metadata as yuiComponentMetadata.
- bool interactive: Stores interactive as bool.
- bool focusable: Stores focusable as bool.
- text keyboardContract: Stores keyboard contract as text.
- text pointerContract: Stores pointer contract as text.
- text accessibilityRole: Stores accessibility role as text.
- text accessibilityActions: Stores accessibility actions as text.
- text valueModel: Stores value model as text.
- text layoutBehavior: Stores layout behavior as text.
- text slots: Stores slots as text.
- text applicableStates: Stores applicable states as text.
- list of yuiCoreControlStateStyle stateStyles: Stores state styles as list of yuiCoreControlStateStyle.
- text source: Stores source as text.
- yuiCoreControlSpec(text kind, text authoringTag, yuiComponentMetadata metadata, bool interactive, bool focusable, text keyboardContract, text pointerContract, text accessibilityRole, text accessibilityActions, text valueModel, text layoutBehavior, text slots, text applicableStates, text source): Yui core control spec.
- StateIndex(text state) returns int: State index.
- SupportsState(text state) returns bool: Supports state.
- AddStateStyle(yuiCoreControlStateStyle style) returns bool: Add state style.
- ResolveState(text state) returns yuiCoreControlStateStyle: Resolve state.
- ValidationIssue() returns text: Validation issue.
- ValidateTheme(yuiThemeDefinition theme) returns text: Validate theme.
- RenderReport() returns text: Render report.

## Use yuiCoreControlSpec

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.
yuiCoreControlSpec sample = yuiCoreControlSpec("kind", "authoring Tag", yuiComponentMetadata("Nova", "role", "property Schema", "child Rule", "defaults", "example", "design Label", true), true, true, "keyboard Contract", "pointer Contract", "accessibility Role", "accessibility Actions", "value Model", "layout Behavior", "slots", "applicable States", "example")
Console.Log(Text.From(sample.kind))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuicorecontrolspec"
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--yuiCoreControlSpec/usage --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiCoreControlSpec.StateIndex

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// State index.
yuiCoreControlSpec instance = yuiCoreControlSpec("kind", "authoring Tag", yuiComponentMetadata("Nova", "role", "property Schema", "child Rule", "defaults", "example", "design Label", true), true, true, "keyboard Contract", "pointer Contract", "accessibility Role", "accessibility Actions", "value Model", "layout Behavior", "slots", "applicable States", "example")
text argument_state = "argument state"
int result = instance.StateIndex(argument_state)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuicorecontrolspec"
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--yuiCoreControlSpec/method-StateIndex-16 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiCoreControlSpec.SupportsState

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Supports state.
yuiCoreControlSpec instance = yuiCoreControlSpec("kind", "authoring Tag", yuiComponentMetadata("Nova", "role", "property Schema", "child Rule", "defaults", "example", "design Label", true), true, true, "keyboard Contract", "pointer Contract", "accessibility Role", "accessibility Actions", "value Model", "layout Behavior", "slots", "applicable States", "example")
text argument_state = "argument state"
bool result = instance.SupportsState(argument_state)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuicorecontrolspec"
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--yuiCoreControlSpec/method-SupportsState-17 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiCoreControlSpec.AddStateStyle

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Add state style.
yuiCoreControlSpec instance = yuiCoreControlSpec("kind", "authoring Tag", yuiComponentMetadata("Nova", "role", "property Schema", "child Rule", "defaults", "example", "design Label", true), true, true, "keyboard Contract", "pointer Contract", "accessibility Role", "accessibility Actions", "value Model", "layout Behavior", "slots", "applicable States", "example")
yuiCoreControlStateStyle argument_style = yuiCoreControlStateStyle("state", "fill Role", "border Role", "content Role", "icon Role", "non Color Cue", "motion Role", 1)
bool result = instance.AddStateStyle(argument_style)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuicorecontrolspec"
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--yuiCoreControlSpec/method-AddStateStyle-18 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiCoreControlSpec.ResolveState

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Resolve state.
yuiCoreControlSpec instance = yuiCoreControlSpec("kind", "authoring Tag", yuiComponentMetadata("Nova", "role", "property Schema", "child Rule", "defaults", "example", "design Label", true), true, true, "keyboard Contract", "pointer Contract", "accessibility Role", "accessibility Actions", "value Model", "layout Behavior", "slots", "applicable States", "example")
text argument_state = "argument state"
yuiCoreControlStateStyle result = instance.ResolveState(argument_state)
Console.Log("Inspect result in your debugger")

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuicorecontrolspec"
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--yuiCoreControlSpec/method-ResolveState-19 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiCoreControlSpec.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.
yuiCoreControlSpec instance = yuiCoreControlSpec("kind", "authoring Tag", yuiComponentMetadata("Nova", "role", "property Schema", "child Rule", "defaults", "example", "design Label", true), true, true, "keyboard Contract", "pointer Contract", "accessibility Role", "accessibility Actions", "value Model", "layout Behavior", "slots", "applicable States", "example")
text result = instance.ValidationIssue()
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuicorecontrolspec"
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--yuiCoreControlSpec/method-ValidationIssue-20 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiCoreControlSpec.ValidateTheme

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using ui

// Validate theme.
yuiCoreControlSpec instance = yuiCoreControlSpec("kind", "authoring Tag", yuiComponentMetadata("Nova", "role", "property Schema", "child Rule", "defaults", "example", "design Label", true), true, true, "keyboard Contract", "pointer Contract", "accessibility Role", "accessibility Actions", "value Model", "layout Behavior", "slots", "applicable States", "example")
yuiThemeDefinition argument_theme = yuiThemeDefinition("id", "display Name", "mode", "example")
text result = instance.ValidateTheme(argument_theme)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuicorecontrolspec"
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--yuiCoreControlSpec/method-ValidateTheme-21 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## yuiCoreControlSpec.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.
yuiCoreControlSpec instance = yuiCoreControlSpec("kind", "authoring Tag", yuiComponentMetadata("Nova", "role", "property Schema", "child Rule", "defaults", "example", "design Label", true), true, true, "keyboard Contract", "pointer Contract", "accessibility Role", "accessibility Actions", "value Model", "layout Behavior", "slots", "applicable States", "example")
text result = instance.RenderReport()
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.ui__yuicorecontrolspec"
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--yuiCoreControlSpec/method-RenderReport-22 --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/controls-00-definitions.yh

AI training permission: https://demonhunterlabs.com/ai-use
