uiwidget

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2024 License: MIT Imports: 13 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(
	minSize *fyne.Size,
	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 DateEntry

type DateEntry struct {
	widget.Entry

	OnDateChanged func(time.Time)
	// contains filtered or unexported fields
}

func NewDateEntry

func NewDateEntry() *DateEntry

func (*DateEntry) CreateRenderer

func (e *DateEntry) CreateRenderer() fyne.WidgetRenderer

func (*DateEntry) Disable

func (e *DateEntry) Disable()

func (*DateEntry) Enable

func (e *DateEntry) Enable()

func (*DateEntry) GetDate

func (e *DateEntry) GetDate() time.Time

func (*DateEntry) MinSize

func (e *DateEntry) MinSize() fyne.Size

func (*DateEntry) Move

func (e *DateEntry) Move(pos fyne.Position)

func (*DateEntry) Resize

func (e *DateEntry) Resize(size fyne.Size)

func (*DateEntry) SetDate

func (e *DateEntry) SetDate(date time.Time)

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.

type ScoreDisplay

type ScoreDisplay struct {
	widget.BaseWidget

	Score int
	// contains filtered or unexported fields
}

func NewScoreDisplay

func NewScoreDisplay(
	score int,
	numDigits int,
	resources *ScoreDisplayResources,
	relSize *fyne.Size,
	fizedSize *fyne.Size,
) *ScoreDisplay

func NewScoreDisplayWithData

func NewScoreDisplayWithData(
	scoreBinding binding.Int,
	numDigits int,
	resources *ScoreDisplayResources,
	relSize *fyne.Size,
	fixedSize *fyne.Size,
) *ScoreDisplay

func (*ScoreDisplay) CreateRenderer

func (sd *ScoreDisplay) CreateRenderer() fyne.WidgetRenderer

func (*ScoreDisplay) DataChanged

func (sd *ScoreDisplay) DataChanged()

func (*ScoreDisplay) MinSize

func (sd *ScoreDisplay) MinSize() fyne.Size

func (*ScoreDisplay) Refresh

func (sd *ScoreDisplay) Refresh()

func (*ScoreDisplay) Resize

func (sd *ScoreDisplay) Resize(size fyne.Size)

func (*ScoreDisplay) Size

func (sd *ScoreDisplay) Size() fyne.Size

type ScoreDisplayLayout

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

func NewScoreDisplayLayout

func NewScoreDisplayLayout(relSize *fyne.Size, fixedSize *fyne.Size) *ScoreDisplayLayout

func (*ScoreDisplayLayout) CurrentSize

func (sdl *ScoreDisplayLayout) CurrentSize() fyne.Size

func (*ScoreDisplayLayout) Layout

func (sdl *ScoreDisplayLayout) Layout(objects []fyne.CanvasObject, containerSize fyne.Size)

func (*ScoreDisplayLayout) MinSize

func (sdl *ScoreDisplayLayout) MinSize(objects []fyne.CanvasObject) fyne.Size

type ScoreDisplayResources

type ScoreDisplayResources struct {
	Empty  fyne.Resource
	Digits [10]fyne.Resource
}

func NewScoreDisplayResources

func NewScoreDisplayResources(
	empty fyne.Resource,
	digits [10]fyne.Resource,
) *ScoreDisplayResources

Jump to

Keyboard shortcuts

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