pane

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	Viewport            viewport.Model
	Style               lipgloss.Style
	IsActive            bool
	Borderless          bool
	AlternateBorder     bool
	ShowLoading         bool
	ActiveBorderColor   lipgloss.AdaptiveColor
	InactiveBorderColor lipgloss.AdaptiveColor
	Spinner             spinner.Model
}

Model is a struct to represent the properties of a pane.

func NewModel

func NewModel(isActive, borderless bool, activeBorderColor, inactiveBorderColor lipgloss.AdaptiveColor) Model

NewModel creates an instance of a pane.

func (Model) GetHeight added in v0.1.0

func (m Model) GetHeight() int

GetHeight returns the height of the pane.

func (Model) GetHorizontalFrameSize added in v0.3.1

func (m Model) GetHorizontalFrameSize() int

GetHorizontalFrameSize returns the horizontal frame size of the pane.

func (Model) GetIsActive added in v0.3.1

func (m Model) GetIsActive() bool

GetIsActive returns the active state of the pane.

func (Model) GetWidth added in v0.1.0

func (m Model) GetWidth() int

GetWidth returns the width of the pane.

func (Model) GetYOffset added in v0.1.0

func (m Model) GetYOffset() int

GetYOffset returns the y offset of the pane.

func (*Model) GotoBottom

func (m *Model) GotoBottom()

GotoBottom goes to the bottom of the pane.

func (*Model) GotoTop

func (m *Model) GotoTop()

GotoTop goes to the top of the pane.

func (*Model) LineDown

func (m *Model) LineDown(lines int)

LineDown scrolls the pane down the specified number of lines.

func (*Model) LineUp

func (m *Model) LineUp(lines int)

LineUp scrolls the pane up the specified number of lines.

func (*Model) SetActive added in v0.3.1

func (m *Model) SetActive(isActive bool)

SetActive sets the active state of the pane.

func (*Model) SetContent

func (m *Model) SetContent(content string)

SetContent sets the content of the pane.

func (*Model) SetSize

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

SetSize sets the size of the pane and its viewport, useful when resizing the terminal.

func (*Model) ShowAlternateBorder added in v0.4.0

func (m *Model) ShowAlternateBorder(show bool)

SetActiveBorderColors sets the active border colors.

func (*Model) ShowSpinner added in v0.8.0

func (m *Model) ShowSpinner(show bool)

ShowSpinner determines wether to show the spinner or not.

func (Model) Update added in v0.8.0

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

Update updates the pane.

func (Model) View

func (m Model) View() string

View returns a string representation of the pane.

Jump to

Keyboard shortcuts

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