body

package
v0.0.0-...-3dfb106 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package body provides all structs and functions used to define how scale looks and works.

Index

Constants

View Source
const (
	None      = -1
	Black     = 0
	Red       = 1
	Green     = 2
	Yellow    = 3
	Blue      = 4
	Violet    = 5
	Cyan      = 6
	LightGray = 7
	DarkGray  = 8
	White     = 15
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Color

type Color struct {
	FG int
	BG int
}

Color gathers both FG and BG color codes

func (Color) Render

func (color Color) Render(buffer *bytes.Buffer)

Render handles the magic-terminal sequence for changing color for FG and BG (if set)

type Mark

type Mark struct {
	Content rune
	FG      int
}

func (Mark) Render

func (mark Mark) Render(buffer *bytes.Buffer)

type RenderFunc

type RenderFunc func(*bytes.Buffer)

type Scale

type Scale struct {
	IsVisible  bool
	Color      Color
	RenderImpl RenderFunc
}

func (Scale) Render

func (scale Scale) Render(out chan<- string)

Directories

Path Synopsis
scale
vcs

Jump to

Keyboard shortcuts

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