Documentation ¶
Index ¶
- Constants
- Variables
- func AttrMarkup(a md.Attribute) string
- func ChangeStyle(styleName string) error
- func ColorTag(table *gtk.TextTagTable, attr md.Attribute, color string) *gtk.TextTag
- func EmojiURL(emojiID string, animated bool) string
- func Parse(content []byte, dst *gtk.TextView, opts ...parser.ParseOption)
- func ParseMessageContent(dst *gtk.TextView, s state.Store, m *discord.Message)
- func ParseToMarkup(content []byte) []byte
- func ParseToMarkupWithMessage(content []byte, s state.Store, m *discord.Message) []byte
- func ParseToSimpleMarkupWithMessage(content []byte, s state.Store, m *discord.Message) []byte
- func ParseWithMessage(content []byte, dst *gtk.TextView, s state.Store, m *discord.Message)
- func WrapTag(tv *gtk.TextView, props map[string]interface{})
- type Attribute
- type Formatter
- type MarkupRenderer
- type PressedEvent
- type Renderer
- type SimpleMarkupRenderer
- type Tag
- type TagState
Constants ¶
View Source
const ( InlineEmojiSize = 22 LargeEmojiSize = 48 )
Variables ¶
View Source
var ( ChannelPressed func(ev PressedEvent, ch *discord.Channel) UserPressed func(ev PressedEvent, user *discord.GuildUser) )
View Source
var EmptyTag = Tag{}
Functions ¶
func AttrMarkup ¶
func ChangeStyle ¶
func ParseMessageContent ¶
func ParseToMarkup ¶
func ParseWithMessage ¶
Types ¶
type Attribute ¶
type Attribute uint16
const ( AttrBold Attribute AttrItalics AttrUnderline AttrStrikethrough AttrSpoiler AttrMonospace AttrQuoted )
type Formatter ¶
type Formatter struct {
// contains filtered or unexported fields
}
Formatter that generates Pango markup.
type MarkupRenderer ¶
type MarkupRenderer struct {
// contains filtered or unexported fields
}
func NewMarkupRenderer ¶
func NewMarkupRenderer() *MarkupRenderer
type PressedEvent ¶
type PressedEvent struct { *gdk.EventButton TextView *gtk.TextView }
type Renderer ¶
type Renderer struct { View *gtk.TextView Buffer *gtk.TextBuffer // contains filtered or unexported fields }
Render is a non-thread-safe TextBuffer renderer.
func NewRenderer ¶
func (*Renderer) AddOptions ¶
AddOptions is a noop.
type SimpleMarkupRenderer ¶
type SimpleMarkupRenderer struct {
MarkupRenderer
}
func NewSimpleMarkupRenderer ¶
func NewSimpleMarkupRenderer() *SimpleMarkupRenderer
Click to show internal directories.
Click to hide internal directories.