tui

package
v0.0.41 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: GPL-3.0 Imports: 10 Imported by: 3

Documentation

Index

Constants

View Source
const (
	CYAN    = "#67eaf9::b"
	MAGENTA = "#ea67f9::b"
)

Variables

View Source
var CYAN_CELL_COLOR = tcell.NewRGBColor(CYAN_RGB.R(), CYAN_RGB.G(), CYAN_RGB.B())
View Source
var CYAN_RGB = RGB{103, 234, 249}
View Source
var MAGENTA_CELL_COLOR = tcell.NewRGBColor(MAGENTA_RGB.R(), MAGENTA_RGB.G(), MAGENTA_RGB.B())
View Source
var MAGENTA_RGB = RGB{234, 103, 249}

Functions

func BuildApplication

func BuildApplication(commitHistory []*model.Commit, version string) *tview.Application

func BuildCommitTable

func BuildCommitTable(commitHistory []*model.Commit) *tview.Table

func BuildDiffView

func BuildDiffView(originalText, newText *tview.TextView) *tview.Flex

func BuildSliceTreeNode

func BuildSliceTreeNode[T any](field reflect.Value, root *tview.TreeNode, obj any, label string)

func BuildTextView

func BuildTextView() *tview.TextView

func BuildTreeMapNode

func BuildTreeMapNode(field reflect.Value, root *tview.TreeNode)

func BuildTreeView

func BuildTreeView(commit *model.Commit) *tview.TreeView

func CreateNode

func CreateNode(name string, object any) *tview.TreeNode

func DigIntoObject

func DigIntoObject[T any](root, node *tview.TreeNode, field reflect.Value)

func RegisterModelsWithCommitTable

func RegisterModelsWithCommitTable(table *tview.Table,
	commitHistory []*model.Commit, treeView *tview.TreeView, app *tview.Application)

func RenderDiff

func RenderDiff(left, right *tview.TextView, diffView *tview.Flex, change *whatChanged.Change)

func ResetTableColors

func ResetTableColors(table *tview.Table, row int, highlight tcell.Color)

Types

type ColorType

type ColorType int

type RGB

type RGB []int32

func (RGB) B

func (r RGB) B() int32

func (RGB) G

func (r RGB) G() int32

func (RGB) R

func (r RGB) R() int32

type ViewType

type ViewType int

Jump to

Keyboard shortcuts

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