paragraph

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2022 License: MIT Imports: 3 Imported by: 1

Documentation

Overview

Package paragraph provides a simple text widget that neatly splits over multiple lines.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Widget

type Widget struct {
	gowid.RejectUserInput
	gowid.NotSelectable
	// contains filtered or unexported fields
}

Widget can be used to display text on the screen, with words broken cleanly as the output width changes.

func New

func New(text string) *Widget

func NewWithWords

func NewWithWords(words ...string) *Widget

func (*Widget) Render

func (w *Widget) Render(size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.ICanvas

func (*Widget) RenderSize

func (w *Widget) RenderSize(size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.IRenderBox

Jump to

Keyboard shortcuts

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