labeluri

package
v0.0.0-...-6513b37 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2021 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AvatarSize   = 96
	PopoverWidth = 250
	MaxWidth     = 500
	MaxHeight    = 500
)

Variables

This section is empty.

Functions

func BindImagePreview

func BindImagePreview(connector WidgetConnector)

BindImagePreview binds activate-link to the label callback so that images have a popover preview.

func NewPopoverMentioner

func NewPopoverMentioner(rel gtk.IWidget, input string, segment text.Segment) *gtk.Popover

func PopoverMentioner

func PopoverMentioner(rel gtk.IWidget, input string, mention text.Segment)

func PromptOpen

func PromptOpen(uri string)

PromptOpen shows a dialog asking if the URL should be opened.

Types

type BoundBox

type BoundBox struct {
	// contains filtered or unexported fields
}

BoundBox is a box wrapping elements that can be interacted with from the parsed labels.

func BindRichLabel

func BindRichLabel(label *rich.Label) *BoundBox

func (*BoundBox) SetReferenceHighlighter

func (bound *BoundBox) SetReferenceHighlighter(refer ReferenceHighlighter)

type Label

type Label struct {
	*rich.Label
	*BoundBox
}

Label implements a label that's already bounded to the markup URI handlers.

func NewLabel

func NewLabel(txt text.Rich) *Label

func (*Label) Reset

func (l *Label) Reset()

type ReferenceHighlighter

type ReferenceHighlighter interface {
	HighlightReference(ref markup.ReferenceSegment)
}

type WidgetConnector

type WidgetConnector interface {
	gtk.IWidget
	primitives.Connector
}

WidgetConnector describes a connector that is also a widget.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL