widget

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

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

func NewFilter

func NewFilter(g *gocui.Gui) *Filter

func (*Filter) Close

func (filter *Filter) Close()

func (*Filter) Serve

func (filter *Filter) Serve()

func (*Filter) Update

func (filter *Filter) Update(f func(*gocui.Gui) error)

type Layout

type Layout interface {
	Rect() (x, y, w, h int)
}

func NewLayout

func NewLayout(f func() (x, y, w, h int)) Layout

type Widget

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

func NewWidget

func NewWidget(gui *gocui.Gui, name, body string, layout Layout) (widget *Widget, e error)

func (*Widget) Body

func (w *Widget) Body() string

func (*Widget) DeleteKeybinding

func (w *Widget) DeleteKeybinding(key interface{}, mod gocui.Modifier) error

func (*Widget) DeleteKeybindings

func (w *Widget) DeleteKeybindings()

func (*Widget) DeleteView

func (w *Widget) DeleteView() error

func (*Widget) EnableScroll

func (w *Widget) EnableScroll(scroll bool)

func (*Widget) GUI

func (w *Widget) GUI() *gocui.Gui

func (*Widget) Layout

func (w *Widget) Layout() (e error)

func (*Widget) Scroll

func (w *Widget) Scroll() bool

func (*Widget) ScrollBottom

func (w *Widget) ScrollBottom()

func (*Widget) ScrollTop

func (w *Widget) ScrollTop()

func (*Widget) SetBody

func (w *Widget) SetBody(text string)

func (*Widget) SetBodyAndScroll

func (w *Widget) SetBodyAndScroll(text string, bottom bool)

func (*Widget) SetKeybinding

func (w *Widget) SetKeybinding(key interface{}, mod gocui.Modifier, handler func(*gocui.Gui, *gocui.View) error) error

func (*Widget) Update

func (w *Widget) Update(f func(*gocui.Gui) error)

func (*Widget) View

func (w *Widget) View() *gocui.View

Jump to

Keyboard shortcuts

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