console

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2019 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxRenderInterval = 1000 * time.Millisecond
	MinRenderInterval = 100 * time.Millisecond
	ColumnsCount      = 80
	RowsCount         = 40
	AppTitle          = "sampler"
	AppVersion        = "1.1.0"
)
View Source
const (
	ColorOlive       ui.Color = 178
	ColorDeepSkyBlue ui.Color = 39
	ColorDeepPink    ui.Color = 198
	ColorCian        ui.Color = 43
	ColorOrange      ui.Color = 166
	ColorPurple      ui.Color = 129
	ColorGreen       ui.Color = 64
	ColorDarkRed     ui.Color = 88
	ColorBlueViolet  ui.Color = 57
	ColorDarkGrey    ui.Color = 238
	ColorLightGrey   ui.Color = 254
	ColorGrey        ui.Color = 242
	ColorWhite       ui.Color = 15
	ColorBlack       ui.Color = 0
	ColorClear       ui.Color = -1
)
View Source
const (
	SignalResize = "<Resize>"
	SignalClick  = "<MouseLeft>"
)
View Source
const (
	KeyPause1 = "p"
	KeyPause2 = "P"
	KeyQuit1  = "q"
	KeyQuit2  = "Q"
	KeyQuit3  = "<C-c>"
	KeyLeft   = "<Left>"
	KeyRight  = "<Right>"
	KeyUp     = "<Up>"
	KeyDown   = "<Down>"
	KeyEnter  = "<Enter>"
	KeyEsc    = "<Escape>"
)
View Source
const (
	SymbolSelection     rune = '▲'
	SymbolVerticalBar   rune = '▎'
	SymbolHorizontalBar rune = '═'
)
View Source
const (
	BellCharacter = "\a"
)

Variables

This section is empty.

Functions

func Close

func Close()

Close function calls Close from termui package, which closes termbox-go

func Exit

func Exit(message string)

Exit function exits the program successfully

func GetGradientColor

func GetGradientColor(gradient []ui.Color, cur int, max int) ui.Color

func GetMenuColor

func GetMenuColor() ui.Color

GetMenuColor returns a color based on the operating system target

func GetMenuColorReverse

func GetMenuColorReverse() ui.Color

GetMenuColorReverse returns a color based on the operating system target

func Init

func Init()

Types

type AsciiFont

type AsciiFont string
const (
	AsciiFont2D AsciiFont = "2d"
	AsciiFont3D AsciiFont = "3d"
)

type Palette

type Palette struct {
	ContentColors  []ui.Color
	GradientColors [][]ui.Color
	BaseColor      ui.Color
	MediumColor    ui.Color
	ReverseColor   ui.Color
}

func GetPalette

func GetPalette(theme Theme) Palette

GetPalette returns a color palette based on specified theme

type Theme

type Theme string
const (
	ThemeDark  Theme = "dark"
	ThemeLight Theme = "light"
)

Jump to

Keyboard shortcuts

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