module

Tui::ANSI

ANSI escape code generation

Constants

CSI = "\e["
ESC = "\e"

Class methods

bg(color : Int32) : String
Source
bg_rgb(r : Int32, g : Int32, b : Int32) : String
Source
bold
Source
clear

Screen control

Source
clear_line
Source
clear_to_end
Source
disable_bracketed_paste
Source
disable_mouse
Source
enable_bracketed_paste

Bracketed paste mode

Source
enable_mouse

Mouse support (SGR extended mode)

Source
enter_alt_screen

Alternate screen buffer

Source
fg(color : Int32) : String
Source
fg_rgb(r : Int32, g : Int32, b : Int32) : String

True color (24-bit)

Source
hide_cursor

Cursor visibility

Source
home
Source
italic
Source
leave_alt_screen
Source
move(x : Int32, y : Int32) : String

Cursor movement

Source
move_down(n : Int32 = 1) : String
Source
move_left(n : Int32 = 1) : String
Source
move_right(n : Int32 = 1) : String
Source
move_up(n : Int32 = 1) : String
Source
reset

Attributes

Source
reverse
Source
show_cursor
Source
strikethrough
Source
style(fg : Int32 | Nil = nil, bg : Int32 | Nil = nil, bold : Bool = false, dim : Bool = false, italic : Bool = false, underline : Bool = false, reverse : Bool = false) : String

Combined style string

Source
underline
Source

Nested types