From c5af4c3057a904f2a037a624273c1c7a4b0295a5 Mon Sep 17 00:00:00 2001 From: jonas Date: Fri, 28 Dec 2018 13:04:01 +0100 Subject: Adding Click and Char event handling and focusing to cObjectHandler cObject: is now able to be parent class cObjectHandler: Implemented --- cObject.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'cObject.h') 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; }; -- cgit v1.2.3