tui

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(docs string)

Types

type GraphicsReader

type GraphicsReader struct {
	R io.Reader
	P *tea.Program
	// contains filtered or unexported fields
}

func (*GraphicsReader) Close

func (g *GraphicsReader) Close() error

func (*GraphicsReader) Fd

func (g *GraphicsReader) Fd() uintptr

func (*GraphicsReader) Name

func (g *GraphicsReader) Name() string

func (*GraphicsReader) Read

func (g *GraphicsReader) Read(p []byte) (int, error)

func (*GraphicsReader) Write

func (g *GraphicsReader) Write(p []byte) (int, error)

type Model

type Model struct {
	Docs       string
	Entries    []navigation.NavEntry
	Cursor     int
	NavOffset  int
	NavXOffset int
	NavHidden  bool
	Vp         viewport.Model
	Width      int
	Height     int
	Ready      bool
	Focus      string
	ThemeIdx   int

	CodeBlocks []markdown.CodeBlock
	CopyIdx    int
	Links      []markdown.DocLink
	LinkIdx    int
	StatusMsg  string

	RawContent     string
	SearchQuery    string
	SearchActive   bool
	SearchMatches  []int
	SearchMatchIdx int

	GsearchQuery   string
	GsearchResults []search.GlobalResult
	GsearchCursor  int

	PsearchQuery   string
	PsearchResults []int
	PsearchCursor  int
	DocSeq         uint64

	NavHistory     []navHistEntry
	RestoreYOffset int

	ImageRefs          []images.ImageRef
	ImageIdx           int
	CodeActive         bool
	LinkActive         bool
	ImageActive        bool
	HelpOverlay        bool
	ImageOverlay       bool
	ImageOverlaySrc    string
	ImageOverlaySixel  string
	ImageOverlayKitty  string
	ImageOverlayW      int
	ImageOverlayH      int
	NeedsGraphicsClear bool

	SixelSupported bool
	KittySupported bool
	IsTmux         bool
	IsScreen       bool
	CellPixW       int
	CellPixH       int
	SshSession     ssh.Session

	NavScrollSeq      uint64
	LastNavScrollTime time.Time
}

func NewModel

func NewModel(docs string, w, h int) 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) UpdateCellPix

func (m *Model) UpdateCellPix()

func (Model) View

func (m Model) View() tea.View

Source Files

  • tui.go

Jump to

Keyboard shortcuts

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