ui

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package ui bundles the per-program rendering context — theme, key scheme, and glyph set. A Scope is immutable after construction; to change appearance, build a new Scope and swap the pointer. There is no process state to install: components read the Scope they are handed.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Scope

type Scope struct {
	Theme  theme.Theme
	Keys   keys.Scheme
	Glyphs glyph.Set
}

Scope is one program's rendering context.

func Default

func Default() *Scope

Default returns a Scope over the built-in defaults: the default theme and scheme, and the glyph set for the default mode (the one piece of process state left, by design — see glyph.SetMode).

func (*Scope) Bullet

func (s *Scope) Bullet(msg string) string

Bullet renders an accent-colored bullet followed by msg.

func (*Scope) Success

func (s *Scope) Success(msg string) string

Success renders a success-colored check followed by msg.

Jump to

Keyboard shortcuts

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