Documentation ¶
Index ¶
- Constants
- type Terminal
- func (t *Terminal) DisableAlternateBuffer()
- func (t *Terminal) EnableAlternateBuffer()
- func (t *Terminal) EraseLine()
- func (t *Terminal) EraseScreen()
- func (t *Terminal) EraseTillLineBeginning()
- func (t *Terminal) EraseTillLineEnd()
- func (t *Terminal) EraseTillScreenBeginning()
- func (t *Terminal) EraseTillScreenEnd()
- func (t *Terminal) HideCursor()
- func (t *Terminal) MoveCursor(line, column int)
- func (t *Terminal) MoveCursorDown(lines int)
- func (t *Terminal) MoveCursorHome()
- func (t *Terminal) MoveCursorLeft(columns int)
- func (t *Terminal) MoveCursorRight(columns int)
- func (t *Terminal) MoveCursorToColumn(column int)
- func (t *Terminal) MoveCursorUp(lines int)
- func (t *Terminal) Print(a ...any) (int, error)
- func (t *Terminal) PrintCSI(format string, a ...any)
- func (t *Terminal) Printf(format string, a ...any) (int, error)
- func (t *Terminal) Println(a ...any) (int, error)
- func (t *Terminal) RestoreCursorPosition()
- func (t *Terminal) RestoreScreen()
- func (t *Terminal) SaveCursorPosition()
- func (t *Terminal) SaveScreen()
- func (t *Terminal) ShowCursor()
Constants ¶
const ( Esc = "\x1b" Csi = Esc + "[" )
Constants representing escape headers.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Terminal ¶
Terminal represents a terminal supporting ansi escape sequences.
func (*Terminal) DisableAlternateBuffer ¶
func (t *Terminal) DisableAlternateBuffer()
DisableAlternateBuffer disables the alternate screen buffer.
func (*Terminal) EnableAlternateBuffer ¶
func (t *Terminal) EnableAlternateBuffer()
EnableAlternateBuffer enables the alternate screen buffer.
func (*Terminal) EraseLine ¶
func (t *Terminal) EraseLine()
EraseLine erases the entire current line.
func (*Terminal) EraseScreen ¶
func (t *Terminal) EraseScreen()
EraseScreen erases the entire screen.
func (*Terminal) EraseTillLineBeginning ¶
func (t *Terminal) EraseTillLineBeginning()
EraseTillLineBeginning erases everything from the cursor to the beginning of the current line.
func (*Terminal) EraseTillLineEnd ¶
func (t *Terminal) EraseTillLineEnd()
EraseTillLineEnd erases everything from the cursor to the end of the current line.
func (*Terminal) EraseTillScreenBeginning ¶
func (t *Terminal) EraseTillScreenBeginning()
EraseTillScreenBeginning erases everything from the cursor to the beginning of the screen.
func (*Terminal) EraseTillScreenEnd ¶
func (t *Terminal) EraseTillScreenEnd()
EraseTillScreenEnd erases everything from the cursor to the end of the screen.
func (*Terminal) HideCursor ¶
func (t *Terminal) HideCursor()
HideCursor makes the cursor invisible on the screen.
func (*Terminal) MoveCursor ¶
MoveCursor moves the cursor to the given line and column.
func (*Terminal) MoveCursorDown ¶
MoveCursorDown moves the cursor down by the given amount of lines.
func (*Terminal) MoveCursorHome ¶
func (t *Terminal) MoveCursorHome()
MoveCursorHome moves the cursor to it's home(0,0) position.
func (*Terminal) MoveCursorLeft ¶
MoveCursorLeft moves te cursor left by the given amount of columns.
func (*Terminal) MoveCursorRight ¶
MoveCursorRight moves the cursor right by the given amount of columns.
func (*Terminal) MoveCursorToColumn ¶
MoveCursorToColumn moves the cursor to the given column.
func (*Terminal) MoveCursorUp ¶
MoveCursorUp moves the cursor up by the given amount of lines.
func (*Terminal) PrintCSI ¶
PrintCSI prints the given escape sequence appended to a CSI(ESC [) escape header.
func (*Terminal) RestoreCursorPosition ¶
func (t *Terminal) RestoreCursorPosition()
Restore cursor position restores the cursor to the most recently saved position.
func (*Terminal) RestoreScreen ¶
func (t *Terminal) RestoreScreen()
RestoreScreen restores the saved screen back state into the terminal.
func (*Terminal) SaveCursorPosition ¶
func (t *Terminal) SaveCursorPosition()
SaveCursorPosition saves the current position of the cursor.
func (*Terminal) SaveScreen ¶
func (t *Terminal) SaveScreen()
SaveScreen saves the state of the current screen of the terminal.
func (*Terminal) ShowCursor ¶
func (t *Terminal) ShowCursor()
ShowCursor makes the cursor visible on the screen.