fynitude

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2024 License: MIT Imports: 4 Imported by: 0

README

Fynitude

A library of reusable widgets for Fyne v2, the Golang GUI toolkit

Widgets

Dynamic Select

This widget allows the list of options to be refreshed dynamically when opened. The default Fyne Select widget only supports a predefined list. With this Dynamic Select widget, you can trigger a list refresh on demand.

Tappable Image

This widget triggers a custom event when clicked. Unfortunately, the default Fyne Image widget is not clickable.

Contributions

Feel free to submit issues for suggestions or bug fixes.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DynamicSelectWidget

type DynamicSelectWidget struct {
	widget.Select

	Options func() []string
}

*

  • A Select that triggers the options function before opening
  • This allows you to implement the options function

func NewDynamicSelectWidget

func NewDynamicSelectWidget(options func() []string, changed func(string)) *DynamicSelectWidget

*

  • Create the dynamic select
  • @param options is the function that refreshes the list of options
  • @param changed is the triggered function when an option is selected
  • @return a configured DynamicSelectWidget

func (*DynamicSelectWidget) Tapped

func (w *DynamicSelectWidget) Tapped(point *fyne.PointEvent)

type TappableImageWidget

type TappableImageWidget struct {
	widget.BaseWidget

	Canvas *canvas.Image
	Tapp   func(pointEvent *fyne.PointEvent)
}

*

  • An image widget that can be clicked to trigger a custom function

func NewTappableImageWidget

func NewTappableImageWidget(image image.Image, tapped func(pointEvent *fyne.PointEvent)) *TappableImageWidget

*

  • Create the tappable image widget
  • @param image is the initial image
  • @param tapped is the custom event triggered
  • @return a configured TappableImageWidget

func (*TappableImageWidget) CreateRenderer

func (w *TappableImageWidget) CreateRenderer() fyne.WidgetRenderer

func (*TappableImageWidget) Tapped

func (w *TappableImageWidget) Tapped(pointEvent *fyne.PointEvent)

Jump to

Keyboard shortcuts

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