widget

package
v0.0.0-...-eb52726 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BookList

type BookList struct {
	w.List
	// contains filtered or unexported fields
}

func NewBookList

func NewBookList(nodes []BookNode) *BookList

func (*BookList) ScrollMiddle

func (l *BookList) ScrollMiddle()

func (*BookList) ToggleHighlight

func (l *BookList) ToggleHighlight()

type BookModal

type BookModal struct {
	ui.Grid
	Data *book.Book
}

func NewBookModal

func NewBookModal(b *book.Book, tw, th int) *BookModal

func (*BookModal) Resize

func (b *BookModal) Resize(tw, th int)

type BookNode

type BookNode struct {
	Title  string
	Childs []string
}

type BookTable

type BookTable struct {
	w.Table
	// contains filtered or unexported fields
}

func NewBookTable

func NewBookTable(rows [][]string) *BookTable

type BookTree

type BookTree struct {
	w.Tree
	// contains filtered or unexported fields
}

func NewBookTree

func NewBookTree(nodes []BookNode) *BookTree

type Highlightable

type Highlightable interface {
	ToggleHighlight()
}

type Loading

type Loading struct {
	w.Gauge
}

func NewLoading

func NewLoading() *Loading

type MainScreen

type MainScreen struct {
	ui.Grid
	BookList       *BookList
	PageIndicator  *PageIndicator
	StatusBar      *StatusBar
	UpdateList     chan *BookList
	UpdatePage     chan int
	SelectedRow    chan int
	UpdateDown     chan float64
	DownloadedFile chan *os.File
}

func NewMainScreen

func NewMainScreen(sb *StatusBar, bl *BookList, pi *PageIndicator, tw, th int) *MainScreen

func (*MainScreen) Resize

func (ms *MainScreen) Resize(tw, th int)

func (*MainScreen) Update

func (ms *MainScreen) Update()

type PageIndicator

type PageIndicator struct {
	w.TabPane
	Selected int
	// contains filtered or unexported fields
}

func NewPageIndicator

func NewPageIndicator(max int) *PageIndicator

func (*PageIndicator) FocusEnd

func (pi *PageIndicator) FocusEnd()

func (*PageIndicator) FocusMiddle

func (pi *PageIndicator) FocusMiddle()

func (*PageIndicator) FocusStart

func (pi *PageIndicator) FocusStart()

func (*PageIndicator) ToggleHighlight

func (pi *PageIndicator) ToggleHighlight()

type Resizable

type Resizable interface {
	Resize(x, y int)
}

type StatusBar

type StatusBar struct {
	ui.Grid
	// contains filtered or unexported fields
}

func NewStatusBar

func NewStatusBar() *StatusBar

func (*StatusBar) OnDownload

func (s *StatusBar) OnDownload() int

func (*StatusBar) OnError

func (s *StatusBar) OnError() int

func (*StatusBar) OnFinished

func (s *StatusBar) OnFinished() int

func (*StatusBar) OnMessage

func (s *StatusBar) OnMessage(msg string)

func (*StatusBar) OnProgress

func (s *StatusBar) OnProgress(percent float64) int

func (*StatusBar) Update

func (s *StatusBar) Update()

Jump to

Keyboard shortcuts

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