text

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSimpleCursorOption

func NewSimpleCursorOption(values *CursorOption) *simpleCursorOption

func NewSimpleTextOption

func NewSimpleTextOption(values *TextOption) *simpleTextOption

Types

type CursorOption

type CursorOption struct {
	Enable     bool
	Size       image.Point
	Foreground color.Color
}

type CursorStyler

type CursorStyler interface {
	Enable() bool
	Size() image.Point
	Foreground() color.Color
}

type Text

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

func NewText

func NewText(app windower, text string, textStyler TextStyler, cursorStyler CursorStyler,
) *Text

func (*Text) Backspace

func (t *Text) Backspace() bool

func (*Text) Cursor

func (t *Text) Cursor() (int, int)

func (*Text) Drop

func (t *Text) Drop()

func (*Text) End

func (t *Text) End()

func (*Text) Insert

func (t *Text) Insert(alpha rune)

func (*Text) Left

func (t *Text) Left() bool

func (*Text) Line

func (t *Text) Line(no int) string

func (*Text) Lines

func (t *Text) Lines() int

func (*Text) Move

func (t *Text) Move(to image.Point)

func (*Text) Raise

func (t *Text) Raise()

func (*Text) Right

func (t *Text) Right() bool

func (*Text) Show

func (t *Text) Show()

func (*Text) String

func (t *Text) String() string

type TextOption

type TextOption struct {
	Font       *impress.Font
	LineHeight int
	Edge       int
	Margin     image.Point
	Size       image.Point
	Foreground color.Color
	Background color.Color
	Border     color.Color
}

type TextStyler

type TextStyler interface {
	Font() *impress.Font
	LineHeight() int
	Edge() int
	Margin() image.Point
	Size() image.Point
	Foreground() color.Color
	Background() color.Color
	Border() color.Color
}

Jump to

Keyboard shortcuts

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