tviewutil

package
v0.0.0-...-52a80d5 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2021 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateNecessaryHeight

func CalculateNecessaryHeight(width int, text string) int

CalculateNecessaryHeight calculates the necessary height in the ui given the text and the width of the component the text will appear in.

func ColorToHex

func ColorToHex(color tcell.Color) string

ColorToHex converts the tcell.Color to it's hexadecimal presentation and returns it as a string prepended with a # character.

func CreateCenteredComponent

func CreateCenteredComponent(component tview.Primitive, width int) tview.Primitive

func CreateFocusTextViewOnTypeInputHandler

func CreateFocusTextViewOnTypeInputHandler(app *tview.Application, component *tview.TextView) func(event *tcell.EventKey) *tcell.EventKey

func Escape

func Escape(text string) string

Escape delegates to tview escape, optionally doing additional escaping.

func FocusNextIfPossible

func FocusNextIfPossible(direction tview.FocusDirection, app *tview.Application, focused tview.Primitive)

func GetNodeByReference

func GetNodeByReference(reference interface{}, tree *tview.TreeView) *tview.TreeNode

GetNodeByReference returns the first matched node where the given reference is equal. If no node with a matching reference exists, the return value is nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

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