views

package
v0.0.0-...-fb2e7cc Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Resize represent that the column
	// of the tableView should be resized with the terminal window.
	Resize = -1
)

Variables

This section is empty.

Functions

func NewExitView

func NewExitView() *exitView

NewExitView returns an instance of <*exitView>

Types

type TableView

type TableView struct {
	// contains filtered or unexported fields
}

TableView implements the view interface. It is a table build on xtui.Table.

func NewTableView

func NewTableView(itemsList []string, headerRows xtui.TableRows, filterCol, rowsPerEntry int, colWidths []int, light bool) *TableView

NewTableView returns a new instance of <*TableView>

func (*TableView) Filter

func (v *TableView) Filter(event gui.Event)

Filter applies the filter from the gui.Event to the xtui.Table.

func (*TableView) ItemsList

func (v *TableView) ItemsList() []string

ItemsList returns a list with names based on which the table can be sorted.

func (*TableView) OnScrollEvent

func (v *TableView) OnScrollEvent(event gui.Event)

OnScrollEvent handles the scroll event based on the key pressed.

func (*TableView) Resize

func (v *TableView) Resize(w, h int)

Resize resizes the tableView.

func (*TableView) Update

func (v *TableView) Update(payload interface{})

Update updates the table rows. The lock from the table is used.

func (*TableView) Widgets

func (v *TableView) Widgets() []tui.Drawable

Widgets returns all widgets to be drawn by this view.

Jump to

Keyboard shortcuts

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