ui

package
v0.1.2-0...-ef2143f Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Table

type Table struct {
	*Block
	Header []string
	Rows   [][]string
	Styles [][]*Style

	Footer string

	ColWidths []int
	ColGap    int
	PadLeft   int

	SelectedRow int
	TopRow      int

	ColResizer func()
}

Table is custom table implemented on top of the basic Block It allows for an arbitrary number of rows and columns with no separators and per entry styling.

func NewTable

func NewTable() *Table

NewTable constructs a new table

func (*Table) Draw

func (table *Table) Draw(buf *Buffer)

Draw draws the table to the given buffer

func (*Table) ScrollDown

func (table *Table) ScrollDown()

ScrollDown scrolls down the cursor in the table

func (*Table) ScrollUp

func (table *Table) ScrollUp()

ScrollUp scrolls up the cursor in the table

Jump to

Keyboard shortcuts

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