ui

package
v0.0.0-...-be562d2 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2021 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 Paragraph

type Paragraph struct {
	ui.Block
	TextStyle      ui.Style
	WrapText       bool
	ScrollPosition int
	Rows           [][]ui.Cell
	RowsL          int
}

Paragraph struct for creating paragraphs

func NewParagraph

func NewParagraph() *Paragraph

NewParagraph returns pointer to a Paragraph

func (*Paragraph) Draw

func (para *Paragraph) Draw(buf *ui.Buffer)

Draw renders the Paragraph

func (*Paragraph) ScrollAmount

func (para *Paragraph) ScrollAmount(a int)

ScrollAmount charge scroll position relative to the given amount

func (*Paragraph) ScrollDown

func (para *Paragraph) ScrollDown()

ScrollDown will scroll down the paragraph

func (*Paragraph) ScrollUp

func (para *Paragraph) ScrollUp()

ScrollUp will scroll up the paragraph

func (*Paragraph) SetPara

func (para *Paragraph) SetPara(text string, scrollPosition int)

SetPara sets initial variable for the paragraph

Jump to

Keyboard shortcuts

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