window

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FormData

type FormData struct {
	Label string
	Link  string
}

func (*FormData) Validate

func (f *FormData) Validate() error

type HoverList added in v0.0.2

type HoverList struct {
	fyne.CanvasObject
	// contains filtered or unexported fields
}

func (*HoverList) MouseIn added in v0.0.2

func (h *HoverList) MouseIn(*desktop.MouseEvent)

func (*HoverList) MouseMoved added in v0.0.2

func (h *HoverList) MouseMoved(*desktop.MouseEvent)

func (*HoverList) MouseOut added in v0.0.2

func (h *HoverList) MouseOut()

type ListItem

type ListItem interface {
	NetworkRecorder

	Label() string
	Link() string
	XRayConfig() map[string]string
	Active() bool
}

type NetworkRecorder

type NetworkRecorder interface {
	// Read should return values for uplink for each previous RecordInterval.
	// Number of values returned must match Written.
	Read() []float64
	// Written should return values for downlink for each previous RecordInterval.
	// Number of values returned must match Written.
	Written() []float64
	// BytesRead should return the total number of bytes for uplink.
	BytesRead() int
	// BytesWritten should return the total number of bytes for downlink.
	BytesWritten() int
	RecordInterval() time.Duration
}

type Settings

type Settings[T ListItem] struct {
	// contains filtered or unexported fields
}

func NewSettings

func NewSettings[T ListItem](
	a fyne.App,
	list binding.ExternalUntypedList,
	onAdd func(data FormData) error,
	onUpdate func(FormData, T) error,
	onDelete func(T) error,
	onSwap func(T, T) error,
) *Settings[T]

func (*Settings[T]) OnClosed

func (w *Settings[T]) OnClosed(fn func())

func (*Settings[T]) Refresh

func (w *Settings[T]) Refresh()

func (*Settings[T]) Show

func (w *Settings[T]) Show()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳