widgets

package
v0.0.0-...-90188ae Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Defaultstyle = tcell.StyleDefault.
					Foreground(defaultfg).
					Background(defaultbg)
	OutOfBound = -1
)
View Source
var (
	KeyJ = tcell.NewEventKey(tcell.KeyRune, 'j', tcell.ModNone)
	KeyK = tcell.NewEventKey(tcell.KeyRune, 'k', tcell.ModNone)
)

Functions

func GetCell

func GetCell(text string, st tcell.Style) *tview.TableCell

Types

type CenteredWidget

type CenteredWidget interface {
	Table() *tview.Table
	ContentHandler()
	SelectionHandler() func(s string)
	Size(mw, mh int) (int, int, int, int)
}

type InteractiveView

type InteractiveView struct {
	View *tview.Table
	// contains filtered or unexported fields
}

func NewInteractiveView

func NewInteractiveView() *InteractiveView

func (*InteractiveView) DisableVisualMode

func (i *InteractiveView) DisableVisualMode(disable bool)

func (*InteractiveView) ExitVisualMode

func (i *InteractiveView) ExitVisualMode()

func (*InteractiveView) SetCapture

func (i *InteractiveView) SetCapture(
	f func(e *tcell.EventKey) *tcell.EventKey)

Sets Input Capture. Default Keys for Interactive View can't be overridden.

func (*InteractiveView) SetContentFunc

func (i *InteractiveView) SetContentFunc(f func() [][]*tview.TableCell)

f should return [][]*tview.TableCell that is then used to set the content of the View.

func (*InteractiveView) SetVisualCapture

func (i *InteractiveView) SetVisualCapture(f func(start, end int, e *tcell.EventKey) *tcell.EventKey)

type View01

type View01 struct {
	Root *tview.Pages
}

func NewView01

func NewView01() *View01

func (*View01) OpenListMenu

func (v *View01) OpenListMenu(
	title string, list []string, shandler func(s string))

Jump to

Keyboard shortcuts

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