summaryrefslogtreecommitdiff
path: root/src/Screen.cpp
diff options
context:
space:
mode:
authortom <tom@ground-control>2015-11-18 19:59:47 -0600
committertom <tom@ground-control>2015-11-18 19:59:47 -0600
commita760b9339a98281a8a1072d03dbf41f08eb696a6 (patch)
treef1e7958d297c55fdbc6daa1a8d1777cb1ca78fc6 /src/Screen.cpp
shovelling
Diffstat (limited to 'src/Screen.cpp')
-rw-r--r--src/Screen.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/Screen.cpp b/src/Screen.cpp
new file mode 100644
index 0000000..c3977d6
--- /dev/null
+++ b/src/Screen.cpp
@@ -0,0 +1,33 @@
+#include "Screen.hpp"
+
+Screen::Screen()
+{
+ initscr();
+ clear();
+ noecho();
+ cbreak();
+ keypad(stdscr,TRUE);
+ curs_set(0);
+ getmaxyx(stdscr,height,width);
+}
+
+Screen::~Screen()
+{
+ endwin();
+}
+
+void Screen::ping(string msg)
+{
+ const char * cmsg = msg.c_str();
+ printw(cmsg);
+}
+
+int Screen::getHeight()
+{
+ return height;
+}
+
+int Screen::getWidth()
+{
+ return width;
+}