margins

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(ctx context.Context, screen mux.Screen) mux.Screen

Types

type Margins

type Margins struct {
	*L.Computable
	deadlock.RWMutex
	*mux.UpdatePublisher
	// contains filtered or unexported fields
}

Margins puts empty space around a Screen and centers it. In size mode, Margins attempts to keep the Screen at a fixed size (one or both dimensions fixed). In margin mode, the Screen is surrounded by fixed-size margins that do not change with the screen size.

func New

func New(ctx context.Context, screen mux.Screen) *Margins

func (*Margins) Apply

func (l *Margins) Apply(node L.NodeType) (bool, error)

func (*Margins) Kill

func (l *Margins) Kill()

func (*Margins) Resize

func (l *Margins) Resize(size geom.Size) error

func (*Margins) Send

func (l *Margins) Send(msg mux.Msg)

func (*Margins) Size

func (l *Margins) Size() geom.Size

func (*Margins) State

func (l *Margins) State() *tty.State

Jump to

Keyboard shortcuts

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