reflow

package
v0.0.0-...-4b9fd1c Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2025 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 InputLine

type InputLine struct {
	Graphemes []textwidget.StyledGrapheme
	Alignment bento.Alignment
}

type LineComposer

type LineComposer interface {
	NextLine() (WrappedLine, bool)
}

type LineTruncator

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

func NewLineTruncator

func NewLineTruncator(lines []InputLine, maxLineWidth int) LineTruncator

func (*LineTruncator) NextLine

func (lt *LineTruncator) NextLine() (WrappedLine, bool)

NextLine implements LineComposer.

func (*LineTruncator) SetHorizontalOffset

func (lt *LineTruncator) SetHorizontalOffset(horizontalOffset int)

type WordWrapper

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

func NewWordWrapper

func NewWordWrapper(lines []InputLine, maxLineWidth int, trim bool) WordWrapper

func (*WordWrapper) NextLine

func (ww *WordWrapper) NextLine() (WrappedLine, bool)

NextLine implements LineComposer.

type WrappedLine

type WrappedLine struct {
	Line      []textwidget.StyledGrapheme
	Width     int
	Alignment bento.Alignment
}

Jump to

Keyboard shortcuts

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