cells

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpandCells

func ExpandCells(cells Cells, origin xy.Position, size xy.Size) []string

func GetOriginAndSize

func GetOriginAndSize(cells Cells) (origin xy.Position, size xy.Size)

Types

type Cell

type Cell interface {
	Char() rune
	Attributes() ansi.Attributes
	Flags() Flags
}

Single cell in a canvas

func NewCell

func NewCell(char rune, attributes ansi.Attributes, flags ...Flag) Cell

type Cells

type Cells map[xy.Position]Cell

type Flag

type Flag int
const (
	Line Flag = 0b1
)

func (Flag) String

func (f Flag) String() string

type Flags

type Flags int

func NewFlags

func NewFlags(flags ...Flag) Flags

func (Flags) Add

func (f Flags) Add(flag Flag) Flags

func (Flags) HasFlag

func (f Flags) HasFlag(flag Flag) bool

func (Flags) String

func (f Flags) String() string

type ModifyCells

type ModifyCells interface {
	// Get the cells (modifiable)
	GetCells() Cells
}

Jump to

Keyboard shortcuts

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