uiwidget

package
v0.0.0-...-9b3d5df Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewH

func NewH(level int, text string) *widget.RichText

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 NewH1

func NewH1(text string) *widget.RichText

NewH1 creates a new RichText widget with header level 1.

func NewH1WithData

func NewH1WithData(data binding.String) *widget.RichText

NewH1WithData creates a new RichText widget with header level 1.

func NewH2

func NewH2(text string) *widget.RichText

NewH2 creates a new RichText widget with header level 2.

func NewH2WithData

func NewH2WithData(data binding.String) *widget.RichText

NewH2WithData creates a new RichText widget with header level 2.

func NewH3

func NewH3(text string) *widget.RichText

NewH3 creates a new RichText widget with header level 3.

func NewH3WithData

func NewH3WithData(data binding.String) *widget.RichText

NewH3WithData creates a new RichText widget with header level 3.

func NewH4

func NewH4(text string) *widget.RichText

NewH4 creates a new RichText widget with header level 4.

func NewH4WithData

func NewH4WithData(data binding.String) *widget.RichText

NewH4WithData creates a new RichText widget with header level 4.

func NewH5

func NewH5(text string) *widget.RichText

NewH5 creates a new RichText widget with header level 5.

func NewH5WithData

func NewH5WithData(data binding.String) *widget.RichText

NewH5WithData creates a new RichText widget with header level 5.

func NewH6

func NewH6(text string) *widget.RichText

NewH6 creates a new RichText widget with header level 6.

func NewH6WithData

func NewH6WithData(data binding.String) *widget.RichText

NewH6WithData creates a new RichText widget with header level 6.

func NewHWithData

func NewHWithData(level int, data binding.String) *widget.RichText

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

func NewLabel(text string, opts ...LabelOpts) *widget.Label

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

func NewLabelWithData(data binding.String, opts ...LabelOpts) *widget.Label

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

type LabelOpts interface {
	ApplyTo(*widget.Label)
}

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.

Jump to

Keyboard shortcuts

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