page

package
v0.0.420 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Width, Height                                          int
	FilterPrefix, LoadingString                            string
	CopySavePath, SelectionEnabled, WrapText, RequestInput bool
	ViewportConditionalStyle                               map[string]lipgloss.Style
}

type Model

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

func New

func New(c Config) Model

func (*Model) AppendToViewport

func (m *Model) AppendToViewport(rows []Row, startOnNewLine bool)

func (Model) EnteringInput

func (m Model) EnteringInput() bool

func (Model) FilterApplied

func (m Model) FilterApplied() bool

func (Model) FilterFocused

func (m Model) FilterFocused() bool

func (Model) GetSelectedPageRow

func (m Model) GetSelectedPageRow() (Row, error)

func (*Model) HideToast

func (m *Model) HideToast()

func (Model) Loading

func (m Model) Loading() bool

func (*Model) ScrollViewportToBottom

func (m *Model) ScrollViewportToBottom()

func (*Model) SetAllPageData

func (m *Model) SetAllPageData(allPageData []Row)

func (*Model) SetDoesNeedNewInput

func (m *Model) SetDoesNeedNewInput()

func (*Model) SetFilterPrefix

func (m *Model) SetFilterPrefix(prefix string)

func (*Model) SetHeader

func (m *Model) SetHeader(header []string)

func (*Model) SetInputPrefix

func (m *Model) SetInputPrefix(p string)

func (*Model) SetLoading

func (m *Model) SetLoading(isLoading bool)

func (*Model) SetViewportPromptVisible

func (m *Model) SetViewportPromptVisible(v bool)

func (*Model) SetViewportSelectionEnabled

func (m *Model) SetViewportSelectionEnabled(v bool)

func (*Model) SetViewportSelectionToBottom

func (m *Model) SetViewportSelectionToBottom()

func (*Model) SetViewportStyle

func (m *Model) SetViewportStyle(headerStyle, contentStyle lipgloss.Style)

func (*Model) SetViewportXOffset

func (m *Model) SetViewportXOffset(n int)

func (*Model) SetWindowSize

func (m *Model) SetWindowSize(width, height int)

func (Model) Update

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

func (Model) View

func (m Model) View() string

func (Model) ViewportHeight

func (m Model) ViewportHeight() int

func (Model) ViewportSaving

func (m Model) ViewportSaving() bool

func (Model) ViewportSelectionAtBottom

func (m Model) ViewportSelectionAtBottom() bool

type Row

type Row struct {
	Key, Row string
}

func (Row) String

func (r Row) String() string

Jump to

Keyboard shortcuts

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