tui

package
v0.0.0-...-486987b Latest Latest
Warning

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

Go to latest
Published: Mar 6, 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 KeyMap

type KeyMap struct {
	Quit   key.Binding
	Delete key.Binding
}

KeyMap defines the keybindings for the app.

func DefaultKeyMap

func DefaultKeyMap() KeyMap

DefaultKeyMap returns a set of default keybindings.

type Model

type Model struct {
	// Global
	Keys         KeyMap
	WindowWidth  int
	WindowHeight int

	Cursor     cursor.Model
	Timer      timer.Model
	Runes      []rune
	InputRunes []rune

	CursorPosition int
}

func New

func New() *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