widget

package
v0.6.10-rc.2 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionHandler

type ActionHandler interface {
	HandleAction(action string, args []string, context map[string]any) (bool, error)
}

type Base

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

func (Base) TypeName

func (W Base) TypeName() string

type Box

type Box struct {
	*tview.Box
	Base
}

func NewBox

func NewBox() *Box

func (*Box) Decode

func (W *Box) Decode(input map[string]any) (Widget, error)

func (*Box) Encode

func (W *Box) Encode() (map[string]any, error)

type ConnectionReciever

type ConnectionReciever interface {
	SetConnection(args []string, sourceGetter func() cue.Value)
}

type TextView

type TextView struct {
	*tview.TextView
	Base
}

func NewTextView

func NewTextView() *TextView

func (*TextView) Decode

func (W *TextView) Decode(input map[string]any) (Widget, error)

func (*TextView) Encode

func (W *TextView) Encode() (map[string]any, error)

type ValueProducer

type ValueProducer interface {
	// function which returns a value
	GetValue() cue.Value

	// wrapper that reuses the path
	GetValueExpr(expr string) func() cue.Value
}

type Widget

type Widget interface {
	tview.Primitive

	TypeName() string

	Encode() (map[string]any, error)
	Decode(map[string]any) (Widget, error)
}

Widget is designed to fit in containers and be serializable

Jump to

Keyboard shortcuts

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