Documentation ¶
Index ¶
- func NewH(level int, text string) *widget.RichText
- func NewH1(text string) *widget.RichText
- func NewH1WithData(data binding.String) *widget.RichText
- func NewH2(text string) *widget.RichText
- func NewH2WithData(data binding.String) *widget.RichText
- func NewH3(text string) *widget.RichText
- func NewH3WithData(data binding.String) *widget.RichText
- func NewH4(text string) *widget.RichText
- func NewH4WithData(data binding.String) *widget.RichText
- func NewH5(text string) *widget.RichText
- func NewH5WithData(data binding.String) *widget.RichText
- func NewH6(text string) *widget.RichText
- func NewH6WithData(data binding.String) *widget.RichText
- func NewHWithData(level int, data binding.String) *widget.RichText
- func NewLabel(text string, opts ...LabelOpts) *widget.Label
- func NewLabelWithData(data binding.String, opts ...LabelOpts) *widget.Label
- func NewUpDownLabelWithData(data binding.String, upHandler func(), downHandler func()) fyne.CanvasObject
- func NewWidgetBorder(widget fyne.CanvasObject) fyne.CanvasObject
- type LabelOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewH ¶
NewH creates a RichText widget formatted as a header of the provided level.
Parameters: - level: an integer representing the level of the text. - text: a string containing the text to display.
Returns a pointer to a RichText widget.
func NewH1WithData ¶
NewH1WithData creates a new RichText widget with header level 1.
func NewH2WithData ¶
NewH2WithData creates a new RichText widget with header level 2.
func NewH3WithData ¶
NewH3WithData creates a new RichText widget with header level 3.
func NewH4WithData ¶
NewH4WithData creates a new RichText widget with header level 4.
func NewH5WithData ¶
NewH5WithData creates a new RichText widget with header level 5.
func NewH6WithData ¶
NewH6WithData creates a new RichText widget with header level 6.
func NewHWithData ¶
NewHWithData creates a new RichText widget formatted as a header of the provided level.
Parameters: - level: an integer representing the level of the text. - data: a string binding containing the text to display.
Returns a pointer to a RichText widget.
func NewLabel ¶
NewLabel creates a new label widget with the given text and options.
Arguments - text: the text to be displayed on the label. - opts: optional configuration options for the label.
Returns *widget.Label: a pointer to the newly created label widget.
func NewLabelWithData ¶
NewLabelWithData creates a new Label widget with the provided data and options.
Arguments - data: The string data to be displayed on the label. - opts: Additional options to customize the label.
Returns *widget.Label: a pointer to the newly created Label widget.
func NewUpDownLabelWithData ¶
func NewUpDownLabelWithData( data binding.String, upHandler func(), downHandler func(), ) fyne.CanvasObject
NewUpDownLabelWithData creates a new label widget with up and down buttons.
Arguments - data: the string data to display in the label. - upHandler: the function to call when the up button is clicked. - downHandler: the function to call when the down button is clicked.
Returns fyne.CanvasObject: the created widget.
func NewWidgetBorder ¶
func NewWidgetBorder(widget fyne.CanvasObject) fyne.CanvasObject
NewWidgetBorder creates a new widget border for the given fyne.CanvasObject. It does so by wrapping the object in a Stack layout with a border drawn above the widget.
Types ¶
type LabelOpts ¶
LabelOpts defines the options for a label.
func AlignmentOpt ¶
func AlignmentOpt(alignment fyne.TextAlign) LabelOpts
AlignmentOpt returns a LabelOpts with the specified alignment.
func ImportanceOpt ¶
func ImportanceOpt(importance widget.Importance) LabelOpts
ImportanceOpt returns the label options for the given text importance option.
func TextStyleOpt ¶
func TextStyleOpt(style fyne.TextStyle) LabelOpts
TextStyleOpt returns the label options for the given text style.
func TruncationOpt ¶
func TruncationOpt(truncation fyne.TextTruncation) LabelOpts
TruncationOpt returns the label options for the given text truncation option.
func WrappingOpt ¶
func WrappingOpt(wrapping fyne.TextWrap) LabelOpts
WrappingOpt creates a LabelOpts with the specified text wrapping option.