diff options
author | jonas <himself@jonasgunz.de> | 2018-12-28 13:04:01 +0100 |
---|---|---|
committer | jonas <himself@jonasgunz.de> | 2018-12-28 13:04:01 +0100 |
commit | c5af4c3057a904f2a037a624273c1c7a4b0295a5 (patch) | |
tree | 4af973d27706db05a5fba267fa93370429a056d3 /cObject.h | |
parent | 3cfea2815e3edfeb15fd7f0173957254babc7326 (diff) | |
download | termgl-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.h | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -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; }; |