Inspired by Simon Ford's "Terminal" library, this is a clean-room reimplementation that supports a larger set of the ANSI escape sequences and includes a few handy drawing routines. Useful for making console UIs for your projects. The box-drawing stuff requires your terminal to be set to codepage 850.
Fork of ANSITerm by
Diff: ANSITerm.h
- Revision:
- 1:e3403c93f864
- Parent:
- 0:863811463610
--- a/ANSITerm.h Tue Sep 18 18:58:19 2012 +0000 +++ b/ANSITerm.h Sun Sep 23 23:28:27 2012 +0000 @@ -121,15 +121,26 @@ const static char SGR_WHITE = 128; //37 /* Box styles */ + const static char BOXDRAW_TOPLEFT = 0; + const static char BOXDRAW_TOPRIGHT = 1; + const static char BOXDRAW_BOTTOMLEFT = 2; + const static char BOXDRAW_BOTTOMRIGHT = 3; + const static char BOXDRAW_HORIZONTAL = 4; + const static char BOXDRAW_VERTICAL = 5; + const static char BOXDRAW_UPTEE = 6; + const static char BOXDRAW_DOWNTEE = 7; + const static char BOXDRAW_LEFTTEE = 8; + const static char BOXDRAW_RIGHTTEE = 9; + const static char BOXDRAW_CROSS = 10; #ifdef _ANSITERM_CP850_ + /** Box-drawing style using pluses, minuses and pipes (low-ASCII, should work anywhere).*/ + static const char simple[11]; + /** Box-drawing style using ASCII two-line box-drawing characters. */ static const char two_lines[11]; /** Box-drawing style using ASCII one-line box-drawing characters. */ static const char one_line[11]; - - /** Box-drawing style using pluses, minuses and pipes (low-ASCII, should work anywhere).*/ - static const char simple[11]; #endif ANSITerm(PinName tx, PinName rx);