simpleview

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: May 2, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HeaderStyle  = lipgloss.NewStyle().MarginBottom(1)
	ContentStyle = HeaderStyle.Copy().Margin(0, 1, 1, 1)
	ErrorStyle   = ContentStyle.Copy()
	FooterStyle  = lipgloss.NewStyle()
)

Functions

This section is empty.

Types

type ContentViewer

type ContentViewer interface {
	Content() string
	Wrap() bool
	SetContentSize(width, height int)
}

type Model

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

func NewModel

func NewModel() *Model

func (Model) ContentView

func (m Model) ContentView(module any) string

func (Model) ErrorView

func (m Model) ErrorView(err error) string

func (Model) GetContentHeight

func (m Model) GetContentHeight(module any) int

func (Model) GetContentWidth

func (m Model) GetContentWidth() int

func (Model) GetFooterWidth

func (m Model) GetFooterWidth() int

func (Model) GetFullContentHeight

func (m Model) GetFullContentHeight() int

func (Model) GetHeaderWidth

func (m Model) GetHeaderWidth() int

func (*Model) SetHeight

func (m *Model) SetHeight(height int)

func (*Model) SetSize

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

func (*Model) SetWidth

func (m *Model) SetWidth(width int)

func (*Model) View

func (m *Model) View(module any) string

type SimpleViewer

type SimpleViewer interface {
	State() int
	Header() string
	Content() string
	Error() error
	Footer() string
	MinContentHeight() int
	SetHeaderWidth(width int)
	SetContentSize(width, height int)
	SetFooterWidth(width int)
}

Jump to

Keyboard shortcuts

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