Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NamedColors = map[string]Color{ "black": Basic(Black), "red": Basic(Red), "green": Basic(Green), "yellow": Basic(Yellow), "blue": Basic(Blue), "magenta": Basic(Magenta), "cyan": Basic(Cyan), "white": Basic(White), "bright_black": Basic(BrightBlack), "bright_red": Basic(BrightRed), "bright_green": Basic(BrightGreen), "bright_yellow": Basic(BrightYellow), "bright_blue": Basic(BrightBlue), "bright_magenta": Basic(BrightMagenta), "bright_cyan": Basic(BrightCyan), "bright_white": Basic(BrightWhite), "orange": RGBColor(255, 165, 0), "pink": RGBColor(255, 192, 203), "purple": RGBColor(128, 0, 128), "teal": RGBColor(0, 128, 128), "lime": RGBColor(0, 255, 0), "brown": RGBColor(165, 42, 42), "gray": RGBColor(128, 128, 128), "gold": RGBColor(255, 215, 0), "bright_orange": RGBColor(255, 200, 0), "bright_pink": RGBColor(255, 215, 230), "bright_purple": RGBColor(180, 0, 180), "bright_teal": RGBColor(0, 200, 200), "bright_lime": RGBColor(128, 255, 128), "bright_brown": RGBColor(210, 105, 30), "bright_gray": RGBColor(180, 180, 180), "bright_gold": RGBColor(255, 235, 128), }
Functions ¶
This section is empty.
Types ¶
type Basic ¶
type Basic BasicColor
type BasicColor ¶
type BasicColor int
const ( Black BasicColor = iota Red Green Yellow Blue Magenta Cyan White BrightBlack BrightRed BrightGreen BrightYellow BrightBlue BrightMagenta BrightCyan BrightWhite )
type Border ¶
type Border struct {
Chars BorderChars
Style BorderStyle
}
type BorderChars ¶
type BorderStyle ¶
func (BorderStyle) Base ¶
func (s BorderStyle) Base() Style
type Box ¶
type Box struct {
Width int
SizeMode SizeMode
MinWidth int
PaddingX int
PaddingY int
MarginX int
MarginY int
Style BoxStyle
Border Border
Blocks []Block
}
func NewAutoBox ¶
func NewAutoBox() *Box
type InlineSegment ¶
type InlineSegment struct{ Items []Inline }
func (InlineSegment) Width ¶
func (seg InlineSegment) Width() int
type Style ¶
type StyledTextBlockSegment ¶ added in v0.0.9
type StyledTextBlockSegment struct {
Raw string
}
func (StyledTextBlockSegment) Render ¶ added in v0.0.9
func (s StyledTextBlockSegment) Render(base Style, width int) []string
func (StyledTextBlockSegment) Width ¶ added in v0.0.9
func (s StyledTextBlockSegment) Width() int
type TextBlockSegment ¶
func (TextBlockSegment) Width ¶
func (s TextBlockSegment) Width() int
Click to show internal directories.
Click to hide internal directories.