display

package
v0.0.0-...-e5986d6 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultStyleMap = map[rune]tcell.Style{

	'\x00': tcell.StyleDefault,

	'0': StyleDocument,

	'1': tcell.StyleDefault.
		Foreground(tcell.ColorBlue),

	'2': StyleUnsupported,

	'3': StyleUnsupported,

	'4': StyleUnsupported,

	'5': StyleUnsupported,

	'6': StyleUnsupported,

	'7': tcell.StyleDefault.
		Foreground(tcell.ColorYellow),

	'8': StyleUnsupported,

	'+': tcell.StyleDefault,

	'd': StyleDocument,

	'h': StyleDocument,

	'i': tcell.StyleDefault,

	'p': StyleUnsupported,

	'r': StyleDocument,

	'P': StyleDocument,

	'X': StyleDocument,
}
View Source
var StyleDocument = tcell.StyleDefault.Foreground(tcell.ColorGreen)
View Source
var StyleUnsupported = tcell.StyleDefault.Foreground(tcell.ColorGray)

Functions

func DisplayMenu

func DisplayMenu(
	s tcell.Screen,
	m menu.Menu,
	selectedIdx int,
	offset int,
	indent int,
	styleMap map[rune]tcell.Style,
) (distToTop int, distToBottom int)

func DrawTextWrap

func DrawTextWrap(s tcell.Screen, x1, y1, x2, y2 int, style tcell.Style, text string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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