Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
LScreen.h
00001 /************************************************************************************** 00002 * Copyright (c) 2016, Tomoaki Yamaguchi 00003 * 00004 * All rights reserved. This program and the accompanying materials 00005 * are made available under the terms of the Eclipse Public License v1.0 00006 * and Eclipse Distribution License v1.0 which accompany this distribution. 00007 * 00008 * The Eclipse Public License is available at 00009 * http://www.eclipse.org/legal/epl-v10.html 00010 * and the Eclipse Distribution License is available at 00011 * http://www.eclipse.org/org/documents/edl-v10.php. 00012 * 00013 * Contributors: 00014 * Tomoaki Yamaguchi - initial API and implementation 00015 **************************************************************************************/ 00016 #ifndef LSCREEN_H_ 00017 #define LSCREEN_H_ 00018 #include <stdarg.h> 00019 #include <string> 00020 using namespace std; 00021 00022 namespace linuxAsyncClient { 00023 #define SCREEN_BUFF_SIZE 1024 00024 /*======================================== 00025 Class Screen 00026 =======================================*/ 00027 class LScreen{ 00028 public: 00029 LScreen(); 00030 ~LScreen(); 00031 void clear(void); 00032 void display(const char* format, ...); 00033 void prompt(const char* format, ...); 00034 bool checkKeyIn(char* val); 00035 00036 private: 00037 void reprompt(void); 00038 void getSize(void); 00039 void vdisplay(const char* format, va_list args); 00040 void vprompt(const char* format, va_list args); 00041 char _buffer[SCREEN_BUFF_SIZE]; 00042 int _hight; 00043 int _width; 00044 string _prompt; 00045 }; 00046 00047 } /* end of namespace */ 00048 00049 #endif /* LSCREEN_H_ */
Generated on Wed Jul 13 2022 10:46:02 by
1.7.2