aboutsummaryrefslogtreecommitdiff
path: root/cObject.h
diff options
context:
space:
mode:
authorGravatar jonas <himself@jonasgunz.de> 2018-12-28 13:04:01 +0100
committerGravatar jonas <himself@jonasgunz.de> 2018-12-28 13:04:01 +0100
commitc5af4c3057a904f2a037a624273c1c7a4b0295a5 (patch)
tree4af973d27706db05a5fba267fa93370429a056d3 /cObject.h
parent3cfea2815e3edfeb15fd7f0173957254babc7326 (diff)
downloadtermgl-c5af4c3057a904f2a037a624273c1c7a4b0295a5.tar.gz
Adding Click and Char event handling and focusing to cObjectHandler
cObject: is now able to be parent class cObjectHandler: Implemented
Diffstat (limited to 'cObject.h')
-rw-r--r--cObject.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/cObject.h b/cObject.h
index c3114c3..607af4e 100644
--- a/cObject.h
+++ b/cObject.h
@@ -20,7 +20,7 @@ public:
//_sx : SizeX
//_sy : SizeY
- ~cObject();
+ virtual ~cObject();
sPos getPosition();
@@ -30,7 +30,19 @@ public:
sObject getObject();
+ virtual void onClick(sPos _pos, unsigned int _button){};
+
+ virtual void onChar(unsigned char _c){};
+
+protected: //For child classes
+ cObject();
+
+ void setSize(int _sx, int _sy);
+
+ void destruct();
+
private:
//wColor, cScreen, sizeX and sizeY are inherited from cRender
sPos pos;
+ bool bSizeSet;
};