views

package
v0.27.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GridTitle

type GridTitle struct {
	Col, Row int

	Text string
	Fn   func(screen tcell.Screen, x, y, w int)

	Color tcell.Color
	Align int
}

type TopLevel

type TopLevel struct {
	*tview.Grid

	Titles    []GridTitle
	SubTitles []GridTitle
	Commands  []string
	Error     func() error
	// contains filtered or unexported fields
}

func NewTopLevel

func NewTopLevel(title string, grid *tview.Grid, app *tview.Application) *TopLevel

func (*TopLevel) Draw

func (t *TopLevel) Draw(screen tcell.Screen)

func (*TopLevel) InputHandler

func (t *TopLevel) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))

func (*TopLevel) InteractiveQuit

func (t *TopLevel) InteractiveQuit()

func (*TopLevel) SetCommands

func (t *TopLevel) SetCommands(commands ...string) *TopLevel

func (*TopLevel) SetDelegateInputHandler

func (t *TopLevel) SetDelegateInputHandler(h func(event *tcell.EventKey, setFocus func(p tview.Primitive)) bool) *TopLevel

func (*TopLevel) SetError added in v0.26.0

func (t *TopLevel) SetError(f func() error) *TopLevel

func (*TopLevel) SetSubTitles

func (t *TopLevel) SetSubTitles(titles ...GridTitle) *TopLevel

func (*TopLevel) SetTitles

func (t *TopLevel) SetTitles(titles ...GridTitle) *TopLevel

Jump to

Keyboard shortcuts

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