panel

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: 2 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 {
	// contains filtered or unexported fields
}

Model struct represents property of a panel.

func NewModel

func NewModel(isActive, isPadded bool, border lipgloss.Border, activeBorderColor, inactiveBorderColor lipgloss.TerminalColor) *Model

NewModel creates a new instance of a panel.

func (*Model) GetHeight

func (m *Model) GetHeight() int

GetHeight returns the height of the panel.

func (*Model) GetSize

func (m *Model) GetSize() (int, int)

GetSize returns the size of the panel.

func (*Model) GetWidth

func (m *Model) GetWidth() int

GetWidth returns the width of the panel.

func (*Model) GetYOffset

func (m *Model) GetYOffset() int

GetYOffset returns the y offset of the panel.

func (*Model) GotoBottom

func (m *Model) GotoBottom()

GotoBottom goes to the bottom of the panel.

func (*Model) GotoTop

func (m *Model) GotoTop()

GotoTop goes to the top of the panel.

func (*Model) LineDown

func (m *Model) LineDown(lines int)

LineDown scrolls the panel down the specified number of lines.

func (*Model) LineUp

func (m *Model) LineUp(lines int)

LineUp scrolls the panel up the specified number of lines.

func (*Model) SetActiveBorderColor

func (m *Model) SetActiveBorderColor(color lipgloss.TerminalColor)

SetActiveBorderColors sets the active border colors.

func (*Model) SetContent

func (m *Model) SetContent(content string)

SetContent sets the content of the panel.

func (*Model) SetHeight

func (m *Model) SetHeight(height int)

SethHight sets the height of the panel.

func (*Model) SetMaxHeight

func (m *Model) SetMaxHeight(height int)

SetMaxxHeight sets the maximum height of the panel.

func (*Model) SetMaxWidth

func (m *Model) SetMaxWidth(width int)

SetMaxWidth sets the maximum width of the panel.

func (*Model) SetSize

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

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

func (*Model) SetWidth

func (m *Model) SetWidth(width int)

SetWidth sets the width of the panel.

func (*Model) View

func (m *Model) View() string

View returns a string representation of the panel.

Jump to

Keyboard shortcuts

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