module Term::Cursor
Extended Modules
Defined in:
cursor/version.crterm-cursor.cr
Constant Summary
-
CSI =
"\e["
-
DEC_RST =
"l"
-
DEC_SET =
"h"
-
DEC_TCEM =
"?25"
-
ESC =
"\e"
-
VERSION =
"0.1.0"
Instance Method Summary
-
#backward(n : Int32 | Nil = nil)
Move the cursor backward by n
-
#clear_char(n : Int32 | Nil = nil)
Erase n characters from the current cursor position
-
#clear_line
Erase the entire current line and return to beginning of the line
-
#clear_line_after
Erase from the current position (inclusive) to the end of the line
-
#clear_line_before
Erase from the beginning of the line up to and including the current cursor position.
-
#clear_lines(n, direction = :up)
Clear a number of lines
-
#clear_rows(n, direction = :up)
ditto
-
#clear_screen
Clear the screen with the background colour and moves the cursor to home
-
#clear_screen_down
Clear screen down from current position
-
#clear_screen_up
Clear screen up from current position
-
#column(n : Int32 | Nil = nil)
Cursor moves to nth position horizontally in the current line
-
#current
Query cursor current position
-
#cursor_backward(n)
ditto
-
#cursor_down(n)
ditto
-
#cursor_forward(n)
ditto
-
#cursor_up(n)
ditto
-
#down(n : Int32 | Nil = nil)
Move the cursor down by n
-
#forward(n : Int32 | Nil = nil)
Move the cursor forward by n
-
#get_position(input = STDIN, output = STDOUT) : Tuple(Int32, Int32)
Get the current cursor position Returns a tuple with {row, column}
-
#hide
Hide cursor
-
#invisible(stream = STDOUT, &)
Switch off cursor for the block
-
#move(x, y)
Move cursor relative to its current position
-
#move_to(row : Int32 | Nil = nil, column : Int32 | Nil = nil) : String
Set the cursor absolute position
-
#next_line
Move cursor down to beginning of next line
-
#prev_line
Move cursor up to beginning of previous line
-
#restore
Restore cursor position
-
#row(n : Int32 | Nil = nil)
Cursor moves to the nth position vertically in the current column
-
#save
Save current position
-
#scroll_down
Scroll display down one line
-
#scroll_up
Scroll display up one line
-
#show
Make cursor visible
-
#up(n : Int32 | Nil = nil)
Move cursor up by n
Instance Method Detail
Erase from the beginning of the line up to and including the current cursor position.
Get the current cursor position Returns a tuple with {row, column}
Set the cursor absolute position