Expand description
This is a library for controlling a cursor and a screen, on ANSI terminals.
§Example
use ansi_control::*;
println!("test 0");
print!("{}", set_column(1));
println!("test 1");
print!("{}", clear_display(Pos::Both));
Enums§
- Pos
- A Pos is position of clearing (display|line) from cursor.
Functions§
- clear_
display - Clears part of screen. If pos is Pos::Back, clear from cursor to the end of the screen. If pos is Pos::Front, clear from cursor to beginning of the screen. If pos is Pos::Both, clear entire screen.
- clear_
line - Clears part of line. If pos is Pos::Back, clear from cursor to the end of the line. If pos is Pos::Front, clear from cursor to beginning of the line. If pos is Pos::Both, clear entire line.
- move_
cursor - Moves the cursor i (row), j (column) cells. If the cursor is already at the edge of the screen, this has no effect.
- move_
line - Moves the cursor to beginning of the line n lines down. If n is a negative number, this function moves the cursor |n| lines up.
- scroll
- Scroll whole page up by n lines. If n is a negative number, this function scroll whole page down by |n| lines.
- set_
column - Sets the column of the cursor. (n: column)
- set_
position - Sets the position of the cursor. (i: row, j: column)