fakes

package
v0.0.0-...-d640f43 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ScreenBridge

type ScreenBridge struct {
	CalledSetContent int
	CalledSize       int
	CalledShow       int
	// contains filtered or unexported fields
}

ScreenBridge is a low level fake screen bridge for testing. It does not draw to the screen, but keeps track of everything that is drawn inside of it. It can be queried to return values for previous draw methods.

func NewScreenBridge

func NewScreenBridge(width, height int) *ScreenBridge

NewScreenBridge returns a new ScreenBridge object. The object is initialized with the specified width and height.

func (*ScreenBridge) GetLine

func (f *ScreenBridge) GetLine(y, x, len int) string

GetLine returns the input that was generated for line at y

func (*ScreenBridge) GetRuneAt

func (f *ScreenBridge) GetRuneAt(x, y int) (r rune)

GetRuneAt returns the rune used in the cell

func (*ScreenBridge) GetStyleAt

func (f *ScreenBridge) GetStyleAt(x, y int) (fg, bg tcell.Color)

GetStyleAt returns the tcell style used in a cell

func (*ScreenBridge) SetContent

func (f *ScreenBridge) SetContent(x int, y int, mainc rune, combc []rune, style tcell.Style)

SetContent is a dummy method for tcell's SetContent (https://godoc.org/github.com/gdamore/tcell#CellBuffer.SetContent)

func (*ScreenBridge) Show

func (f *ScreenBridge) Show()

Show is a dummy method for tcel's Show (TODO: link here!!)

func (*ScreenBridge) Size

func (f *ScreenBridge) Size() (int, int)

Size is a dummy method for tcel's Size (https://godoc.org/github.com/gdamore/tcell#CellBuffer.Size)

Jump to

Keyboard shortcuts

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