gui

package
v0.0.0-...-ba84006 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2025 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollectionClassList

func CollectionClassList() []string

CollectionClassList returns the list of supported collection widget classes. These can be used for passing to `CreateNew` or `EditorFor`.

func ContainerClassList

func ContainerClassList() []string

ContainerClassList returns the list of supported container classes. These can be used for passing to `CreateNew` or `EditorFor`.

func CreateNew

func CreateNew(name string) fyne.CanvasObject

CreateNew returns a new instance of the given widget type

func DecodeMap

func DecodeMap(m map[string]interface{}, meta map[fyne.CanvasObject]map[string]string) (fyne.CanvasObject, error)

DecodeMap returns a tree of `CanvasObject` elements from the provided JSON map and updates the metadata map to include any additional information.

func DecodeObject

func DecodeObject(r io.Reader) (fyne.CanvasObject, map[fyne.CanvasObject]map[string]string, error)

DecodeObject returns a tree of `CanvasObject` elements from the provided JSON `Reader` and updates the metadata map to include any additional information.

func DropZonesForObject

func DropZonesForObject(o fyne.CanvasObject) []fyne.CanvasObject

DropZonesForObject returns the children of a container that can be used as drag and drop target zones

func EditorFor

func EditorFor(o fyne.CanvasObject, props map[string]string, refresh func([]*widget.FormItem), onchanged func()) []*widget.FormItem

EditorFor returns an array of FormItems for editing, taking the widget, properties, callback to refresh the form items, and an optional callback that fires after changes to the widget.

func EncodeMap

func EncodeMap(obj fyne.CanvasObject, meta map[fyne.CanvasObject]map[string]string) (interface{}, error)

EncodeMap returns a JSON map for the tree of `CanvasObject` elements provided, using additional metadata if required. If an error occurs it will be returned, otherwise nil.

func EncodeObject

func EncodeObject(obj fyne.CanvasObject, meta map[fyne.CanvasObject]map[string]string, w io.Writer) error

EncodeObject writes a JSON stream for the tree of `CanvasObject` elements provided. If an error occurs it will be returned, otherwise nil.

func ExportGo

func ExportGo(obj fyne.CanvasObject, meta map[fyne.CanvasObject]map[string]string, name string, w io.Writer) error

ExportGo generates a full Go package for the given object and writes it to the provided file handle

func ExportGoPreview

func ExportGoPreview(obj fyne.CanvasObject, meta map[fyne.CanvasObject]map[string]string, w io.Writer) error

ExportGoPreview generates a preview version of the Go code with a `main()` method for the given object and writes it to the file handle

func GoStringFor

func GoStringFor(o fyne.CanvasObject, props map[fyne.CanvasObject]map[string]string, defs map[string]string) string

GoStringFor generates the Go code for the given widget

func GraphicsClassList

func GraphicsClassList() []string

GraphicsClassList returns the list of supported graphics primitives classes. These can be used for passing to `CreateNew` or `EditorFor`.

func NameOf

func NameOf(o fyne.CanvasObject) string

NameOf returns the name for a given object

func WidgetClassList

func WidgetClassList() []string

WidgetClassList returns the list of supported widget classes. These can be used for passing to `CreateNew` or `EditorFor`.

Types

This section is empty.

Jump to

Keyboard shortcuts

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