component

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2019 License: GPL-3.0 Imports: 8 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 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 StatusBar

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

func NewStatusBar

func NewStatusBar(configFileName string, palette console.Palette) *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