tui

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateFileListViewport

func CalculateFileListViewport(currentViewport, currentCursor, totalItems, terminalHeight, headerLines int) int

CalculateFileListViewport calculates the viewport position for file list

func CalculateItemsPerScreen

func CalculateItemsPerScreen(height int) int

CalculateItemsPerScreen calculates how many items fit on screen

func CalculateSimulatorViewport

func CalculateSimulatorViewport(currentViewport, currentCursor, totalItems, terminalHeight int) int

CalculateSimulatorViewport calculates the viewport position for simulator list

Types

type Model

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

Model represents the application state. It is grouped into per- view substates; only the substate matching viewState is "live" in the UX sense at any given moment, but all of them persist so that back-navigation can restore cursor positions.

func New

func New(fetcher simulator.Fetcher, startWithApps bool) Model

New creates a new Model with the given fetcher

func (Model) Init

func (m Model) Init() tea.Cmd

Init initializes the model

func (Model) Update

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

Update handles messages and updates the model. Non-trivial per-message logic is delegated to handle* methods below; the dispatcher only knows which handler to call for which message type.

func (Model) View

func (m Model) View() string

View renders the UI using the component system

type ViewState

type ViewState int

ViewState represents the current view

const (
	SimulatorListView ViewState = iota
	AllAppsView
	AppListView
	FileListView
	FileViewerView
	DatabaseTableListView
	DatabaseTableContentView
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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