listviewport

package
v4.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	ListItemHeight  int
	NumCurrentItems int
	NumTotalItems   int
	LastUpdated     time.Time
	ItemTypeLabel   string
	// contains filtered or unexported fields
}

func NewModel

func NewModel(
	ctx context.ProgramContext,
	dimensions constants.Dimensions,
	lastUpdated time.Time,
	itemTypeLabel string,
	numItems, listItemHeight int,
) Model

func (*Model) FirstItem

func (m *Model) FirstItem() int

func (*Model) GetCurrItem

func (m *Model) GetCurrItem() int

func (*Model) LastItem

func (m *Model) LastItem() int

func (*Model) NextItem

func (m *Model) NextItem() int

func (*Model) PrevItem

func (m *Model) PrevItem() int

func (*Model) ResetCurrItem

func (m *Model) ResetCurrItem()

func (*Model) SetDimensions

func (m *Model) SetDimensions(dimensions constants.Dimensions)

func (*Model) SetNumItems

func (m *Model) SetNumItems(numItems int)

func (*Model) SetTotalItems

func (m *Model) SetTotalItems(total int)

func (*Model) SyncViewPort

func (m *Model) SyncViewPort(content string)

func (*Model) UpdateProgramContext

func (m *Model) UpdateProgramContext(ctx *context.ProgramContext)

func (*Model) View

func (m *Model) View() string

Jump to

Keyboard shortcuts

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