widgets

package
v0.7.7 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2022 License: MIT Imports: 5 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CTopHeader

type CTopHeader struct {
	Time   *ui.Par
	Count  *ui.Par
	Filter *ui.Par
	// contains filtered or unexported fields
}

func NewCTopHeader

func NewCTopHeader() *CTopHeader

func (*CTopHeader) Align

func (c *CTopHeader) Align()

func (*CTopHeader) Buffer

func (c *CTopHeader) Buffer() ui.Buffer

func (*CTopHeader) Height

func (c *CTopHeader) Height() int

func (*CTopHeader) SetCount

func (c *CTopHeader) SetCount(val int)

func (*CTopHeader) SetFilter

func (c *CTopHeader) SetFilter(val string)

type ErrorView added in v0.7.3

type ErrorView struct {
	*ui.Par
	// contains filtered or unexported fields
}

func NewErrorView added in v0.7.3

func NewErrorView() *ErrorView

func (*ErrorView) Append added in v0.7.3

func (w *ErrorView) Append(s string)

func (*ErrorView) Buffer added in v0.7.3

func (w *ErrorView) Buffer() ui.Buffer

func (*ErrorView) Resize added in v0.7.3

func (w *ErrorView) Resize()

type Input

type Input struct {
	ui.Block
	Label       string
	Data        string
	MaxLen      int
	TextFgColor ui.Attribute
	TextBgColor ui.Attribute
	// contains filtered or unexported fields
}

func NewInput

func NewInput() *Input

func (*Input) Buffer

func (i *Input) Buffer() ui.Buffer

func (*Input) InputHandlers

func (i *Input) InputHandlers()

Setup some default handlers for menu navigation

func (*Input) KeyPress

func (i *Input) KeyPress(e ui.Event)

func (*Input) Stream

func (i *Input) Stream() chan string

type Padding

type Padding [2]int // x,y padding

type StatusLine added in v0.7.1

type StatusLine struct {
	Message *ui.Par
	// contains filtered or unexported fields
}

func NewStatusLine added in v0.7.1

func NewStatusLine() *StatusLine

func (*StatusLine) Align added in v0.7.1

func (sl *StatusLine) Align()

func (*StatusLine) Buffer added in v0.7.1

func (sl *StatusLine) Buffer() ui.Buffer

func (*StatusLine) Display added in v0.7.1

func (sl *StatusLine) Display()

func (*StatusLine) Height added in v0.7.1

func (sl *StatusLine) Height() int

func (*StatusLine) Show added in v0.7.1

func (sl *StatusLine) Show(s string)

change given message on the status line

func (*StatusLine) ShowErr added in v0.7.1

func (sl *StatusLine) ShowErr(s string)

type TextView added in v0.7.1

type TextView struct {
	ui.Block

	Text        []ToggleText // all the text
	TextOut     []string     // text to be displayed
	TextFgColor ui.Attribute
	TextBgColor ui.Attribute
	// contains filtered or unexported fields
}

func NewTextView added in v0.7.1

func NewTextView(lines <-chan ToggleText) *TextView

func (*TextView) Buffer added in v0.7.1

func (t *TextView) Buffer() ui.Buffer

func (*TextView) Resize added in v0.7.1

func (t *TextView) Resize()

Adjusts text inside this view according to the window size. No need to call ui.Render(...) after calling this method, it is called automatically

func (*TextView) Toggle added in v0.7.1

func (t *TextView) Toggle()

Toggles text inside this view. No need to call ui.Render(...) after calling this method, it is called automatically

type ToggleText added in v0.7.1

type ToggleText interface {
	// returns text for toggle on/off
	Toggle(on bool) string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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