api

package
v0.1.47 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 7, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmptyModifier = ui.EmptyModifier

Deprecated: use ui.EmptyModifier

Functions

This section is empty.

Types

type Composable

type Composable func(Composer) Composer

type Composition = func(Composable) Composable

type Composer

type Composer interface {
	// --
	GetID() Identifier
	GetPath() NodePath

	modifier.ModifierAwareComposer

	// -- Composition Locals
	StartProviders(values []ProvidedValue) Composer
	EndProviders() Composer
	Consume(key interface{}) interface{}

	// -- id management
	GenerateID() Identifier

	EmitSlot(k string, v any) Composer

	TreeBuilderComposer
	GioLayoutNodeAwareComposer

	state.SupportState

	WithComposable(composable Composable) Composer

	If(condition bool, ifTrue Composable, ifFalse Composable) Composable
	When(condition bool, ifTrue Composable) Composable
	Else(condition bool, ifFalse Composable) Composable

	Sequence(contents ...Composable) Composable

	// Control Flow
	Key(key any, content Composable) Composable
	Range(count int, fn func(int) Composable) Composable
}

Public API of the composer

type GioLayoutNodeAwareComposer

type GioLayoutNodeAwareComposer interface {
	SetWidgetConstructor(constructor layoutnode.LayoutNodeWidgetConstructor)
}

type Identifier

type Identifier = idApi.Identifier

compose-identifier.api.Identifier

type LayoutNode

type LayoutNode = layoutnode.LayoutNode

type MutableValue

type MutableValue = state.MutableValue

type NodePath

type NodePath = node.NodePath

type ProvidedValue

type ProvidedValue struct {
	CompositionLocal interface{}
	Value            interface{}
}

ProvidedValue pairs a CompositionLocal with a value.

type TreeBuilderComposer

type TreeBuilderComposer interface {
	StartBlock(key string) Composer
	EndBlock() Composer
	Build() LayoutNode
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL