widget

package
v0.0.0-...-1f748fc Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2023 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Editor

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

func NewEditor

func NewEditor(e *widget.Editor) *Editor

func (*Editor) Editor

func (e *Editor) Editor() *widget.Editor

func (*Editor) SetText

func (e *Editor) SetText(s string)

type Item

type Item interface {
	// ID should be unique
	ID() string
	// Widget format gio widget
	Widget(th *material.Theme) layout.Widget
	// Handler handle gio widget events
	Handler()
	// Set widget data
	Set(any)
	// Get widget data
	Get() any
}

Item widget item interface

type List

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

List of Items

func NewList

func NewList(list []Item) *List

func (*List) Get

func (l *List) Get(id string) (data any)

Get item data by id handle with Item.Get

func (*List) Set

func (l *List) Set(id string, data any) (ok bool)

Set item data by id handle with Item.Set

Jump to

Keyboard shortcuts

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