class Fancyline::Tty::Vt100

Overview

Implements control codes for VT-100 compatible terminal emulators.

Defined in:

fancyline/tty/vt100.cr

Constant Summary

CLEAR_LINE = "\e[2K"
CURSOR_TO_START = "\r"
PREPARE_LINE = CURSOR_TO_START + CLEAR_LINE

Constructors

Instance Method Summary

Instance methods inherited from class Fancyline::Tty

clear_line clear_line, clear_screen clear_screen, colors? : Bool colors?, cursor_restore(&) cursor_restore, cursor_to_start cursor_to_start, dumb? : Bool dumb?, move_cursor(x, y) move_cursor, prepare_line prepare_line

Constructor methods inherited from class Fancyline::Tty

new new

Class methods inherited from class Fancyline::Tty

build(io) build

Constructor Detail

def self.new(io : IO) #

[View source]

Instance Method Detail

def clear_line #
Description copied from class Fancyline::Tty

Clears the current line, no matter on which column the cursor is


[View source]
def clear_screen #
Description copied from class Fancyline::Tty

Clears the screen and moves the cursor to the top left


[View source]
def cursor_restore(&) #
Description copied from class Fancyline::Tty

Saves the cursor position, yields, and restores it afterwards.


[View source]
def cursor_to_start #
Description copied from class Fancyline::Tty

Moves the cursor to the start of the current line


[View source]
def move_cursor(x, y) #
Description copied from class Fancyline::Tty

Moves the terminal cursor around relative to its position


[View source]
def prepare_line #
Description copied from class Fancyline::Tty

Clears the current line and places the cursor at the beginning of it


[View source]