widget

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Divider

type Divider struct {
	*tview.Box
	// contains filtered or unexported fields
}

func NewDivider

func NewDivider() *Divider

func (*Divider) Draw

func (d *Divider) Draw(screen tcell.Screen)

func (*Divider) SetLabel

func (d *Divider) SetLabel(label string) *Divider

type FileBrowser

type FileBrowser struct {
	*tview.List
	// contains filtered or unexported fields
}

func NewFileBrowser

func NewFileBrowser() *FileBrowser

func (*FileBrowser) GetCurrentFile

func (b *FileBrowser) GetCurrentFile() string

func (*FileBrowser) InputHandler

func (b *FileBrowser) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))

func (*FileBrowser) SetDir

func (b *FileBrowser) SetDir(dir string) error

func (*FileBrowser) SetOnError

func (b *FileBrowser) SetOnError(handle func(err error)) *FileBrowser

func (*FileBrowser) SetOnFileSelected

func (b *FileBrowser) SetOnFileSelected(handle func(filename string)) *FileBrowser

type PrettyCheckbox

type PrettyCheckbox struct {
	*tview.Box
	// contains filtered or unexported fields
}

func NewPrettyCheckbox

func NewPrettyCheckbox() *PrettyCheckbox

func (*PrettyCheckbox) Draw

func (b *PrettyCheckbox) Draw(screen tcell.Screen)

func (*PrettyCheckbox) InputHandler

func (b *PrettyCheckbox) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))

InputHandler returns the handler for this primitive.

func (*PrettyCheckbox) IsChecked

func (b *PrettyCheckbox) IsChecked() bool

func (*PrettyCheckbox) SetChangedFunc

func (b *PrettyCheckbox) SetChangedFunc(f func(bool)) *PrettyCheckbox

func (*PrettyCheckbox) SetChecked

func (b *PrettyCheckbox) SetChecked(checked bool) *PrettyCheckbox

func (*PrettyCheckbox) SetLabel

func (b *PrettyCheckbox) SetLabel(label string) *PrettyCheckbox

type RadioButtons

type RadioButtons struct {
	*tview.Box
	// contains filtered or unexported fields
}

RadioButtons implements a simple primitive for radio button selections.

func NewRadioButtons

func NewRadioButtons() *RadioButtons

NewRadioButtons returns a new radio button primitive.

func (*RadioButtons) Draw

func (r *RadioButtons) Draw(screen tcell.Screen)

Draw draws this primitive onto the screen.

func (*RadioButtons) InputHandler

func (r *RadioButtons) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))

InputHandler returns the handler for this primitive.

func (*RadioButtons) MouseHandler

func (r *RadioButtons) MouseHandler() func(action tview.MouseAction, event *tcell.EventMouse, setFocus func(p tview.Primitive)) (consumed bool, capture tview.Primitive)

MouseHandler returns the mouse handler for this primitive.

func (*RadioButtons) SetCurrentOption

func (r *RadioButtons) SetCurrentOption(index int) *RadioButtons

func (*RadioButtons) SetLabel

func (r *RadioButtons) SetLabel(label string) *RadioButtons

func (*RadioButtons) SetOptions

func (r *RadioButtons) SetOptions(options []string, handler func(text string, index int)) *RadioButtons

Jump to

Keyboard shortcuts

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