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.
Dependencies: ANSITermMenuSystem
Fork of menuSystemMbed by
CdisplayItem.cpp
00001 // 00002 // menuItem.cpp 00003 // menuSystem 00004 // 00005 // Created by BradDSmith on 2013-02-26. 00006 // Copyright (c) 2013 BradDSmith. All rights reserved. 00007 // 00008 00009 #include "CdisplayItem.h" 00010 #include "console.h" 00011 00012 CdisplayItem::CdisplayItem():Text("EMPTY") 00013 { 00014 00015 00016 } 00017 00018 void CdisplayItem::initialize(const char * text, int x, int y,int x2, int y2) 00019 { 00020 setText( (char *) text); 00021 setPosition(x,y); 00022 value.X = x2; 00023 value.Y = y2; 00024 } 00025 00026 void CdisplayItem::setText( char * CdisplayText) 00027 { 00028 Text.assign(CdisplayText); 00029 } 00030 00031 void CdisplayItem::setPosition(int x, int y) 00032 { 00033 position.X = x; 00034 position.Y = y; 00035 } 00036 00037 void CdisplayItem::print() 00038 { 00039 const char * msg = Text.c_str(); 00040 printXY( (char *)msg, position.X, position.Y); 00041 00042 } 00043 void CdisplayItem::erase() 00044 { 00045 printXY (" ", position.X - 2, position.Y); 00046 } 00047 00048 void CdisplayItem::setValue(char * newval) 00049 { 00050 printXY( (char *)newval, value.X, value.Y); 00051 } 00052 00053 void CdisplayItem::Crect(int x1, int y1, int x2, int y2) 00054 { 00055 printRec(x1, y1, x2, y2); 00056 } 00057 /* 00058 void CdisplayItem::DeleteCrect(int x1, int y1, int x2, int y2) 00059 { 00060 eraseRec(x1, y1, x2, y2); 00061 } 00062 */
Generated on Sat Jul 23 2022 00:51:58 by
1.7.2
