screen

package
v0.0.0-...-2352b81 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 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 Dimension

type Dimension struct {
	X, Y int
}

Dimension is a struct that has X and Y field to represent a rectangle

type Screen

type Screen struct {
	ScreenDim Dimension
	// contains filtered or unexported fields
}

Screen is a struct that has the logic to display the editor state on the terminal

func NewScreen

func NewScreen() (*Screen, error)

NewScreen creates a new screen object

func (*Screen) Close

func (s *Screen) Close()

Close - Closes the Screen

func (*Screen) DisplayCursor

func (s *Screen) DisplayCursor(cursor Vertex)

DisplayCursor is used to display cursor on the screen at the given Vertex

func (*Screen) DisplayStatusBar

func (s *Screen) DisplayStatusBar(text string)

DisplayStatusBar is used to display status bar line on the screen

func (*Screen) DisplayTextFrame

func (s *Screen) DisplayTextFrame(textFrame [][]rune)

DisplayTextFrame is used to display a textFrame object on the screen

func (*Screen) TerminalScreen

func (s *Screen) TerminalScreen() tcell.Screen

TerminalScreen can be used to get the underlying tcell.Screen object

type Vertex

type Vertex struct {
	X, Y int
}

Vertex is a struct to represent a coord on the terminal

Jump to

Keyboard shortcuts

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