Documentation
¶
Overview ¶
Package text implements text styling.
Index ¶
- type Alignment
- type Font
- type StrikethroughStyle
- type Style
- func (f *Style) Alignment() Alignment
- func (f *Style) ClearAlignment()
- func (f *Style) ClearFont()
- func (f *Style) ClearHyphenation()
- func (f *Style) ClearLineHeightMultiple()
- func (f *Style) ClearStrikethroughColor()
- func (f *Style) ClearStrikethroughStyle()
- func (f *Style) ClearTextColor()
- func (f *Style) ClearTruncation()
- func (f *Style) ClearTruncationString()
- func (f *Style) ClearUnderlineColor()
- func (f *Style) ClearUnderlineStyle()
- func (f *Style) ClearWrap()
- func (f *Style) Font() Font
- func (f *Style) Hyphenation() float64
- func (f *Style) LineHeightMultiple() float64
- func (f *Style) MarshalProtobuf() *pbtext.TextStyle
- func (f *Style) SetAlignment(v Alignment)
- func (f *Style) SetFont(v Font)
- func (f *Style) SetHyphenation(v float64)
- func (f *Style) SetLineHeightMultiple(v float64)
- func (f *Style) SetStrikethroughColor(v color.Color)
- func (f *Style) SetStrikethroughStyle(v StrikethroughStyle)
- func (f *Style) SetTextColor(v color.Color)
- func (f *Style) SetTruncation(v Truncation)
- func (f *Style) SetTruncationString(v string)
- func (f *Style) SetUnderlineColor(v color.Color)
- func (f *Style) SetUnderlineStyle(v UnderlineStyle)
- func (f *Style) SetWrap(v Wrap)
- func (f *Style) StrikethroughColor() color.Color
- func (f *Style) StrikethroughStyle() StrikethroughStyle
- func (f *Style) TextColor() color.Color
- func (f *Style) Truncation() Truncation
- func (f *Style) TruncationString() string
- func (f *Style) UnderlineColor() color.Color
- func (f *Style) UnderlineStyle() UnderlineStyle
- func (f *Style) Update(u *Style)
- func (f *Style) Wrap() Wrap
- type Text
- type Truncation
- type UnderlineStyle
- type Wrap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Alignment ¶
type Alignment int
Alignment represents a text alignment.
func (Alignment) MarshalProtobuf ¶
func (a Alignment) MarshalProtobuf() pbtext.TextAlignment
type StrikethroughStyle ¶
type StrikethroughStyle int
StrikethroughStyle represents a text strikethrough style.
const ( StrikethroughStyleNone StrikethroughStyle = iota StrikethroughStyleSingle StrikethroughStyleDouble StrikethroughStyleThick StrikethroughStyleDotted StrikethroughStyleDashed )
func (StrikethroughStyle) MarshalProtobuf ¶
func (a StrikethroughStyle) MarshalProtobuf() pbtext.StrikethroughStyle
type Style ¶
type Style struct {
// contains filtered or unexported fields
}
Style holds a group of text formatting options.
func (*Style) ClearAlignment ¶
func (f *Style) ClearAlignment()
func (*Style) ClearHyphenation ¶
func (f *Style) ClearHyphenation()
func (*Style) ClearLineHeightMultiple ¶
func (f *Style) ClearLineHeightMultiple()
func (*Style) ClearStrikethroughColor ¶
func (f *Style) ClearStrikethroughColor()
func (*Style) ClearStrikethroughStyle ¶
func (f *Style) ClearStrikethroughStyle()
func (*Style) ClearTextColor ¶
func (f *Style) ClearTextColor()
func (*Style) ClearTruncation ¶
func (f *Style) ClearTruncation()
func (*Style) ClearTruncationString ¶
func (f *Style) ClearTruncationString()
func (*Style) ClearUnderlineColor ¶
func (f *Style) ClearUnderlineColor()
func (*Style) ClearUnderlineStyle ¶
func (f *Style) ClearUnderlineStyle()
func (*Style) Hyphenation ¶
func (*Style) LineHeightMultiple ¶
func (*Style) MarshalProtobuf ¶
func (*Style) SetAlignment ¶
func (*Style) SetHyphenation ¶
func (*Style) SetLineHeightMultiple ¶
func (*Style) SetStrikethroughColor ¶
func (*Style) SetStrikethroughStyle ¶
func (f *Style) SetStrikethroughStyle(v StrikethroughStyle)
func (*Style) SetTextColor ¶
func (*Style) SetTruncation ¶
func (f *Style) SetTruncation(v Truncation)
func (*Style) SetTruncationString ¶
func (*Style) SetUnderlineColor ¶
func (*Style) SetUnderlineStyle ¶
func (f *Style) SetUnderlineStyle(v UnderlineStyle)
func (*Style) StrikethroughColor ¶
func (*Style) StrikethroughStyle ¶
func (f *Style) StrikethroughStyle() StrikethroughStyle
func (*Style) Truncation ¶
func (f *Style) Truncation() Truncation
func (*Style) TruncationString ¶
func (*Style) UnderlineColor ¶
func (*Style) UnderlineStyle ¶
func (f *Style) UnderlineStyle() UnderlineStyle
type Text ¶
type Text struct {
// contains filtered or unexported fields
}
func (*Text) MarshalProtobuf ¶
type Truncation ¶
type Truncation int
Truncation represents how text is truncated to fit within the bounds.
const ( TruncationNone Truncation = iota TruncationStart TruncationMiddle TruncationEnd )
func (Truncation) MarshalProtobuf ¶
func (a Truncation) MarshalProtobuf() pbtext.Truncation
type UnderlineStyle ¶
type UnderlineStyle int
StrikethroughStyle represents a text underline style.
const ( UnderlineStyleNone UnderlineStyle = iota UnderlineStyleSingle UnderlineStyleDouble UnderlineStyleThick UnderlineStyleDotted UnderlineStyleDashed )
func (UnderlineStyle) MarshalProtobuf ¶
func (a UnderlineStyle) MarshalProtobuf() pbtext.UnderlineStyle
Click to show internal directories.
Click to hide internal directories.