abstract class Fancyline::Tty

Direct Known Subclasses

Defined in:

fancyline/tty.cr
fancyline/tty/dumb.cr
fancyline/tty/vt100.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Class Method Detail

def self.build(io) #

Guesses the correct Tty implementation to use on io.


[View source]

Instance Method Detail

abstract def clear_line #

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


[View source]
abstract def clear_screen #

Clears the screen and moves the cursor to the top left


[View source]
def colors? : Bool #

Does this terminal support colors?


[View source]
abstract def columns : Int32 #

Terminal columns at program start.


[View source]
abstract def cursor_restore(&) #

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


[View source]
abstract def cursor_to_start #

Moves the cursor to the start of the current line


[View source]
def dumb? : Bool #

Is this a dumb terminal? A dumb terminal doesn't offer any capabilities and acts more like a stream of bytes being thrown on the screen. The case for example the program is used through popen(3) like functionality.


[View source]
abstract def move_cursor(x, y) #

Moves the terminal cursor around relative to its position


[View source]
def prepare_line #

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


[View source]
abstract def rows : Int32 #

Terminal rows at program start.


[View source]