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(minSize *fyne.Size, data binding.String, upHandler func(), downHandler func()) fyne.CanvasObject
- func NewWidgetBorder(widget fyne.CanvasObject) fyne.CanvasObject
- type DateEntry
- func (e *DateEntry) CreateRenderer() fyne.WidgetRenderer
- func (e *DateEntry) Disable()
- func (e *DateEntry) Enable()
- func (e *DateEntry) GetDate() time.Time
- func (e *DateEntry) MinSize() fyne.Size
- func (e *DateEntry) Move(pos fyne.Position)
- func (e *DateEntry) Resize(size fyne.Size)
- func (e *DateEntry) SetDate(date time.Time)
- type LabelOpts
- type ScoreDisplay
- type ScoreDisplayLayout
- type ScoreDisplayResources
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( 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
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.
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