model

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2025 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithKeyMsgHandlers

func WithKeyMsgHandlers(handlers []handlers.KeyMsgHandler) option

func WithWinSizeMsgHandlers

func WithWinSizeMsgHandlers(handlers []handlers.WinSizeMsgHandler) option

Types

type Mode

type Mode int
const (
	ModeNav Mode = iota
	ModeInput
)

type Model

type Model struct {
	State              state.State
	KeyMsgHandlers     []handlers.KeyMsgHandler
	WinSizeMsgHandlers []handlers.WinSizeMsgHandler
}

func New

func New(state state.State, opts ...option) Model

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

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

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