widgets

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorMsg

type ErrorMsg struct {
	// contains filtered or unexported fields
}

func NewErrorMsg

func NewErrorMsg() *ErrorMsg

func (*ErrorMsg) Draw

func (msg *ErrorMsg) Draw(x int, s tcell.Screen) int

Draw redraws msg at given coordinates and screen, returning the number of rows occupied

func (*ErrorMsg) Resize

func (msg *ErrorMsg) Resize(w int)

func (*ErrorMsg) Set

func (msg *ErrorMsg) Set(s string)

type HueBar

type HueBar struct {
	// contains filtered or unexported fields
}

func NewHueBar

func NewHueBar(s *state.State) *HueBar

func (*HueBar) Down

func (bar *HueBar) Down(step int)

func (*HueBar) Draw

func (bar *HueBar) Draw(x, y int, s tcell.Screen) int

Draw redraws bar at given coordinates and screen, returning the number of rows occupied

func (*HueBar) Handle

func (bar *HueBar) Handle(change state.Change)

func (*HueBar) Resize

func (bar *HueBar) Resize(w, h int)

func (*HueBar) SetPointerStyle

func (bar *HueBar) SetPointerStyle(st tcell.Style)

func (*HueBar) SetPos

func (bar *HueBar) SetPos(n float64)

func (*HueBar) Up

func (bar *HueBar) Up(step int)
type MenuFn func(tcell.Screen) MenuFn

func HelpMenu

func HelpMenu(s tcell.Screen) MenuFn
type NavBar struct {
	// contains filtered or unexported fields
}

func NewNavBar

func NewNavBar(s *state.State, length int) *NavBar
func (bar *NavBar) Down(int)
func (bar *NavBar) Draw(x, y int, s tcell.Screen) int

Draw redraws bar at given coordinates and screen, returning the number of rows occupied

func (bar *NavBar) Handle(state.Change)
func (bar *NavBar) Resize(w, h int)
func (bar *NavBar) SetLabel(s string)
func (bar *NavBar) SetPointerStyle(st tcell.Style)
func (bar *NavBar) SetPos(idx int)
func (bar *NavBar) Up(int)

NavBar implements Section

type PaletteBox

type PaletteBox struct {
	// contains filtered or unexported fields
}

func NewPaletteBox

func NewPaletteBox(s *state.State) *PaletteBox

func (*PaletteBox) Down

func (pb *PaletteBox) Down(step int)

func (*PaletteBox) Draw

func (pb *PaletteBox) Draw(x, y int, s tcell.Screen) int

Draw redraws p at given coordinates and screen, returning the number of rows occupied

func (*PaletteBox) Handle

func (pb *PaletteBox) Handle(state.Change)

func (*PaletteBox) Resize

func (pb *PaletteBox) Resize(w, h int)

func (*PaletteBox) SetPointerStyle

func (pb *PaletteBox) SetPointerStyle(st tcell.Style)

func (*PaletteBox) Up

func (pb *PaletteBox) Up(step int)

type SaturationBar

type SaturationBar struct {
	*NavBar
	// contains filtered or unexported fields
}

func NewSaturationBar

func NewSaturationBar(s *state.State) *SaturationBar

func (*SaturationBar) Down

func (bar *SaturationBar) Down(step int)

func (*SaturationBar) Draw

func (bar *SaturationBar) Draw(x, y int, s tcell.Screen) int

Draw redraws bar at given coordinates and screen, returning the number of rows occupied

func (*SaturationBar) Handle

func (bar *SaturationBar) Handle(change state.Change)

State change handler

func (*SaturationBar) Up

func (bar *SaturationBar) Up(step int)

type ValueBar

type ValueBar struct {
	*NavBar
	// contains filtered or unexported fields
}

func NewValueBar

func NewValueBar(s *state.State) *ValueBar

func (*ValueBar) Down

func (bar *ValueBar) Down(step int)

func (*ValueBar) Handle

func (bar *ValueBar) Handle(change state.Change)

State change handler

func (*ValueBar) Up

func (bar *ValueBar) Up(step int)

Jump to

Keyboard shortcuts

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