view

package
v0.0.0-...-686a4b2 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LINE_BUFFER_CAP = 10000
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Branch

type Branch struct {
	Windows []*Window
	// contains filtered or unexported fields
}

Branch is a model that represents the entire view of the application.

func (Branch) Init

func (m Branch) Init() tea.Cmd

Init initializes the view model.

func (Branch) Update

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

Update updates the model state based on the received message.

func (Branch) View

func (m Branch) View() string

View renders the view model.

type Window

type Window struct {
	Title string

	Input io.Reader
	// contains filtered or unexported fields
}

Window represents a single window in the view.

func NewWindow

func NewWindow(title string, input io.Reader) *Window

NewWindow creates a new window model.

func (Window) Init

func (w Window) Init() tea.Cmd

Init initializes the window model.

func (Window) Update

func (w Window) Update(msg tea.Msg) (Window, tea.Cmd)

Update updates the window state based on the received message.

func (Window) View

func (w Window) View() string

View renders the window model.

Jump to

Keyboard shortcuts

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