Alexandre Salconi-Denis / debug_addon_graphique_ASCII
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers AnsiGraphicalConsole.h Source File

AnsiGraphicalConsole.h

Go to the documentation of this file.
00001 /** Addon to use with debug console. Easy way to use an Ansi console.
00002  * I use Tera term but any terminal ANSI work.
00003  *
00004  * @see https://ttssh2.osdn.jp/index.html.en
00005  * @file
00006  * @todo voir un moyen de patcher les case coller 
00007  *
00008  * This file is subject to the terms and conditions of the GNU Lesser
00009  * General Public License v2.1. See the file LICENSE in the top level
00010  * directory for more details.
00011  *
00012  * @author Salco <JeSuisSalco@gmail.com>
00013  */
00014 
00015 #ifndef ANSIGRAPHICALCONSOLE_H
00016 #define ANSIGRAPHICALCONSOLE_H
00017 
00018 /** Uncomment that to put delay in the display.
00019   */
00020 //#define CONSOLE_DELAY_TEST
00021 /** Uncomment that to use the debug from mbed.h
00022   */
00023 #define USE_MBED_LIB
00024 
00025 #if defined( CONSOLE_DELAY_TEST) || defined(USE_MBED_LIB)
00026     #include "mbed.h"
00027 #endif
00028 
00029 /** Adjust the define for a bigger buffer.
00030   */
00031 #define BUFFER_LIMIT 50
00032 
00033 /** Use to create a single line box.
00034   * @note the position X=0,Y=0 is at the top left.
00035   * @param[in] posX position in X to put the box.
00036   * @param[in] posY position in X to put the box.
00037   * @param[in] height lenght of the box for Y. 
00038   * @param[in] width  lenght of the box for X. 
00039   * @param[in] title  Title to show on top of the box.
00040   */
00041 void createSLbox(int posX, int posY, int height, int width,const char* title=0);
00042 
00043 /** Use to create a double line box.
00044   * @note the position X=0,Y=0 is at the top left.
00045   * @param[in] posX position in X to put the box.
00046   * @param[in] posY position in X to put the box.
00047   * @param[in] height lenght of the box for Y. 
00048   * @param[in] width  lenght of the box for X. 
00049   * @param[in] title  Title to show on top of the box.
00050   */
00051 void createDLbox(int posX, int posY, int height, int width,const char* title=0);
00052 
00053 /** Use to create a double line box.
00054   * @note the position X=0,Y=0 is at the top left.
00055   * @param[in] posX position in X to put the text.
00056   * @param[in] posY position in X to put the text.
00057   * @param[in] title  Text to show on screen.(Use like printf and other).
00058   */
00059 void setText(int posX, int posY,const char* title,...);
00060 
00061 /** Use to clear the screen
00062   */
00063 void clearscreen(void);
00064 
00065 
00066 #endif