These strings can be embedded in text when writing to a StdStream to create a text-based UI.
primitive val ANSI
new val create() : ANSI val^
Move the cursor up n lines. 0 is the same as 1.
fun box up( n: U32 val = 0) : String val
Move the cursor down n lines. 0 is the same as 1.
fun box down( n: U32 val = 0) : String val
Move the cursor right n columns. 0 is the same as 1.
fun box right( n: U32 val = 0) : String val
Move the cursor left n columns. 0 is the same as 1.
fun box left( n: U32 val = 0) : String val
Move the cursor to line y, column x. 0 is the same as 1. This indexes from the top left corner of the screen.
fun box cursor( x: U32 val = 0, y: U32 val = 0) : String val
Clear the screen and move the cursor to the top left corner.
fun box clear() : String val
Erases everything to the left of the cursor on the line the cursor is on.
fun box erase() : String val
Resets all colours and text styles to the default.
fun box reset() : String val
Bold text. Does nothing on Windows.
fun box bold( state: Bool val = true) : String val
Underlined text. Does nothing on Windows.
fun box underline( state: Bool val = true) : String val
Blinking text. Does nothing on Windows.
fun box blink( state: Bool val = true) : String val
Swap foreground and background colour.
fun box reverse( state: Bool val = true) : String val
Black text.
fun box black() : String val
Red text.
fun box red() : String val
Green text.
fun box green() : String val
Yellow text.
fun box yellow() : String val
Blue text.
fun box blue() : String val
Magenta text.
fun box magenta() : String val
Cyan text.
fun box cyan() : String val
Grey text.
fun box grey() : String val
White text.
fun box white() : String val
Bright red text.
fun box bright_red() : String val
Bright green text.
fun box bright_green() : String val
Bright yellow text.
fun box bright_yellow() : String val
Bright blue text.
fun box bright_blue() : String val
Bright magenta text.
fun box bright_magenta() : String val
Bright cyan text.
fun box bright_cyan() : String val
Bright grey text.
fun box bright_grey() : String val
Black background.
fun box black_bg() : String val
Red background.
fun box red_bg() : String val
Green background.
fun box green_bg() : String val
Yellow background.
fun box yellow_bg() : String val
Blue background.
fun box blue_bg() : String val
Magenta background.
fun box magenta_bg() : String val
Cyan background.
fun box cyan_bg() : String val
Grey background.
fun box grey_bg() : String val
White background.
fun box white_bg() : String val
Bright red background.
fun box bright_red_bg() : String val
Bright green background.
fun box bright_green_bg() : String val
Bright yellow background.
fun box bright_yellow_bg() : String val
Bright blue background.
fun box bright_blue_bg() : String val
Bright magenta background.
fun box bright_magenta_bg() : String val
Bright cyan background.
fun box bright_cyan_bg() : String val
Bright grey background.
fun box bright_grey_bg() : String val
fun box eq( that: ANSI val) : Bool val
fun box ne( that: ANSI val) : Bool val
© 2016-2018, The Pony Developers
© 2014-2015, Causality Ltd.
Licensed under the BSD 2-Clause License.
https://stdlib.ponylang.io/term-ANSI