Versions in this module Expand all Collapse all v0 v0.0.18 Jun 24, 2021 v0.0.17 Jun 8, 2021 v0.0.16 Jun 8, 2021 v0.0.15 Jun 7, 2021 v0.0.14 Apr 12, 2021 Changes in this version + type ButtonEdgesStyle string + const ButtonEdgesStyleAngled + const ButtonEdgesStyleDefault + const ButtonEdgesStyleFlat + const ButtonEdgesStyleNone + const ButtonEdgesStyleRound + const ButtonEdgesStyleSlanted type Style + ButtonEdges ButtonEdgesStyle + func (s Style) GetButtonEdges() [2]rune + func (s Style) SetButtonEdges(b ButtonEdgesStyle) Style v0.0.13 Apr 9, 2021 Changes in this version + var ColourFgFaint = NewColour(128, 128, 128) + func SetStyle(style Style) type Colour + func FaintColour(c Colour) Colour + func (c Colour) IsDefault() bool type Style + Bg Colour + Fg Colour + InheritBg bool + InheritFg bool + func (s Style) SetBold(on bool) Style + func (s Style) SetInheritBackground(inheritBg bool) Style + func (s Style) SetInheritForeground(inheritFg bool) Style + func (s Style) SetUnderline(on bool) Style + func (s Style) ToggleInvert() Style v0.0.12 Apr 9, 2021 v0.0.11 Mar 4, 2021 v0.0.10 Feb 22, 2021 Changes in this version + var StyleButton = StyleFaint + var StyleButtonSelected = StyleDefault.Invert().Bold(true) + var StyleDefault = Style + var StyleFaint = StyleDefault.SetForeground([3]int32{ ... }) + var StyleInherit = Style + var StyleInput = StyleDefault + var StyleSelected = StyleDefault.Invert() + type Alignment uint8 + const AlignBottom + const AlignCenter + const AlignLeft + const AlignRight + const AlignTop + type Canvas interface + Cutout func(x, y int, s Size) Canvas + Fill func(r rune, s Style) + Set func(x, y int, r rune, s Style) + Size func() Size + type Colour [3]int32 + func NewColour(r, g, b int32) Colour + func (c Colour) Blue() int32 + func (c Colour) Green() int32 + func (c Colour) Red() int32 + type Component interface + MinimumSize func() Size + Render func(canvas Canvas) + type Container interface + Add func(c Component) + Remove func(c Component) + SetAlignment func(alignment Alignment) + type Selectable interface + Deselect func() + HandleKeypress func(key *tcell.EventKey) + Select func() bool + type Selector struct + func NewSelector() *Selector + func (s *Selector) Deselect() + func (s *Selector) GetSelected() Selectable + func (s *Selector) Next(components []Component) bool + func (s *Selector) Previous(components []Component) bool + func (s *Selector) Select(components []Component) bool + type Size struct + H int + W int + func CalculateSize(component Component, available Size) Size + func (s Size) Add(a Size) Size + func (s Size) Minus(a Size) Size + type SizeStrategy func(available Size, required Size) Size + func SizeStrategyAtLeast(min Size) SizeStrategy + func SizeStrategyAtMost(max Size) SizeStrategy + func SizeStrategyMaximum() SizeStrategy + func SizeStrategyMaximumHeight() SizeStrategy + func SizeStrategyMaximumWidth() SizeStrategy + func SizeStrategyMinimum() SizeStrategy + func SizeStrategyMultiple(strategies ...SizeStrategy) SizeStrategy + func SizeStrategyPercentage(wPc, hPc int) SizeStrategy + type Sizer struct + func (s *Sizer) SetSizeStrategy(strategy SizeStrategy) + func (s Sizer) GetSizeStrategy() SizeStrategy + type StrategicSizer interface + GetSizeStrategy func() SizeStrategy + SetSizeStrategy func(strategy SizeStrategy) + type Style struct + func (s Style) Bold(on bool) Style + func (s Style) GetBackground() Colour + func (s Style) GetForeground() Colour + func (s Style) Invert() Style + func (s Style) RemoveBackground() Style + func (s Style) SetBackground(colour Colour) Style + func (s Style) SetForeground(colour Colour) Style + func (s Style) Tcell() tcell.Style + func (s Style) Underline(on bool) Style