summaryrefslogtreecommitdiffhomepage
path: root/nGenEx/EventTarget.h
diff options
context:
space:
mode:
authorFWoltermann@gmail.com <FWoltermann@gmail.com@076cb2c4-205e-83fd-5cf3-1be9aa105544>2011-12-08 14:53:40 +0000
committerFWoltermann@gmail.com <FWoltermann@gmail.com@076cb2c4-205e-83fd-5cf3-1be9aa105544>2011-12-08 14:53:40 +0000
commite33e19d0587146859d48a134ec9fd94e7b7ba5cd (patch)
tree69d048c8801858d2756ab3a487090a7a1b74bf14 /nGenEx/EventTarget.h
downloadstarshatter-e33e19d0587146859d48a134ec9fd94e7b7ba5cd.zip
starshatter-e33e19d0587146859d48a134ec9fd94e7b7ba5cd.tar.gz
starshatter-e33e19d0587146859d48a134ec9fd94e7b7ba5cd.tar.bz2
Initial upload
Diffstat (limited to 'nGenEx/EventTarget.h')
-rw-r--r--nGenEx/EventTarget.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/nGenEx/EventTarget.h b/nGenEx/EventTarget.h
new file mode 100644
index 0000000..af24a58
--- /dev/null
+++ b/nGenEx/EventTarget.h
@@ -0,0 +1,59 @@
+/* Project nGenEx
+ Destroyer Studios LLC
+ Copyright © 1997-2004. All Rights Reserved.
+
+ SUBSYSTEM: nGenEx.lib
+ FILE: EventTarget.h
+ AUTHOR: John DiCamillo
+
+
+ OVERVIEW
+ ========
+ Event Target interface class
+*/
+
+#ifndef EventTarget_h
+#define EventTarget_h
+
+#include "Types.h"
+#include "Geometry.h"
+
+// +--------------------------------------------------------------------+
+
+class EventTarget
+{
+public:
+ static const char* TYPENAME() { return "EventTarget"; }
+
+ virtual ~EventTarget() { }
+
+ int operator == (const EventTarget& t) const { return this == &t; }
+
+ virtual int OnMouseMove(int x, int y) { return 0; }
+ virtual int OnLButtonDown(int x, int y) { return 0; }
+ virtual int OnLButtonUp(int x, int y) { return 0; }
+ virtual int OnClick() { return 0; }
+ virtual int OnSelect() { return 0; }
+ virtual int OnRButtonDown(int x, int y) { return 0; }
+ virtual int OnRButtonUp(int x, int y) { return 0; }
+ virtual int OnMouseEnter(int x, int y) { return 0; }
+ virtual int OnMouseExit(int x, int y) { return 0; }
+ virtual int OnMouseWheel(int wheel) { return 0; }
+
+ virtual int OnKeyDown(int vk, int flags) { return 0; }
+
+ virtual void SetFocus() { }
+ virtual void KillFocus() { }
+ virtual bool HasFocus() const { return false; }
+
+ virtual bool IsEnabled() const { return true; }
+ virtual bool IsVisible() const { return true; }
+ virtual bool IsFormActive() const { return true; }
+
+ virtual Rect TargetRect() const { return Rect(); }
+
+ virtual const char* GetDescription() const { return "EventTarget"; }
+};
+
+#endif EventTarget_h
+