sampler: github.com/sqshq/sampler/component Index | Files | Directories

package component

import "github.com/sqshq/sampler/component"

Index

Package Files

alert.go block.go component.go menu.go statusbar.go

Constants

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

func NewBlock Uses

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

func RenderAlert Uses

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

type Component Uses

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

func NewComponent Uses

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

func (*Component) Move Uses

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

func (*Component) Resize Uses

func (c *Component) Resize(x, y int)
type Menu struct {
    *ui.Block
    // contains filtered or unexported fields
}

func NewMenu Uses

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 Uses

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

func NewStatusBar Uses

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

func (*StatusBar) Draw Uses

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

func (*StatusBar) TogglePause Uses

func (s *StatusBar) TogglePause()

Directories

PathSynopsis
asciibox
barchart
gauge
layout
runchart
sparkline
textbox
util

Package component imports 8 packages (graph) and is imported by 8 packages. Updated 2020-01-03. Refresh now. Tools for package owners.