widgets

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSplash

func NewSplash(ui Quitter) tui.Widget

Types

type ConnState

type ConnState struct {
	*tui.Label
}

ConnState is a Widget that displays a single character indicating the current connection state.

func NewConnState

func NewConnState() *ConnState

func (*ConnState) Set

func (c *ConnState) Set(state data.ConnectionState)

type Filler

type Filler struct {
	tui.WidgetBase
	// contains filtered or unexported fields
}

Filler is a Widget that fills itself with a given rune. It expands according to the usual SizePolicy mapping; note that "Maximum" may be necessary to restrict it in a single dimension.

func NewFiller

func NewFiller(fill rune) *Filler

func (*Filler) Draw

func (f *Filler) Draw(p *tui.Painter)

func (*Filler) SetFill

func (f *Filler) SetFill(fill rune)

SetFill sets the character used for filling.

type Quitter

type Quitter interface {
	Quit()
}

Quitter is a type that supports the ui.Quit() operation.

type TailBox

type TailBox struct {
	tui.WidgetBase
	// contains filtered or unexported fields
}

TailBox is a container Widget that may not show all its Widgets. While tui.Box attempts to show every contained Widget - sometimes shrinking those Widgets to do so- TailBox prioritizes completely displaying its last Widget, then the next-to-last widget, etc. It is vertically-aligned, i.e. all the contained Widgets have the same width.

func NewTailBox

func NewTailBox(w ...tui.Widget) *TailBox

func (*TailBox) Draw

func (t *TailBox) Draw(p *tui.Painter)

func (*TailBox) Resize

func (t *TailBox) Resize(size image.Point)

Resize recalculates the layout of the box's contents.

func (*TailBox) SetContents

func (t *TailBox) SetContents(w ...tui.Widget)

Jump to

Keyboard shortcuts

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