Upgrade to v2.5
Fyne API v2.5
app
canvas
container
data/binding
data/validation
dialog
driver
driver/desktop
driver/mobile
driver/software
lang
layout
storage
storage/repository
test
theme
widget
package widget
Accordion
AccordionItem
Activity
BaseWidget
Button
ButtonAlign
ButtonIconPlacement
ButtonImportance
ButtonStyle
Card
Check
CheckGroup
CustomTextGridStyle
DisableableWidget
Entry
FileIcon
Form
FormItem
GridWrap
GridWrapItemID
Hyperlink
HyperlinkSegment
Icon
ImageSegment
Importance
Label
List
ListItemID
ListSegment
Menu
Orientation
ParagraphSegment
PopUp
PopUpMenu
ProgressBar
ProgressBarInfinite
RadioGroup
RichText
RichTextBlock
RichTextSegment
RichTextStyle
Select
SelectEntry
Separator
SeparatorSegment
Slider
Table
TableCellID
TextGrid
TextGridCell
TextGridRow
TextGridStyle
TextSegment
Toolbar
ToolbarAction
ToolbarItem
ToolbarSeparator
ToolbarSpacer
Tree
TreeNodeID
Fyne API "widget.HyperlinkSegment"
widget.HyperlinkSegment
import "fyne.io/fyne/v2/widget"
Usage
type HyperlinkSegment
type HyperlinkSegment struct {
Alignment fyne.TextAlign
Text string
URL *url.URL
// OnTapped overrides the default `fyne.OpenURL` call when the link is tapped
//
// Since: 2.4
OnTapped func() `json:"-"`
}
HyperlinkSegment represents a hyperlink within a rich text widget.
Since:
2.1
func (*HyperlinkSegment) Inline
func (h *HyperlinkSegment) Inline() bool
Inline returns true as hyperlinks are inside other elements.
func (*HyperlinkSegment) Select
func (h *HyperlinkSegment) Select(begin, end fyne.Position)
Select tells the segment that the user is selecting the content between the two positions.
func (*HyperlinkSegment) SelectedText
func (h *HyperlinkSegment) SelectedText() string
SelectedText should return the text representation of any content currently selected through the Select call.
func (*HyperlinkSegment) Textual
func (h *HyperlinkSegment) Textual() string
Textual returns the content of this segment rendered to plain text.
func (*HyperlinkSegment) Unselect
func (h *HyperlinkSegment) Unselect()
Unselect tells the segment that the user is has cancelled the previous selection.
func (*HyperlinkSegment) Update
func (h *HyperlinkSegment) Update(o fyne.CanvasObject)
Update applies the current state of this hyperlink segment to an existing visual.
func (*HyperlinkSegment) Visual
func (h *HyperlinkSegment) Visual() fyne.CanvasObject
Visual returns the hyperlink widget required to render this segment.