widget

package
v0.0.0-...-a55bc54 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDataListener

func NewDataListener(f func()) binding.DataListener

NewDataListener returns a new DataListener that calls the given function when the data changes.

Types

type FilePicker

type FilePicker struct {
	// The current path.
	// Empty is none.
	Path binding.String

	// Whether the file picker is disabled.
	IsDisabled binding.Bool

	// Whether the file picker is a directory picker.
	// If false, the file picker is a normal file picker.
	IsDirectoryPicker binding.Bool

	// The underlying widget.
	Widget fyne.CanvasObject
	// contains filtered or unexported fields
}

func NewFilePicker

func NewFilePicker(parent fyne.Window, locale lang.Locale) *FilePicker

NewFilePicker creates a new FilePicker.

func (*FilePicker) Clear

func (f *FilePicker) Clear()

Clear clears the path.

func (*FilePicker) HasPath

func (f *FilePicker) HasPath() bool

HasPath returns whether the path is not empty.

type TextList

type TextList struct {
	// The underlying widget.
	Widget *widget.List
}

TextList is a list of text items.

func NewTextList

func NewTextList(lenFunc func() int, updateFunc func(id widget.ListItemID) TextListItemData) *TextList

NewTextList creates a new TextList.

type TextListItemData

type TextListItemData struct {
	// The item's label text.
	Label string

	// Whether the item can be deleted.
	CanDelete bool

	// The function to call when attempting to delete the item.
	OnDelete func()
}

TextListItemData is data required to render a TextList item.

Jump to

Keyboard shortcuts

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