view

package
v0.0.0-...-5f80e63 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HelpHeight = 4
)

Variables

View Source
var ErrStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#f00"))

Functions

func Run

func Run(docs []*model.DocInfo, cfg ...model.Config) error

Types

type Doc

type Doc struct {
	Doc *model.DocInfo
	// contains filtered or unexported fields
}

func NewDoc

func NewDoc(doc *model.DocInfo, quitKey key.Binding) *Doc

func (*Doc) FullHelp

func (d *Doc) FullHelp() [][]key.Binding

func (*Doc) Init

func (d *Doc) Init() tea.Cmd

func (*Doc) ShortHelp

func (d *Doc) ShortHelp() []key.Binding

func (*Doc) Update

func (d *Doc) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*Doc) View

func (d *Doc) View() string
type Menu struct {
	// contains filtered or unexported fields
}

func NewMenu

func NewMenu(title string, docs []*model.DocInfo) *Menu
func (m *Menu) Init() tea.Cmd
func (m *Menu) Update(msg tea.Msg) (tea.Model, tea.Cmd)
func (m *Menu) View() string

type Model

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

func NewModel

func NewModel(docs []*model.DocInfo, cfg ...model.Config) *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