Based on Terminal lib from Simon Ford, some adds
Fork of TerminalPlus by
Diff: Terminal.h
- Revision:
- 7:80096ab72764
- Parent:
- 6:f8c90e147000
- Child:
- 8:e3c6d6322506
--- a/Terminal.h Wed Sep 16 00:08:12 2015 +0000 +++ b/Terminal.h Sat Sep 19 01:08:02 2015 +0000 @@ -1,6 +1,7 @@ -/* mbed Terminal Library, for ANSI/VT200 Terminals and ecape codes +/** mbed TerminalPlus Library, for ANSI/VT200 Terminals and ecape codes + * Copyright (c) 2015, Max Scordamaglia , https//developer.mbed.org/users/MaxScorda/ + * fork from Terminal Library * Copyright (c) 2007-2010, sford, http://mbed.org - * Modified by Max Scordamaglia (c) 2015 * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -74,31 +75,48 @@ /** Erase line */ void eraseline(); - /** Set the foreground colour */ +// font attrib + //** Reset attrib */ + void resetattrib(); + //** font bold */ + void bold(); + //** font underscore */ + void underscore(); + //** font blink */ + void blink(); + //** font reverse */ + void reverse(); + + /** Set the foreground colour 0xffffff */ void foreground(int colour); - void forgcol(int colour); + /** Set the foreground standard (0-7) color */ + void forgcol(int color); - /** Set the background colour */ + /** Set the background colour 0xffffff */ void background(int colour); + /** Set the background standard (0-7) color */ void bckgcol(int color); - /*printf formattato con dimensione e posizione*/ + /** printf formattato con dimensione e posizione */ void formatPrintf(char sstr[], int xx, int yy, int padb=0); - /**Draw box */ + /** Draw box */ void frame(int x, int y, int w, int h, int boxtype=1); - - /**Banner */ + + /** Banner */ void banner(); - /**Default input pos */ + /** Banner Adv*/ + void bannerAdv(); + + /** Default input pos */ void readypos(); - - private: + +private: string padstr(string sttde, int maxlen, char fillchar); string addEOS(string sttde); char* string2char(string sttde); - + char* createStr(char car); }; #endif