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 *ningen.State, m *discord.Message)
- func ParseToMarkup(content []byte) []byte
- func ParseToMarkupWithMessage(content []byte, s store.Cabinet, m *discord.Message) []byte
- func ParseToSimpleMarkupWithMessage(content []byte, s store.Cabinet, m *discord.Message) []byte
- func ParseWithMessage(content []byte, dst *gtk.TextView, s *ningen.State, m *discord.Message)
- func WrapTag(tv *gtk.TextView, props map[string]interface{})
- 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 ¶ added in v0.0.4
func ChangeStyle ¶
func Parse ¶
func Parse(content []byte, dst *gtk.TextView, opts ...parser.ParseOption)
func ParseMessageContent ¶
func ParseToMarkup ¶
func ParseWithMessage ¶
Types ¶
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 NewRenderer(tv *gtk.TextView) *Renderer
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.