package pfff
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=19e3eb1003161d8e7ed65c96c4f69d52
sha512=37834e1726a004272fbc153fc4cd0a6afdf02b7918acf27492acd60890c32591eb8f5b22fcfd99dd707d8507b8208bdb24c99de9fd940cc2ad0171f1d103743f
doc/commons_core/ANSITerminal/index.html
Module ANSITerminal
This module offers basic control of ANSI compliant terminals.
Color
val black : styleShortcut for Foreground Black
val red : styleShortcut for Foreground Black
Shortcut for Foreground Red
val green : styleShortcut for Foreground Red
Shortcut for Foreground Green
val yellow : styleShortcut for Foreground Green
Shortcut for Foreground Yellow
val blue : styleShortcut for Foreground Yellow
Shortcut for Foreground Blue
val magenta : styleShortcut for Foreground Blue
Shortcut for Foreground Magenta
val cyan : styleShortcut for Foreground Magenta
Shortcut for Foreground Cyan
val white : styleShortcut for Foreground Cyan
Shortcut for Foreground White
val default : styleShortcut for Foreground White
Shortcut for Foreground Default
val on_black : styleShortcut for Background Black
val on_red : styleShortcut for Background Black
Shortcut for Background Red
val on_green : styleShortcut for Background Red
Shortcut for Background Green
val on_yellow : styleShortcut for Background Green
Shortcut for Background Yellow
val on_blue : styleShortcut for Background Yellow
Shortcut for Background Blue
val on_magenta : styleShortcut for Background Blue
Shortcut for Background Magenta
val on_cyan : styleShortcut for Background Magenta
Shortcut for Background Cyan
val on_white : styleShortcut for Background Cyan
Shortcut for Background White
val on_default : styleShortcut for Background White
Shortcut for Background Default
val print_string : style list -> string -> unitprint_string attr txt prints the string txt with the attibutes attr. After printing, the attributes are automatically reseted to the defaults, unless autoreset is turned off.
printf attr format arg1 ... argN prints the arguments arg1,...,argN according to format with the attibutes attr. After printing, the attributes are automatically reseted to the defaults, unless autoreset is turned off.
Erasing
val erase : loc -> uniterase Above erases everything before the position of the cursor. erase Below erases everything after the position of the cursor. erase Screen erases the whole screen.
Cursor
set_cursor x y puts the cursor at position (x,y), x indicating the column (the leftmost one being 1) and y being the line (the topmost one being 1). If x <= 0, the x coordinate is unchanged; if y <= 0, the y coordinate is unchanged.
move_cursor x y moves the cursor by x columns (to the right if x > 0, to the left if x < 0) and by y lines (downwards if y > 0 and upwards if y < 0).
save_cursor() saves the current position of the cursor.
restore_cursor() replaces the cursor to the position saved with save_cursor().