components

package
v0.0.29 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ColumnDef

type ColumnDef[D any] interface {
	Name() string
	Data(D) string
	Color(D) tcell.Color
}

type ColumnImpl

type ColumnImpl[D any] struct {
	ColName string
	DataFn  func(D) string
	ColorFn func(D) tcell.Color
}

func (ColumnImpl[D]) Color

func (c ColumnImpl[D]) Color(d D) tcell.Color

func (ColumnImpl[D]) Data

func (c ColumnImpl[D]) Data(d D) string

func (ColumnImpl[D]) Name

func (c ColumnImpl[D]) Name() string

type DataTable

type DataTable[D any] struct {
	tview.TableContentReadOnly
	// contains filtered or unexported fields
}

func NewDataTable

func NewDataTable[D any](columns []ColumnDef[D]) *DataTable[D]

func (*DataTable[D]) Get added in v0.0.14

func (dt *DataTable[D]) Get(row int) *D

func (*DataTable[D]) GetCell

func (dt *DataTable[D]) GetCell(row, column int) *tview.TableCell

func (*DataTable[D]) GetColumnCount

func (dt *DataTable[D]) GetColumnCount() int

func (*DataTable[D]) GetRowCount

func (dt *DataTable[D]) GetRowCount() int

func (*DataTable[D]) Update

func (dt *DataTable[D]) Update(d []D)

type SlideShow

type SlideShow struct {
	*tview.Flex
	// contains filtered or unexported fields
}

func NewSlideShow

func NewSlideShow() *SlideShow

func (*SlideShow) Add

func (s *SlideShow) Add(title string, page tview.Primitive)

func (*SlideShow) Next

func (s *SlideShow) Next()

func (*SlideShow) Prev

func (s *SlideShow) Prev()

type StatsGrid

type StatsGrid[D any] struct {
	tview.TableContentReadOnly
	// contains filtered or unexported fields
}

func NewStatsGrid

func NewStatsGrid[D any](grid [][]ColumnDef[D]) *StatsGrid[D]

func (*StatsGrid[D]) GetCell

func (dt *StatsGrid[D]) GetCell(row, column int) *tview.TableCell

func (*StatsGrid[D]) GetColumnCount

func (dt *StatsGrid[D]) GetColumnCount() int

func (*StatsGrid[D]) GetRowCount

func (dt *StatsGrid[D]) GetRowCount() int

func (*StatsGrid[D]) Update

func (dt *StatsGrid[D]) Update(d D)

Jump to

Keyboard shortcuts

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