aboutsummaryrefslogtreecommitdiff
path: root/src/editor.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/editor.h')
-rw-r--r--src/editor.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/editor.h b/src/editor.h
new file mode 100644
index 0000000..7c5a848
--- /dev/null
+++ b/src/editor.h
@@ -0,0 +1,37 @@
+#include <cObject.h>
+#include <cObjectHandler.h>
+#include <cRender.h>
+#include <cInput.h>
+
+#include <stdint.h>
+
+class editor : public cObject
+{
+public:
+ editor(sPos _size);
+ ~editor();
+
+ void onChar(unsigned char _c);
+ void onClick(sPos _pos, unsigned int _button);
+ void moveCursor(sPos _relMovement);
+
+ void setCursor(sPos _pos);
+ void setColor(uint16_t _color);
+ void setChar(unsigned char _c);
+
+ void setMode(uint8_t _mode);
+
+ void update();
+private:
+ sPos currentPosition;
+ unsigned char currentChar;
+ uint16_t currentColor;
+ uint8_t currentMode;
+
+ sPos size;
+ unsigned char char_under_cursor;
+
+ cObject *storage;
+
+};
+