Documentation
¶
Index ¶
- func InsertFormatting(text string, spans ...*Span) string
- type BoolVal
- type Color
- type ColorVal
- type SGR
- type Span
- func (self *Span) SetBackground(val any) *Span
- func (self *Span) SetBold(val bool) *Span
- func (self *Span) SetClosingBackground(val any) *Span
- func (self *Span) SetClosingBold(val bool) *Span
- func (self *Span) SetClosingDim(val bool) *Span
- func (self *Span) SetClosingForeground(val any) *Span
- func (self *Span) SetClosingItalic(val bool) *Span
- func (self *Span) SetClosingReverse(val bool) *Span
- func (self *Span) SetClosingStrikethrough(val bool) *Span
- func (self *Span) SetClosingUnderlineColor(val any) *Span
- func (self *Span) SetClosingUnderlineStyle(val UnderlineStyle) *Span
- func (self *Span) SetDim(val bool) *Span
- func (self *Span) SetForeground(val any) *Span
- func (self *Span) SetItalic(val bool) *Span
- func (self *Span) SetReverse(val bool) *Span
- func (self *Span) SetStrikethrough(val bool) *Span
- func (self *Span) SetUnderlineColor(val any) *Span
- func (self *Span) SetUnderlineStyle(val UnderlineStyle) *Span
- type UnderlineStyle
- type UnderlineStyleVal
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InsertFormatting ¶
Insert formatting into text at the specified offsets, overriding any existing formatting, and restoring existing formatting after the replaced sections.
Types ¶
type SGR ¶
type SGR struct {
Italic, Reverse, Bold, Dim, Strikethrough BoolVal
Underline_style UnderlineStyleVal
Foreground, Background, Underline_color ColorVal
}
func SGRFromCSI ¶
type Span ¶
type Span struct {
Offset, Size int // in bytes
// contains filtered or unexported fields
}
func (*Span) SetBackground ¶
func (*Span) SetClosingBackground ¶
func (*Span) SetClosingBold ¶
func (*Span) SetClosingDim ¶
func (*Span) SetClosingForeground ¶
func (*Span) SetClosingItalic ¶
func (*Span) SetClosingReverse ¶
func (*Span) SetClosingStrikethrough ¶
func (*Span) SetClosingUnderlineColor ¶
func (*Span) SetClosingUnderlineStyle ¶
func (self *Span) SetClosingUnderlineStyle(val UnderlineStyle) *Span
func (*Span) SetForeground ¶
func (*Span) SetReverse ¶
func (*Span) SetStrikethrough ¶
func (*Span) SetUnderlineColor ¶
func (*Span) SetUnderlineStyle ¶
func (self *Span) SetUnderlineStyle(val UnderlineStyle) *Span
type UnderlineStyle ¶
type UnderlineStyle uint8
const ( No_underline UnderlineStyle = iota Straight_underline Double_underline Curly_underline Dotted_underline Dashed_underline )
type UnderlineStyleVal ¶
type UnderlineStyleVal struct { Is_set bool Val UnderlineStyle }
func (*UnderlineStyleVal) AsCSI ¶
func (self *UnderlineStyleVal) AsCSI() string
Click to show internal directories.
Click to hide internal directories.