span

package
v0.0.0-...-b5b2f04 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: Apache-2.0 Imports: 7 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Draw

func Draw(surface draw.Surface, text string, style draw.CellStyle)

func Layout

func Layout(co layout.Constraint, text string) geometry.Size

Types

type Option

type Option func(*Widget)

func WithStyle

func WithStyle(style widgets.Style) Option

WithStyle define span internal styles.Style.

type Widget

type Widget struct {
	*widgets.PanicWidget
	render.Cache[*styles.Renderable[*renderable]]
}

func New

func New(text string, options ...Option) *Widget

func (*Widget) Renderable

func (w *Widget) Renderable() render.Renderable

func (Widget) SetText

func (w Widget) SetText(txt string)

func (Widget) Text

func (w Widget) Text() string

Jump to

Keyboard shortcuts

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