Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BindLinkHandler ¶
func BindLinkHandler(tview *gtk.TextView, onURL func(string))
BindLinkHandler binds input handlers for triggering hyperlinks within the TextView.
Types ¶
type EmbeddedURL ¶
EmbeddedURL is a type that describes a URL and its bounds within a text buffer.
func ParseEmbeddedURL ¶
func ParseEmbeddedURL(data string) (EmbeddedURL, bool)
ParseEmbeddedURL parses the inlined data into an embedded URL structure.
func (*EmbeddedURL) Bounds ¶
func (e *EmbeddedURL) Bounds(buf *gtk.TextBuffer) (start, end *gtk.TextIter)
Bounds returns the bound iterators from the given text buffer.
type Opts ¶ added in v0.1.3
type Opts struct { // SkipReply, if true, will skip rendering all mx-reply tags. SkipReply bool }
Opts is the options for rendering.
type RenderMetadata ¶
type RenderMetadata struct { // RefID is the ID to the message that the current message is a reply to, or // empty if there isn't one. RefID matrix.EventID // URLs is the list of valid URLs in the message. It is used for generating // rich embeds. URLs []string }
RenderMetadata contains additional metadata that the message contains.
type RenderWidget ¶
type RenderWidget struct { RenderWidgetter RenderMetadata }
RenderWidget describes the output of the render including the widget that contains the rendered information.
func RenderHTML ¶
RenderHTML tries rendering the HTML and falls back to using plain text if the HTML doesn't work.
func RenderText ¶
func RenderText(ctx context.Context, text string) RenderWidget
RenderText renders the given plain text.
type RenderWidgetter ¶
type RenderWidgetter interface {
gtk.Widgetter
SetExtraMenu(model gio.MenuModeller)
}
RenderWidgetter extends a Widgetter.