painter

package
v0.0.0-...-ea1f8f4 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2018 License: MIT Imports: 5 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ColorMode

type ColorMode struct {
	Bg      termbox.Attribute
	TimerFG termbox.Attribute
	TextFG  termbox.Attribute
}

ColorMode defines the color scheme of a painter

type Painter

type Painter struct {
	// contains filtered or unexported fields
}

Painter draw a timer using termbox

func NewPainter

func NewPainter(state *state.State, m string, debug bool) *Painter

NewPainter create a new painter based on a state, the color mode and the debug mode

func (*Painter) Close

func (p *Painter) Close()

Close the painter

func (*Painter) Draw

func (p *Painter) Draw()

draw the timer and the bottom message if the debug mode is enabled also draw the debug mode

func (*Painter) Init

func (p *Painter) Init()

Init the painter by initialising termbox

Jump to

Keyboard shortcuts

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