widget

package
v0.0.0-...-cdcfc43 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Regist

func Regist(typeName string, c ICreator) error

func ShowHelp

func ShowHelp(typeName string)

func Unregist

func Unregist(typeName string)

Types

type Config

type Config struct {
	Name        string            `json:"name,omitempty"`
	Type        string            `json:"type,omitempty"`
	ID          string            `json:"id,omitempty"`
	Value       string            `json:"value,omitempty"`
	PlaceHolder string            `json:"place_holder,omitempty"`
	Width       float32           `json:"width,omitempty"`
	Height      float32           `json:"height,omitempty"`
	IgnoreChild bool              `json:"ignore_child,omitempty"`
	Childs      []string          `json:"childs,omitempty"` //widget id list
	Params      map[string]string `json:"params,omitempty"`
}

type ConfigSource

type ConfigSource func(id string) Config

type Creator

type Creator func(conf Config, childs []fyne.CanvasObject) (fyne.CanvasObject, error)

type Factory

type Factory struct {
	// contains filtered or unexported fields
}

func NewFactory

func NewFactory(conf ConfigSource) *Factory

func (*Factory) NewWidget

func (f *Factory) NewWidget(id string) (fyne.CanvasObject, error)

type ICreator

type ICreator interface {
	Create(conf Config, childs []fyne.CanvasObject) (fyne.CanvasObject, error)
	Help() string
}

Jump to

Keyboard shortcuts

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