Documentation
¶
Index ¶
- Variables
- func SetStyle(style Style)
- type Alignment
- type ButtonEdgesStyle
- type Canvas
- type Colour
- type Component
- type Container
- type Selectable
- type Selector
- type Size
- type SizeStrategy
- 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
- type StrategicSizer
- type Style
- func (s Style) GetBackground() Colour
- func (s Style) GetButtonEdges() [2]rune
- func (s Style) GetForeground() Colour
- func (s Style) RemoveBackground() Style
- func (s Style) SetBackground(colour Colour) Style
- func (s Style) SetBold(on bool) Style
- func (s Style) SetButtonEdges(b ButtonEdgesStyle) Style
- func (s Style) SetForeground(colour Colour) 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) Tcell() tcell.Style
- func (s Style) ToggleInvert() Style
Constants ¶
This section is empty.
Variables ¶
View Source
var ColourFgFaint = NewColour(128, 128, 128)
View Source
var StyleInherit = Style{ InheritBg: true, InheritFg: true, ButtonEdges: ButtonEdgesStyleDefault, }
Functions ¶
Types ¶
type Alignment ¶
type Alignment uint8
const ( AlignLeft Alignment = iota AlignRight AlignCenter AlignTop = AlignLeft AlignBottom = AlignRight )
type ButtonEdgesStyle ¶ added in v0.0.14
type ButtonEdgesStyle string
const ( ButtonEdgesStyleAngled ButtonEdgesStyle = "angled" ButtonEdgesStyleFlat ButtonEdgesStyle = "flat" ButtonEdgesStyleRound ButtonEdgesStyle = "round" ButtonEdgesStyleSlanted ButtonEdgesStyle = "slanted" ButtonEdgesStyleNone ButtonEdgesStyle = "none" ButtonEdgesStyleDefault ButtonEdgesStyle = ButtonEdgesStyleAngled )
type Selectable ¶
type Selector ¶
type Selector struct {
// contains filtered or unexported fields
}
func NewSelector ¶
func NewSelector() *Selector
func (*Selector) GetSelected ¶
func (s *Selector) GetSelected() Selectable
type SizeStrategy ¶
func SizeStrategyAtLeast ¶
func SizeStrategyAtLeast(min Size) SizeStrategy
func SizeStrategyAtMost ¶
func SizeStrategyAtMost(max Size) SizeStrategy
func SizeStrategyMaximum ¶
func SizeStrategyMaximum() SizeStrategy
func SizeStrategyMaximumHeight ¶
func SizeStrategyMaximumHeight() SizeStrategy
func SizeStrategyMaximumWidth ¶
func SizeStrategyMaximumWidth() SizeStrategy
func SizeStrategyMinimum ¶
func SizeStrategyMinimum() SizeStrategy
func SizeStrategyMultiple ¶
func SizeStrategyMultiple(strategies ...SizeStrategy) SizeStrategy
func SizeStrategyPercentage ¶
func SizeStrategyPercentage(wPc, hPc int) SizeStrategy
type Sizer ¶
type Sizer struct {
// contains filtered or unexported fields
}
func (Sizer) GetSizeStrategy ¶
func (s Sizer) GetSizeStrategy() SizeStrategy
func (*Sizer) SetSizeStrategy ¶
func (s *Sizer) SetSizeStrategy(strategy SizeStrategy)
type StrategicSizer ¶
type StrategicSizer interface { SetSizeStrategy(strategy SizeStrategy) GetSizeStrategy() SizeStrategy }
type Style ¶
type Style struct { InheritFg bool `mapstructure:"inherit_fg"` InheritBg bool `mapstructure:"inherit_bg"` Invert bool `mapstructure:"invert"` Underline bool `mapstructure:"underline"` Bold bool `mapstructure:"bold"` Bg Colour `mapstructure:"bg"` Fg Colour `mapstructure:"fg"` ButtonEdges ButtonEdgesStyle `mapstructure:"button_edges"` }
func (Style) GetBackground ¶
func (Style) GetButtonEdges ¶ added in v0.0.14
func (Style) GetForeground ¶
func (Style) RemoveBackground ¶
func (Style) SetBackground ¶
func (Style) SetButtonEdges ¶ added in v0.0.14
func (s Style) SetButtonEdges(b ButtonEdgesStyle) Style
func (Style) SetForeground ¶
func (Style) SetInheritBackground ¶ added in v0.0.13
func (Style) SetInheritForeground ¶ added in v0.0.13
func (Style) SetUnderline ¶ added in v0.0.13
func (Style) ToggleInvert ¶ added in v0.0.13
Click to show internal directories.
Click to hide internal directories.