textview

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TextView

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

TextView is a text element. TextView is used to draw the field's value inside any rectangle

func New

func New(fielder fieldview.FocusFielder, font *impress.Font, lineHeight int, foreground fn.Color, cursor view.Viewer) *TextView

New creates a TextView

func (*TextView) Draw

func (v *TextView) Draw(w *impress.Window, rect image.Rectangle)

Draw draws a view element. Width of rect parameter is used to split a text into sublines

func (*TextView) Size

func (v *TextView) Size(size image.Point) image.Point

Size returns size of a view element. Width of size parameter is used to split a text into sublines

Jump to

Keyboard shortcuts

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