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

Usage

type ExternalTree

type ExternalTree[T any] interface {
	Tree[T]

	Reload() error
}

ExternalTree supports binding a tree of values, of type T, from an external variable.

Since: 2.7

func BindBoolTree

func BindBoolTree(ids *map[string][]string, v *map[string]bool) ExternalTree[bool]

BindBoolTree returns a bound tree of bool values, based on the contents of the passed values. The ids map specifies how each item relates to its parent (with id “”), with the values being in the v map. If your code changes the content of the maps this refers to you should call Reload() to inform the bindings.

Since: 2.4

func BindBytesTree

func BindBytesTree(ids *map[string][]string, v *map[string][]byte) ExternalTree[[]byte]

BindBytesTree returns a bound tree of []byte values, based on the contents of the passed values. The ids map specifies how each item relates to its parent (with id “”), with the values being in the v map. If your code changes the content of the maps this refers to you should call Reload() to inform the bindings.

Since: 2.4

func BindFloatTree

func BindFloatTree(ids *map[string][]string, v *map[string]float64) ExternalTree[float64]

BindFloatTree returns a bound tree of float64 values, based on the contents of the passed values. The ids map specifies how each item relates to its parent (with id “”), with the values being in the v map. If your code changes the content of the maps this refers to you should call Reload() to inform the bindings.

Since: 2.4

func BindIntTree

func BindIntTree(ids *map[string][]string, v *map[string]int) ExternalTree[int]

BindIntTree returns a bound tree of int values, based on the contents of the passed values. The ids map specifies how each item relates to its parent (with id “”), with the values being in the v map. If your code changes the content of the maps this refers to you should call Reload() to inform the bindings.

Since: 2.4

func BindRuneTree

func BindRuneTree(ids *map[string][]string, v *map[string]rune) ExternalTree[rune]

BindRuneTree returns a bound tree of rune values, based on the contents of the passed values. The ids map specifies how each item relates to its parent (with id “”), with the values being in the v map. If your code changes the content of the maps this refers to you should call Reload() to inform the bindings.

Since: 2.4

func BindStringTree

func BindStringTree(ids *map[string][]string, v *map[string]string) ExternalTree[string]

BindStringTree returns a bound tree of string values, based on the contents of the passed values. The ids map specifies how each item relates to its parent (with id “”), with the values being in the v map. If your code changes the content of the maps this refers to you should call Reload() to inform the bindings.

Since: 2.4

func BindTree

func BindTree[T any](ids *map[string][]string, v *map[string]T, comparator func(T, T) bool) ExternalTree[T]

BindTree returns a bound tree of values with type T, based on the contents of the passed values. The ids map specifies how each item relates to its parent (with id “”), with the values being in the v map. If your code changes the content of the maps this refers to you should call Reload() to inform the bindings.

Since: 2.7

func BindURITree

func BindURITree(ids *map[string][]string, v *map[string]fyne.URI) ExternalTree[fyne.URI]

BindURITree returns a bound tree of fyne.URI values, based on the contents of the passed values. The ids map specifies how each item relates to its parent (with id “”), with the values being in the v map. If your code changes the content of the maps this refers to you should call Reload() to inform the bindings.

Since: 2.4

func BindUntypedTree

func BindUntypedTree(ids *map[string][]string, v *map[string]any) ExternalTree[any]

BindUntypedTree returns a bound tree of any values, based on the contents of the passed values. The ids map specifies how each item relates to its parent (with id “”), with the values being in the v map. If your code changes the content of the maps this refers to you should call Reload() to inform the bindings.

Since: 2.4