Documentation
¶
Index ¶
- type TestBackend
- func (b *TestBackend) CheckSnapshot(path string)
- func (b *TestBackend) MousePosition() mathi.Vec2
- func (b *TestBackend) MousePressed(key timui.Key) bool
- func (b *TestBackend) Render()
- func (b *TestBackend) Set(pos mathi.Vec2, char rune, fg, bg uint32)
- func (b *TestBackend) Size() mathi.Vec2
- func (b *TestBackend) String() string
- func (b *TestBackend) TakeInput() timui.Input
- func (b *TestBackend) WriteClipboard(text string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TestBackend ¶
type TestBackend struct {
Mouse mathi.Vec2
Pressed bool
Input timui.Input
Clipboard string
// contains filtered or unexported fields
}
TestBackend accumulates the pushed cell diffs like a real terminal, so after any Finish its grid equals that frame's front buffer.
func (*TestBackend) CheckSnapshot ¶
func (b *TestBackend) CheckSnapshot(path string)
func (*TestBackend) MousePosition ¶
func (b *TestBackend) MousePosition() mathi.Vec2
func (*TestBackend) MousePressed ¶
func (b *TestBackend) MousePressed(key timui.Key) bool
func (*TestBackend) Render ¶
func (b *TestBackend) Render()
func (*TestBackend) Size ¶
func (b *TestBackend) Size() mathi.Vec2
func (*TestBackend) String ¶
func (b *TestBackend) String() string
String frames the screen so snapshot files keep their trailing spaces even through editors that trim whitespace.
func (*TestBackend) TakeInput ¶
func (b *TestBackend) TakeInput() timui.Input
func (*TestBackend) WriteClipboard ¶ added in v0.0.4
func (b *TestBackend) WriteClipboard(text string)
Click to show internal directories.
Click to hide internal directories.