teamodels

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomData

type CustomData struct {
	Data *golua.LTable
}

type CustomMSG

type CustomMSG struct {
	Original tea.Msg
	Values   []any
}

type CustomModel

type CustomModel struct {
	Program  int
	Data     *CustomData
	InitFn   *golua.LFunction
	UpdateFn *golua.LFunction
	ViewFn   *golua.LFunction
	State    *golua.LState
	Item     *TeaItem
	CMDBuild cmdBuilder
	MSGBuild msgBuilder
}

Data is double nested so the pointer can be modified even though the recievers are not pointers

func NewCustomModel

func NewCustomModel(program int, init, update, view *golua.LFunction, state *golua.LState, item *TeaItem, cmd cmdBuilder, msg msgBuilder) CustomModel

func (CustomModel) Init

func (m CustomModel) Init() tea.Cmd

func (CustomModel) Update

func (m CustomModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (CustomModel) View

func (m CustomModel) View() string

type TeaItem

type TeaItem struct {
	LuaModel *golua.LTable

	FnInit   *golua.LFunction
	FnUpdate *golua.LFunction
	FnView   *golua.LFunction

	Msg  *tea.Msg
	Cmds []tea.Cmd

	KeyBindings []*key.Binding

	Spinners      map[int]*spinner.Model
	TextAreas     []*textarea.Model
	TextInputs    []*textinput.Model
	Cursors       []*cursor.Model
	FilePickers   []*filepicker.Model
	Lists         []*list.Model
	ListDelegates []*list.DefaultDelegate
	Paginators    []*paginator.Model
	ProgressBars  []*progress.Model
	StopWatches   map[int]*stopwatch.Model
	Timers        map[int]*timer.Model
	Tables        []*table.Model
	Viewports     []*viewport.Model
	Customs       []*CustomModel
	Helps         []*help.Model
	Images        []*teaimage.Model
	StatusBars    []*statusbar.Model
}

Jump to

Keyboard shortcuts

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