Fyne API "binding.Tree"

binding.Tree


import "fyne.io/fyne/v2/data/binding"

Usage

type Tree

type Tree[T any] interface {
	DataTree

	Append(parent, id string, value T) error
	Get() (map[string][]string, map[string]T, error)
	GetValue(id string) (T, error)
	Prepend(parent, id string, value T) error
	Remove(id string) error
	Set(ids map[string][]string, values map[string]T) error
	SetValue(id string, value T) error
}

Tree supports binding a tree of values with type T.

Since: 2.7

func NewBoolTree

func NewBoolTree() Tree[bool]

NewBoolTree returns a bindable tree of bool values.

Since: 2.4

func NewBytesTree

func NewBytesTree() Tree[[]byte]

NewBytesTree returns a bindable tree of []byte values.

Since: 2.4

func NewFloatTree

func NewFloatTree() Tree[float64]

NewFloatTree returns a bindable tree of float64 values.

Since: 2.4

func NewIntTree

func NewIntTree() Tree[int]

NewIntTree returns a bindable tree of int values.

Since: 2.4

func NewRuneTree

func NewRuneTree() Tree[rune]

NewRuneTree returns a bindable tree of rune values.

Since: 2.4

func NewStringTree

func NewStringTree() Tree[string]

NewStringTree returns a bindable tree of string values.

Since: 2.4

func NewTree

func NewTree[T any](comparator func(T, T) bool) Tree[T]

NewTree returns a bindable tree of values with type T.

Since: 2.7

func NewURITree

func NewURITree() Tree[fyne.URI]

NewURITree returns a bindable tree of fyne.URI values.

Since: 2.4

func NewUntypedTree

func NewUntypedTree() Tree[any]

NewUntypedTree returns a bindable tree of any values.

Since: 2.5