tui

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application interface {
	SetRoot(root tview.Primitive, fullscreen bool) *tview.Application
	SetFocus(p tview.Primitive) *tview.Application
	EnableMouse(enable bool) *tview.Application
	SetInputCapture(capture func(event *tcell.EventKey) *tcell.EventKey) *tview.Application
	QueueUpdateDraw(f func()) *tview.Application
	Stop()
}

type Clipboard

type Clipboard interface {
	WriteAll(text string) error
}

type Handlers

type Handlers interface {
	HandleNodeChanged(e *elements.Elements, s *state.State) func(node *tview.TreeNode)
	HandleHelpDone(a Application, e *elements.Elements) func(btnIdx int, btnLbl string)
	HandleRun(r Runner, a Application, e *elements.Elements, s *state.State)
	HandleRunAll(r Runner, a Application, e *elements.Elements, s *state.State)
	HandleRunFailed(r Runner, a Application, e *elements.Elements, s *state.State)
	HandleRunPassed(r Runner, a Application, e *elements.Elements, s *state.State)
	HandleSearchChanged(e *elements.Elements, s *state.State) func(searchQuery string)
	HandleSearchDone(a Application, e *elements.Elements, s *state.State) func(key tcell.Key)
	HandleSearchFocus(a Application, e *elements.Elements, s *state.State)
	HandleSearchClear(a Application, e *elements.Elements, s *state.State)
	HandleResize(d ResizeDirection, e *elements.Elements, s *state.State)
	HandleYankNode(a Application, c Clipboard, e *elements.Elements)
	HandleYankOutput(a Application, c Clipboard, e *elements.Elements)
}

type ResizeDirection

type ResizeDirection int
const (
	ResizeLeft ResizeDirection = iota
	ResizeRight
	ResizeDefault
)

type Runner

type Runner interface {
	RunTest(command string) *models.LazyTestResult
}

type TUI

type TUI struct {
	App       Application
	State     *state.State
	Elements  *elements.Elements
	Handlers  Handlers
	Runner    Runner
	Clipboard Clipboard
	// contains filtered or unexported fields
}

func NewTUI

func NewTUI(
	a Application,
	h Handlers,
	r Runner,
	c Clipboard,
	e *elements.Elements,
	s *state.State,
	d string,
	eng []engines.LazyEngine,
) *TUI

func (*TUI) InputCapture

func (t *TUI) InputCapture(event *tcell.EventKey) *tcell.EventKey

func (*TUI) Run

func (t *TUI) Run() error

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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