Menu system broken

Dependencies:   ANSITermMenuSystem

Fork of menuSystemMbed by Ryan Scott

Revision:
5:92389cf2106d
Child:
6:2f220f5d782d
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/CdisplayItem.cpp	Sun Apr 21 20:15:31 2013 +0000
@@ -0,0 +1,61 @@
+//
+//  menuItem.cpp
+//  menuSystem
+//
+//  Created by BradDSmith on 2013-02-26.
+//  Copyright (c) 2013 BradDSmith. All rights reserved.
+//
+
+#include "CdisplayItem.h"
+#include "console.h"
+
+CdisplayItem::CdisplayItem():Text("EMPTY")
+{
+    
+    
+}
+
+void CdisplayItem::initialize(const char * text, int x, int y,int x2, int y2)
+{
+    setText( (char *) text);
+    setPosition(x,y);
+    value.X = x2;
+    value.Y = y2;
+}
+
+void CdisplayItem::setText( char * CdisplayText)
+{
+    Text.assign(CdisplayText);
+}
+
+void CdisplayItem::setPosition(int x, int y)
+{
+    position.X =  x;
+    position.Y  = y;
+}
+
+void CdisplayItem::print()
+{
+    const char * msg = Text.c_str();
+    printXY( (char *)msg, position.X, position.Y);
+ 
+}
+void CdisplayItem::erase()
+{
+    printXY ("    ", position.X - 2, position.Y);
+}
+
+void CdisplayItem::setValue(char * newval)
+{ 
+    printXY( (char *)newval, value.X, value.Y); 
+}
+
+void CdisplayItem::Crect(int x1, int y1, int x2, int y2)
+{
+    printRec(x1, y1, x2, y2);
+}
+
+void CdisplayItem::DeleteCrect(int x1, int y1, int x2, int y2)
+{
+    eraseRec(x1, y1, x2, y2);
+}