types

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckSave added in v0.0.7

func CheckSave(field *conf.Field[fyne.CanvasObject]) (ok bool)

CheckSave checks if the field type is supported get widget value and set it to field using SetValue.

func CheckWidget added in v0.0.7

func CheckWidget(field *conf.Field[fyne.CanvasObject]) (w fyne.CanvasObject, h, ok bool)

CheckWidget creates and returns widget and true if the field type is supported.

func GetValue added in v0.0.7

func GetValue[T Types[T]](val T) string

GetValue returns the value of the GetValueType.

func GetWidgetValue added in v0.0.7

func GetWidgetValue[T Types[T]](val T, field *conf.Field[fyne.CanvasObject]) string

GetWidgetValue returns the widget value.

func NewWidget added in v0.0.7

func NewWidget[T Types[T], F any](field *conf.Field[F]) (fyne.CanvasObject, bool)

NewWidget creates and returns widget and true if the field type is supported.

func SetValue added in v0.0.7

func SetValue[T Types[T], F any](field *conf.Field[F], val string)

SetValue sets the value to field.Value.

Types

type Email added in v0.0.7

type Email string

Email type.

func (Email) GetValue added in v0.0.7

func (p Email) GetValue() string

GetValue returns the value of the pmail.

func (Email) GetWidgetValue added in v0.0.7

func (p Email) GetWidgetValue(field *conf.Field[fyne.CanvasObject]) string

GetWidgetValue returns the widget value.

func (Email) NewWidget added in v0.0.7

func (p Email) NewWidget() (fyne.CanvasObject, bool)

NewWidget creates and returns widget and true if hint for this field is supported.

func (Email) SetValue added in v0.0.7

func (p Email) SetValue(val string) Email

SetValue sets the value of the pmail.

type Multiline added in v0.0.7

type Multiline struct {
	Value         string `json:"value"`
	MultiLineRows int    `json:"multiline_rows"`
}

Password type.

func (Multiline) GetNumRows added in v0.0.7

func (m Multiline) GetNumRows() int

GetNumRows returns the number of visible rows without scrolling of the multiline entry.

func (Multiline) GetValue added in v0.0.7

func (m Multiline) GetValue() string

GetValue returns the value of the password.

func (Multiline) GetWidgetValue added in v0.0.7

func (p Multiline) GetWidgetValue(field *conf.Field[fyne.CanvasObject]) string

GetWidgetValue returns the widget value.

func (Multiline) NewWidget added in v0.0.7

func (m Multiline) NewWidget() (fyne.CanvasObject, bool)

NewWidget creates and returns widget and true if hint for this field is supported.

func (*Multiline) SetNumRows added in v0.0.7

func (m *Multiline) SetNumRows(num int)

SetNumRows sets the number of visible rows without scrolling of the widget.

func (Multiline) SetValue added in v0.0.7

func (m Multiline) SetValue(val string) Multiline

SetValue sets the value of the password.

type Password

type Password string

Password type.

func (Password) GetValue

func (p Password) GetValue() string

GetValue returns the value of the password.

func (Password) GetWidgetValue added in v0.0.7

func (p Password) GetWidgetValue(field *conf.Field[fyne.CanvasObject]) string

GetWidgetValue returns the widget value.

func (Password) NewWidget added in v0.0.7

func (p Password) NewWidget() (fyne.CanvasObject, bool)

NewWidget creates and returns widget and true if hint for this field is supported.

func (Password) SetValue

func (p Password) SetValue(val string) Password

SetValue sets the value of the password.

type RadioGroup

type RadioGroup struct {
	Options    []string `json:"options"`
	Horizontal bool     `json:"horizontal"`
	Selected   int      `json:"selected"`
}

RadioGroup type.

func (RadioGroup) GetHorizontal

func (o RadioGroup) GetHorizontal() bool

GetHorizontal returns the horizontal type of the radio group type or false.

func (RadioGroup) GetOptions

func (o RadioGroup) GetOptions() []string

GetOptions returns the options of the radio group.

func (RadioGroup) GetParams added in v0.0.7

func (o RadioGroup) GetParams() (options []string, horizontal bool)

GetParams returns the options, horizontal layout flag, and selected option string.

func (RadioGroup) GetSelected

func (o RadioGroup) GetSelected() int

GetSelected returns the selected option index of the radio group.

func (RadioGroup) GetValue

func (o RadioGroup) GetValue() (s string)

GetValue returns the selected option string of the radio group.

func (RadioGroup) GetWidgetValue added in v0.0.7

func (p RadioGroup) GetWidgetValue(field *conf.Field[fyne.CanvasObject]) string

GetWidgetValue returns the widget value.

func (RadioGroup) NewWidget added in v0.0.7

func (o RadioGroup) NewWidget() (fyne.CanvasObject, bool)

NewWidget creates and returns widget and true if hint for this field is supported.

func (*RadioGroup) SetHorizontal added in v0.0.7

func (o *RadioGroup) SetHorizontal()

SetHorizontal sets the horizontal type of the radio group type.

func (*RadioGroup) SetOptions added in v0.0.7

func (o *RadioGroup) SetOptions(options []string)

SetOptions sets the options of the radio group.

func (RadioGroup) SetValue

func (o RadioGroup) SetValue(val string) RadioGroup

SetValue sets the selected option index of the radio group by the given string value.

func (*RadioGroup) SetVertical added in v0.0.7

func (o *RadioGroup) SetVertical()

SetVertical sets the vertical type of the radio group type.

type Types added in v0.0.7

type Types[T any] interface {
	GetValue() string
	SetValue(val string) T
	NewWidget() (fyne.CanvasObject, bool)
	GetWidgetValue(field *conf.Field[fyne.CanvasObject]) string
}

Types interface type.

Jump to

Keyboard shortcuts

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