widget

package
v0.0.0-...-66d4e42 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LabelWidth  = 15
	LabelHeight = 2

	LabelWidthSmall = 10
	SelectWidth     = 20
)
View Source
const (
	TextWidthFull = 69

	TextHeight = 2
)
View Source
const (
	ButtonHeight = 2
)

Variables

View Source
var (
	HelpGlobal = ""
)

Functions

func HideHelp

func HideHelp() error

func NewButtonWidget

func NewButtonWidget(name string, x, y, w int, label string, handler func(g *gocui.Gui, v *gocui.View) error) *gocui.View

func NewButtonWidgetAutoWidth

func NewButtonWidgetAutoWidth(name string, x, y int, label string, handler func(g *gocui.Gui, v *gocui.View) error) *gocui.View

func NewHelpWidget

func NewHelpWidget()

func NewLabelWidget

func NewLabelWidget(name string, x, y int, label string) *gocui.View

func NewLabelWidgetAutoWidth

func NewLabelWidgetAutoWidth(name string, x, y int, label string) *gocui.View

func NewPanelWidget

func NewPanelWidget(name string, x, y, w, h int, body string) *gocui.View

func NewRadioWidget

func NewRadioWidget(name string, x, y int, checked bool) *gocui.View

func NewSelectWidget

func NewSelectWidget(name string, x, y, w, h int, title string, options []model.Option,
	checkHandler func(g *gocui.Gui, v *gocui.View) error) *gocui.View

func NewSelectWidgetWithDefault

func NewSelectWidgetWithDefault(name string, x, y, w, h int, title string, options []model.Option, defaultt string,
	checkHandler func(g *gocui.Gui, v *gocui.View) error) *gocui.View

func NewTextWidget

func NewTextWidget(name string, x, y, w int, text string) *gocui.View

func NewTextareaWidget

func NewTextareaWidget(name string, x, y, w, h int, text string) *gocui.View

func ParseRadioVal

func ParseRadioVal(val string) bool

func ShowHelp

func ShowHelp() error

func ShowHelpFromView

func ShowHelpFromView(g *gocui.Gui, v *gocui.View) error

Types

type ButtonWidget

type ButtonWidget struct {
	// contains filtered or unexported fields
}

func (*ButtonWidget) Layout

func (w *ButtonWidget) Layout(handler func(g *gocui.Gui, v *gocui.View) error) (*gocui.View, error)

type HelpWidget

type HelpWidget struct {
	// contains filtered or unexported fields
}

func (*HelpWidget) Layout

func (w *HelpWidget) Layout() error

type LabelWidget

type LabelWidget struct {
	// contains filtered or unexported fields
}

func (*LabelWidget) Layout

func (w *LabelWidget) Layout() (*gocui.View, error)

type PanelWidget

type PanelWidget struct {
	// contains filtered or unexported fields
}

func (*PanelWidget) Layout

func (w *PanelWidget) Layout() (*gocui.View, error)

type RadioWidget

type RadioWidget struct {
	// contains filtered or unexported fields
}

func (*RadioWidget) Layout

func (w *RadioWidget) Layout() (*gocui.View, error)

type SelectWidget

type SelectWidget struct {
	// contains filtered or unexported fields
}

func (*SelectWidget) Layout

func (w *SelectWidget) Layout() (*gocui.View, error)

type TextWidget

type TextWidget struct {
	// contains filtered or unexported fields
}

func (*TextWidget) Layout

func (w *TextWidget) Layout() (*gocui.View, error)

Jump to

Keyboard shortcuts

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