blob: 809a8c7271ae2c86372c194743f74f6865a3e428 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
#include <cObject.h>
#include <cObjectHandler.h>
#include <cRender.h>
#include <cInput.h>
#include <stdint.h>
#define _MODE_STD 0
#define _MODE_LINE 1
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 accept();
void update();
private:
sPos currentPosition;
unsigned char currentChar;
uint16_t currentColor;
uint8_t currentMode;
sPos size;
unsigned char char_under_cursor;
cObject *storage;
};
|