popup

package
v1.7.3 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2025 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Overlay added in v1.5.1

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

Overlay allows you to overlay text on top of a background and achieve a popup.

func NewOverlay added in v1.5.1

func NewOverlay(bgRaw string, width, height int) Overlay

NewOverlay creates a new overlay and computes the necessary indices.

func (Overlay) Height added in v1.5.1

func (p Overlay) Height() int

Height returns the height of the popup window.

func (Overlay) Width added in v1.5.1

func (p Overlay) Width() int

Width returns the width of the popup window.

func (Overlay) WrapView added in v1.5.1

func (p Overlay) WrapView(view string) string

WrapView overlays the given text on top of the background. TODO: Maybe handle the box here. It's a bit weird to have to do it in the view.

type TitleBorder added in v1.6.5

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

TitleBorder creates a fancy border style to wrap a popup

func NewTitleBorder added in v1.6.5

func NewTitleBorder(text string, width, height int, color lipgloss.Color, border lipgloss.Border) TitleBorder

NewTitleBorder creates a new fancy border with a specific title

func (TitleBorder) Render added in v1.6.5

func (tb TitleBorder) Render(view string) string

Render renders the contnent with the fancy border

func (*TitleBorder) Resize added in v1.6.5

func (tb *TitleBorder) Resize(width, height int)

Resize allows resizing the border and adjusting the top border

type Window added in v1.6.5

type Window interface {
	tea.Model

	GetSize() (width, height int)
}

Window represents a popup window.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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