component

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2019 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MenuOptionMove     menuOption = "MOVE"
	MenuOptionResize   menuOption = "RESIZE"
	MenuOptionPinpoint menuOption = "PINPOINT"
	MenuOptionResume   menuOption = "RESUME"
)

Variables

This section is empty.

Functions

func NewBlock

func NewBlock(title string, border bool, palette console.Palette) *ui.Block

func RenderAlert

func RenderAlert(alert *data.Alert, area image.Rectangle, buffer *ui.Buffer)

Types

type Component

type Component struct {
	ui.Drawable
	*data.Consumer
	Type     config.ComponentType
	Title    string
	Location config.Location
	Size     config.Size
	RateMs   int
}

func NewComponent

func NewComponent(dbl ui.Drawable, cmr *data.Consumer, cfg config.ComponentConfig) *Component

func (*Component) Move

func (c *Component) Move(x, y int)

func (*Component) Resize

func (c *Component) Resize(x, y int)

type Intro

type Intro struct {
	*ui.Block
	// contains filtered or unexported fields
}

func NewIntro

func NewIntro(palette console.Palette) *Intro

func (*Intro) Down

func (intro *Intro) Down()

func (*Intro) Draw

func (intro *Intro) Draw(buffer *ui.Buffer)

func (*Intro) GetSelectedPage

func (intro *Intro) GetSelectedPage() IntroPage

func (*Intro) NextPage

func (intro *Intro) NextPage()

func (*Intro) Up

func (intro *Intro) Up()

type IntroPage

type IntroPage rune
const (
	IntroPageWelcome    IntroPage = 0
	IntroPageCommercial IntroPage = 1
	IntroPagePersonal   IntroPage = 2
)
type Menu struct {
	*ui.Block
	// contains filtered or unexported fields
}

func NewMenu

func NewMenu(palette console.Palette) *Menu
func (m *Menu) Choose()
func (m *Menu) Down()
func (m *Menu) Draw(buffer *ui.Buffer)
func (m *Menu) GetSelectedOption() menuOption
func (m *Menu) Highlight(component *Component)
func (m *Menu) Idle()
func (m *Menu) MoveOrResize()
func (m *Menu) Up()

type NagWindow

type NagWindow struct {
	*ui.Block
	// contains filtered or unexported fields
}

func NewNagWindow

func NewNagWindow(palette console.Palette) *NagWindow

func (*NagWindow) Accept

func (n *NagWindow) Accept()

func (*NagWindow) Draw

func (n *NagWindow) Draw(buffer *ui.Buffer)

func (*NagWindow) IsAccepted

func (n *NagWindow) IsAccepted() bool

type StatusBar

type StatusBar struct {
	*ui.Block
	// contains filtered or unexported fields
}

func NewStatusBar

func NewStatusBar(configFileName string, palette console.Palette, license *metadata.License) *StatusBar

func (*StatusBar) Draw

func (s *StatusBar) Draw(buffer *ui.Buffer)

func (*StatusBar) TogglePause

func (s *StatusBar) TogglePause()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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