Versions in this module Expand all Collapse all v1 v1.0.0 Jun 3, 2026 Changes in this version + const BOTTOM_LEFT + const BOTTOM_RIGHT + const BorderBottom + const BorderLeft + const BorderRight + const BorderTop + const BoxDrawingsDoubleDownAndHorizontal + const BoxDrawingsDoubleDownAndLeft + const BoxDrawingsDoubleDownAndRight + const BoxDrawingsDoubleHorizontal + const BoxDrawingsDoubleUpAndHorizontal + const BoxDrawingsDoubleUpAndLeft + const BoxDrawingsDoubleUpAndRight + const BoxDrawingsDoubleVertical + const BoxDrawingsDoubleVerticalAndLeft + const BoxDrawingsDoubleVerticalAndRight + const BoxDrawingsHeavyDownAndHorizontal + const BoxDrawingsHeavyDownAndLeft + const BoxDrawingsHeavyDownAndRight + const BoxDrawingsHeavyHorizontal + const BoxDrawingsHeavyUpAndHorizontal + const BoxDrawingsHeavyUpAndLeft + const BoxDrawingsHeavyUpAndRight + const BoxDrawingsHeavyVertical + const BoxDrawingsHeavyVerticalAndLeft + const BoxDrawingsHeavyVerticalAndRight + const BoxDrawingsLightArcDownAndLeft + const BoxDrawingsLightArcDownAndRight + const BoxDrawingsLightArcUpAndLeft + const BoxDrawingsLightArcUpAndRight + const BoxDrawingsLightDownAndHorizontal + const BoxDrawingsLightDownAndLeft + const BoxDrawingsLightDownAndRight + const BoxDrawingsLightHorizontal + const BoxDrawingsLightUpAndHorizontal + const BoxDrawingsLightUpAndLeft + const BoxDrawingsLightUpAndRight + const BoxDrawingsLightVertical + const BoxDrawingsLightVerticalAndHorizontal + const BoxDrawingsLightVerticalAndLeft + const BoxDrawingsLightVerticalAndRight + const COLLAPSED + const CROSS + const DOT + const DOWN_ARROW + const ELLIPSES + const EXPANDED + const GradientHorizontal + const GradientVertical + const HORIZONTAL_DASH + const HORIZONTAL_DOWN + const HORIZONTAL_LINE + const HORIZONTAL_UP + const QUOTA_LEFT + const QUOTA_RIGHT + const ROUNDED_BOTTOM_LEFT + const ROUNDED_BOTTOM_RIGHT + const ROUNDED_TOP_LEFT + const ROUNDED_TOP_RIGHT + const TOP_LEFT + const TOP_RIGHT + const UP_ARROW + const VERTICAL_DASH + const VERTICAL_LEFT + const VERTICAL_LINE + const VERTICAL_RIGHT + var BARS = [...]rune + var BRAILLE = [4][2]rune + var BRAILLE_OFFSET = '\u2800' + var CellClear = Cell + var DOUBLE_BRAILLE = map[[2]int]rune + var DefaultBackend = &Backend + var IRREGULAR_BLOCKS = [...]rune + var SHADED_BLOCKS = [...]rune + var SINGLE_BRAILLE_LEFT = [4]rune + var SINGLE_BRAILLE_RIGHT = [4]rune + var Screen tcell.Screen + var ScreenshotMode bool + var StandardColors = []Color + var StandardStyles = []Style + var StyleClear = Style + var StyleParserColorMap = map[string]Color + var Theme = RootTheme + func AbsInt(x int) int + func Capture(width, height int, items ...Drawable) *image.RGBA + func CellsToString(cells []Cell) string + func Clear() + func ClearBackground(c Color) + func Close() + func FloorFloat64(x float64) float64 + func GetMaxFloat64From2dSlice(slices [][]float64) (float64, error) + func GetMaxFloat64FromSlice(slice []float64) (float64, error) + func GetMaxIntFromSlice(slice []int) (int, error) + func Init() error + func InitWithConfig(cfg *InitConfig) error + func InterfaceSlice(slice any) []any + func MaxFloat64(x, y float64) float64 + func MaxInt(x, y int) int + func MinFloat64(x, y float64) float64 + func MinInt(x, y int) int + func PollEvents() <-chan Event + func PollEventsWithContext(ctx context.Context) <-chan Event + func Render(items ...Drawable) + func RenderBufferToImage(buf *Buffer) *image.RGBA + func ResolveBorderRune(existing, newRune rune) rune + func RoundFloat64(x float64) float64 + func SaveImage(path string, width, height int, items ...Drawable) error + func SplitCells(cells []Cell, r rune) [][]Cell + func SumFloat64Slice(data []float64) float64 + func SumIntSlice(slice []int) int + func TerminalDimensions() (int, int) + func TrimString(s string, w int) string + type Alignment uint + const AlignCenter + const AlignLeft + const AlignRight + type Application struct + Backend *Backend + func NewApp() *Application + func (a *Application) Run() error + func (a *Application) SetFocus(p Widget) + func (a *Application) SetRoot(root Widget, focus bool) + func (a *Application) Stop() + type Backend struct + Screen tcell.Screen + ScreenshotMode bool + func NewBackend(cfg *InitConfig) (*Backend, error) + func (b *Backend) Clear() + func (b *Backend) ClearBackground(c Color) + func (b *Backend) Close() + func (b *Backend) Init() error + func (b *Backend) InitWithConfig(cfg *InitConfig) error + func (b *Backend) PollEvents() <-chan Event + func (b *Backend) PollEventsWithContext(ctx context.Context) <-chan Event + func (b *Backend) Render(items ...Drawable) + func (b *Backend) TerminalDimensions() (int, int) + type BarChartTheme struct + Bars []Color + Labels []Style + Nums []Style + type Block struct + BackgroundColor Color + Border bool + BorderBottom bool + BorderCollapse bool + BorderGradient Gradient + BorderLeft bool + BorderRight bool + BorderRounded bool + BorderSet *BorderSet + BorderStyle Style + BorderTop bool + BorderType BorderType + FillBorder bool + Inner image.Rectangle + PaddingBottom int + PaddingLeft int + PaddingRight int + PaddingTop int + Title string + TitleAlignment Alignment + TitleBottom string + TitleBottomAlignment Alignment + TitleBottomLeft string + TitleBottomRight string + TitleBottomStyle Style + TitleLeft string + TitleRight string + TitleStyle Style + func NewBlock() *Block + func (b *Block) Draw(buf *Buffer) + func (b *Block) GetRect() image.Rectangle + func (b *Block) HandleEvent(e Event) bool + func (b *Block) SetRect(x1, y1, x2, y2 int) + type BlockTheme struct + Border Style + Title Style + type BorderSet struct + Bottom rune + BottomLeft rune + BottomRight rune + BottomT rune + Left rune + LeftT rune + Right rune + RightT rune + Top rune + TopLeft rune + TopRight rune + TopT rune + func BorderSetDouble() BorderSet + func BorderSetHidden() BorderSet + func BorderSetPlain() BorderSet + func BorderSetRound() BorderSet + func BorderSetThick() BorderSet + type BorderType int + const BorderBlock + const BorderDouble + const BorderLine + const BorderThick + type Borders uint + const BordersAll + const BordersBottom + const BordersLeft + const BordersNone + const BordersRight + const BordersTop + func (b Borders) Has(flag Borders) bool + type Buffer struct + Cells []Cell + func NewBuffer(r image.Rectangle) *Buffer + func (b *Buffer) Fill(c Cell, rect image.Rectangle) + func (b *Buffer) GetCell(p image.Point) Cell + func (b *Buffer) SetCell(c Cell, p image.Point) + func (b *Buffer) SetString(s string, style Style, p image.Point) + type Canvas struct + func NewCanvas() *Canvas + func (c *Canvas) Draw(buf *Buffer) + func (c *Canvas) SetLine(p0, p1 image.Point, color Color) + func (c *Canvas) SetPoint(p image.Point, color Color) + type Cell struct + Rune rune + Style Style + func ApplyGradientToText(text string, start, end Color) []Cell + func NewCell(rune rune, args ...any) Cell + func ParseStyles(s string, defaultStyle Style) []Cell + func RunesToStyledCells(runes []rune, style Style) []Cell + func TrimCells(cells []Cell, w int) []Cell + func WrapCells(cells []Cell, width uint) []Cell + type CellWithX struct + Cell Cell + X int + func BuildCellWithXArray(cells []Cell) []CellWithX + type Color = tcell.Color + const ColorAliceBlue + const ColorBeige + const ColorBlack + const ColorBlue + const ColorBrown + const ColorClear + const ColorCoral + const ColorCrimson + const ColorCyan + const ColorDarkBlue + const ColorDarkCyan + const ColorDarkGreen + const ColorDarkGrey + const ColorDarkRed + const ColorGold + const ColorGreen + const ColorGrey + const ColorHotPink + const ColorIndigo + const ColorLightBlue + const ColorLightCyan + const ColorLightGreen + const ColorLightGrey + const ColorLime + const ColorMagenta + const ColorMaroon + const ColorMintCream + const ColorMistyRose + const ColorNavy + const ColorOlive + const ColorOrange + const ColorOrchid + const ColorPink + const ColorPlum + const ColorPurple + const ColorRed + const ColorSalmon + const ColorSeaGreen + const ColorSilver + const ColorSkyBlue + const ColorSlateBlue + const ColorTan + const ColorTeal + const ColorTomato + const ColorTurquoise + const ColorViolet + const ColorWheat + const ColorWhite + const ColorYellow + func GenerateGradient(start, end Color, length int) []Color + func GenerateMultiGradient(length int, colors ...Color) []Color + func HexToColor(hex string) (Color, error) + func InterpolateColor(c1, c2 Color, step, steps int) Color + func NewColorRGB(r, g, b int32) Color + func NewRGBColor(r, g, b int32) Color + func SelectColor(colors []Color, index int) Color + type Drawable interface + Draw func(*Buffer) + GetRect func() image.Rectangle + SetRect func(int, int, int, int) + type Event struct + ID string + Payload any + Type EventType + type EventHandler interface + HandleEvent func(Event) bool + type EventType uint + const KeyboardEvent + const MouseEvent + const ResizeEvent + type GaugeTheme struct + Bar Color + Label Style + type Gradient struct + Direction int + Enabled bool + End Color + Start Color + Stops []Color + type Grid struct + Items []*GridItem + func NewGrid() *Grid + func (g *Grid) Draw(buf *Buffer) + func (g *Grid) Set(entries ...any) + type GridItem struct + Entry any + HeightRatio float64 + IsLeaf bool + Type gridItemType + WidthRatio float64 + XRatio float64 + YRatio float64 + func NewCol(ratio float64, i ...any) GridItem + func NewRow(ratio float64, i ...any) GridItem + type InitConfig struct + CustomTTY TTYHandle + Height int + SimulationMode bool + SimulationSize image.Point + Width int + type ListTheme struct + Text Style + type Modifier = tcell.AttrMask + const ModifierBlink + const ModifierBold + const ModifierClear + const ModifierDim + const ModifierItalic + const ModifierReverse + const ModifierStrike + type Mouse struct + Drag bool + X int + Y int + type ParagraphTheme struct + Text Style + type PieChartTheme struct + Slices []Color + type PlotTheme struct + Axes Color + Lines []Color + type Resize struct + Height int + Width int + type RootTheme struct + BarChart BarChartTheme + Block BlockTheme + Default Style + Gauge GaugeTheme + List ListTheme + Paragraph ParagraphTheme + PieChart PieChartTheme + Plot PlotTheme + Sparkline SparklineTheme + StackedBarChart StackedBarChartTheme + Tab TabTheme + Table TableTheme + Tree TreeTheme + type SparklineTheme struct + Line Color + Title Style + type StackedBarChartTheme struct + Bars []Color + Labels []Style + Nums []Style + type Style struct + Bg Color + Fg Color + Modifier Modifier + func NewStyle(fg Color, args ...any) Style + func SelectStyle(styles []Style, index int) Style + type TTYHandle interface + type TabTheme struct + Active Style + Inactive Style + type TableTheme struct + Text Style + type TreeTheme struct + Collapsed rune + Expanded rune + Text Style + type VerticalAlignment int + const AlignBottom + const AlignMiddle + const AlignTop + type Widget interface