cursor

package
v0.0.0-...-9e9632e Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CursorUp    cursorMovement = "\x1b[%dA"
	CursorDown  cursorMovement = "\x1b[%dB"
	CursorLeft  cursorMovement = "\x1b[%dC"
	CursorRight cursorMovement = "\x1b[%dD"
	ToNextLine  cursorMovement = "\x1b[%dE"
	ToPrevLine  cursorMovement = "\x1b[%dF"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Cursor

type Cursor struct {
	types.ConsoleStream
}

func New

func New() *Cursor

func (*Cursor) GetCursor

func (c *Cursor) GetCursor() (int, int, error)

func (*Cursor) Move

func (c *Cursor) Move(where CursorMovement, nTimes int)

func (*Cursor) RestorePosition

func (c *Cursor) RestorePosition()

func (*Cursor) SavePosition

func (c *Cursor) SavePosition()

func (*Cursor) ScrollDown

func (c *Cursor) ScrollDown(lines int)

func (*Cursor) ScrollUp

func (c *Cursor) ScrollUp(lines int)

func (*Cursor) SetCursor

func (c *Cursor) SetCursor(x, y int)

func (*Cursor) ShowCursor

func (c *Cursor) ShowCursor(show bool)

type CursorMovement

type CursorMovement interface {
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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