summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-09-15 00:53:01 +0200
committerAki <please@ignore.pl>2022-09-15 00:53:01 +0200
commitce550f08fa91598612c016ebebc89c4af2e9505e (patch)
tree46be504b3831acc213b2da7feae38b1f1f6768ed
parent5310ea3564fe98b2940a63b72621b79de9290f77 (diff)
downloadstarshatter-ce550f08fa91598612c016ebebc89c4af2e9505e.zip
starshatter-ce550f08fa91598612c016ebebc89c4af2e9505e.tar.gz
starshatter-ce550f08fa91598612c016ebebc89c4af2e9505e.tar.bz2
Renamed EventDispatch and EventTarget by adding UI prefix
-rw-r--r--StarsEx/ActiveWindow.cpp16
-rw-r--r--StarsEx/ActiveWindow.h4
-rw-r--r--StarsEx/CMakeLists.txt2
-rw-r--r--StarsEx/CmpnScreen.cpp1
-rw-r--r--StarsEx/ComboBox.cpp4
-rw-r--r--StarsEx/EventDispatch.h61
-rw-r--r--StarsEx/Game.cpp4
-rw-r--r--StarsEx/GameScreen.cpp1
-rw-r--r--StarsEx/MapView.cpp15
-rw-r--r--StarsEx/MapView.h4
-rw-r--r--StarsEx/MenuScreen.cpp1
-rw-r--r--StarsEx/PlanScreen.cpp1
-rw-r--r--StarsEx/RichTextBox.cpp1
-rw-r--r--StarsEx/RichTextBox.h1
-rw-r--r--StarsEx/Starshatter.cpp8
-rw-r--r--StarsEx/TacRefDlg.cpp6
-rw-r--r--StarsEx/UIEventDispatch.cpp (renamed from StarsEx/EventDispatch.cpp)49
-rw-r--r--StarsEx/UIEventDispatch.h60
-rw-r--r--StarsEx/UIEventTarget.h (renamed from StarsEx/EventTarget.h)17
19 files changed, 125 insertions, 131 deletions
diff --git a/StarsEx/ActiveWindow.cpp b/StarsEx/ActiveWindow.cpp
index 4c99ef8..e5e8e33 100644
--- a/StarsEx/ActiveWindow.cpp
+++ b/StarsEx/ActiveWindow.cpp
@@ -13,7 +13,7 @@
#include <vector>
#include "ActiveWindow.h"
-#include "EventDispatch.h"
+#include "UIEventDispatch.h"
#include "Color.h"
#include "Bitmap.h"
#include "Font.h"
@@ -85,7 +85,7 @@ ActiveWindow::~ActiveWindow()
void
ActiveWindow::Show()
{
- EventDispatch* dispatch = EventDispatch::GetInstance();
+ UIEventDispatch* dispatch = UIEventDispatch::GetInstance();
if (dispatch)
dispatch->Register(this);
@@ -109,7 +109,7 @@ ActiveWindow::Show()
void
ActiveWindow::Hide()
{
- EventDispatch* dispatch = EventDispatch::GetInstance();
+ UIEventDispatch* dispatch = UIEventDispatch::GetInstance();
if (dispatch) {
dispatch->Unregister(this);
focus = false;
@@ -896,7 +896,7 @@ Rect ActiveWindow::TargetRect() const
void ActiveWindow::SetFocus()
{
- EventDispatch* dispatch = EventDispatch::GetInstance();
+ UIEventDispatch* dispatch = UIEventDispatch::GetInstance();
if (dispatch)
dispatch->SetFocus(this);
@@ -906,7 +906,7 @@ void ActiveWindow::SetFocus()
void ActiveWindow::KillFocus()
{
- EventDispatch* dispatch = EventDispatch::GetInstance();
+ UIEventDispatch* dispatch = UIEventDispatch::GetInstance();
if (dispatch)
dispatch->KillFocus(this);
@@ -919,7 +919,7 @@ void ActiveWindow::KillFocus()
ActiveWindow*
ActiveWindow::GetCapture()
{
- EventDispatch* dispatch = EventDispatch::GetInstance();
+ UIEventDispatch* dispatch = UIEventDispatch::GetInstance();
if (dispatch)
return (ActiveWindow*) dispatch->GetCapture();
@@ -931,7 +931,7 @@ ActiveWindow::GetCapture()
bool
ActiveWindow::SetCapture()
{
- EventDispatch* dispatch = EventDispatch::GetInstance();
+ UIEventDispatch* dispatch = UIEventDispatch::GetInstance();
if (dispatch)
return dispatch->CaptureMouse(this) == 1;
@@ -943,7 +943,7 @@ ActiveWindow::SetCapture()
int
ActiveWindow::ReleaseCapture()
{
- EventDispatch* dispatch = EventDispatch::GetInstance();
+ UIEventDispatch* dispatch = UIEventDispatch::GetInstance();
if (dispatch)
return dispatch->ReleaseMouse(this);
diff --git a/StarsEx/ActiveWindow.h b/StarsEx/ActiveWindow.h
index ebcbdd2..0ad6388 100644
--- a/StarsEx/ActiveWindow.h
+++ b/StarsEx/ActiveWindow.h
@@ -20,7 +20,7 @@
#include "Geometry.h"
#include "Bitmap.h"
#include "Window.h"
-#include "EventTarget.h"
+#include "UIEventTarget.h"
#include "List.h"
#include "Text.h"
@@ -114,7 +114,7 @@ struct AWMap
// +--------------------------------------------------------------------+
class ActiveWindow : public Window,
-public EventTarget
+public UIEventTarget
{
public:
static const char* TYPENAME() { return "ActiveWindow"; }
diff --git a/StarsEx/CMakeLists.txt b/StarsEx/CMakeLists.txt
index b99f765..91e82d8 100644
--- a/StarsEx/CMakeLists.txt
+++ b/StarsEx/CMakeLists.txt
@@ -75,7 +75,7 @@ add_library(
Element.cpp
Encrypt.cpp
EngDlg.cpp
- EventDispatch.cpp
+ UIEventDispatch.cpp
ExceptionHandler.cpp
ExitDlg.cpp
Explosion.cpp
diff --git a/StarsEx/CmpnScreen.cpp b/StarsEx/CmpnScreen.cpp
index 70fcf8a..7faffb6 100644
--- a/StarsEx/CmpnScreen.cpp
+++ b/StarsEx/CmpnScreen.cpp
@@ -39,7 +39,6 @@
#include "Bitmap.h"
#include "Font.h"
#include "FontMgr.h"
-#include "EventDispatch.h"
#include "DataLoader.h"
#include "Game.h"
diff --git a/StarsEx/ComboBox.cpp b/StarsEx/ComboBox.cpp
index 4269a96..cb16723 100644
--- a/StarsEx/ComboBox.cpp
+++ b/StarsEx/ComboBox.cpp
@@ -18,7 +18,7 @@
#include "Screen.h"
#include "Bitmap.h"
#include "Font.h"
-#include "EventDispatch.h"
+#include "UIEventDispatch.h"
// +--------------------------------------------------------------------+
// DECLARE MAPPING FUNCTIONS:
@@ -311,7 +311,7 @@ void ComboBox::ShowList()
list->Show();
list_showing = true;
- EventDispatch* dispatch = EventDispatch::GetInstance();
+ UIEventDispatch* dispatch = UIEventDispatch::GetInstance();
if (dispatch) {
dispatch->MouseEnter(list);
dispatch->SetFocus(list);
diff --git a/StarsEx/EventDispatch.h b/StarsEx/EventDispatch.h
deleted file mode 100644
index 29b48a0..0000000
--- a/StarsEx/EventDispatch.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Starshatter: The Open Source Project
- Copyright (c) 2021-2022, Starshatter: The Open Source Project Contributors
- Copyright (c) 2011-2012, Starshatter OpenSource Distribution Contributors
- Copyright (c) 1997-2006, Destroyer Studios LLC.
-
- AUTHOR: John DiCamillo
-
-
- OVERVIEW
- ========
- Event Dispatch class
-*/
-
-#ifndef EventDispatch_h
-#define EventDispatch_h
-
-#include "Types.h"
-#include "EventTarget.h"
-#include "List.h"
-
-// +--------------------------------------------------------------------+
-
-class EventDispatch
-{
-public:
- static const char* TYPENAME() { return "EventDispatch"; }
-
- EventDispatch();
- virtual ~EventDispatch();
-
- static void Create();
- static void Close();
- static EventDispatch* GetInstance() { return dispatcher; }
-
- virtual void Dispatch();
- virtual void Register(EventTarget* tgt);
- virtual void Unregister(EventTarget* tgt);
-
- virtual EventTarget* GetCapture();
- virtual int CaptureMouse(EventTarget* tgt);
- virtual int ReleaseMouse(EventTarget* tgt);
-
- virtual EventTarget* GetFocus();
- virtual void SetFocus(EventTarget* tgt);
- virtual void KillFocus(EventTarget* tgt);
-
- virtual void MouseEnter(EventTarget* tgt);
-
-protected:
- int mouse_x, mouse_y, mouse_l, mouse_r;
- List<EventTarget> clients;
- EventTarget* capture;
- EventTarget* current;
- EventTarget* focus;
- EventTarget* click_tgt;
-
- static EventDispatch* dispatcher;
-};
-
-#endif // EventDispatch_h
-
diff --git a/StarsEx/Game.cpp b/StarsEx/Game.cpp
index 4c15163..420d7d3 100644
--- a/StarsEx/Game.cpp
+++ b/StarsEx/Game.cpp
@@ -11,7 +11,7 @@
#include "Mouse.h"
#include "Universe.h"
#include "Window.h"
-#include "EventDispatch.h"
+#include "UIEventDispatch.h"
#include "Panic.h"
#include "Pcx.h"
#include "Bitmap.h"
@@ -130,7 +130,7 @@ void
Game::GameLoop()
{
if (active) {
- auto dispatch = EventDispatch::GetInstance();
+ auto dispatch = UIEventDispatch::GetInstance();
if (dispatch)
dispatch->Dispatch();
}
diff --git a/StarsEx/GameScreen.cpp b/StarsEx/GameScreen.cpp
index 87ce925..82e9ffd 100644
--- a/StarsEx/GameScreen.cpp
+++ b/StarsEx/GameScreen.cpp
@@ -48,7 +48,6 @@
#include "Bitmap.h"
#include "Font.h"
#include "FontMgr.h"
-#include "EventDispatch.h"
#include "DataLoader.h"
// +--------------------------------------------------------------------+
diff --git a/StarsEx/MapView.cpp b/StarsEx/MapView.cpp
index dee3152..930a762 100644
--- a/StarsEx/MapView.cpp
+++ b/StarsEx/MapView.cpp
@@ -35,7 +35,8 @@
#include "Game.h"
#include "ContentBundle.h"
-#include "EventDispatch.h"
+#include "UIEventDispatch.h"
+#include "UIEventTarget.h"
#include "Video.h"
#include "Button.h"
#include "Bitmap.h"
@@ -599,7 +600,7 @@ MapView::ProcessMenuItem(int action)
bool
MapView::SetCapture()
{
- EventDispatch* dispatch = EventDispatch::GetInstance();
+ UIEventDispatch* dispatch = UIEventDispatch::GetInstance();
if (dispatch)
return dispatch->CaptureMouse(this) ? true : false;
@@ -611,7 +612,7 @@ MapView::SetCapture()
bool
MapView::ReleaseCapture()
{
- EventDispatch* dispatch = EventDispatch::GetInstance();
+ UIEventDispatch* dispatch = UIEventDispatch::GetInstance();
if (dispatch)
return dispatch->ReleaseMouse(this) ? true : false;
@@ -3211,7 +3212,7 @@ MapView::ZoomOut()
void
MapView::OnShow()
{
- EventDispatch* dispatch = EventDispatch::GetInstance();
+ UIEventDispatch* dispatch = UIEventDispatch::GetInstance();
if (dispatch)
dispatch->Register(this);
}
@@ -3219,7 +3220,7 @@ MapView::OnShow()
void
MapView::OnHide()
{
- EventDispatch* dispatch = EventDispatch::GetInstance();
+ UIEventDispatch* dispatch = UIEventDispatch::GetInstance();
if (dispatch)
dispatch->Unregister(this);
@@ -3276,8 +3277,8 @@ int
MapView::OnMouseMove(int x, int y)
{
if (captured) {
- EventTarget* test = 0;
- EventDispatch* dispatch = EventDispatch::GetInstance();
+ UIEventTarget* test = 0;
+ UIEventDispatch* dispatch = UIEventDispatch::GetInstance();
if (dispatch)
test = dispatch->GetCapture();
diff --git a/StarsEx/MapView.h b/StarsEx/MapView.h
index 0e8d599..d89ac92 100644
--- a/StarsEx/MapView.h
+++ b/StarsEx/MapView.h
@@ -17,7 +17,7 @@
#include "Types.h"
#include "SimObject.h"
#include "View.h"
-#include "EventTarget.h"
+#include "UIEventTarget.h"
#include "Bitmap.h"
#include "List.h"
#include "Text.h"
@@ -45,7 +45,7 @@ const int EID_MAP_CLICK = 1000;
// +--------------------------------------------------------------------+
class MapView : public View,
-public EventTarget,
+public UIEventTarget,
public SimObserver
{
public:
diff --git a/StarsEx/MenuScreen.cpp b/StarsEx/MenuScreen.cpp
index f45d2c5..3f4ebbd 100644
--- a/StarsEx/MenuScreen.cpp
+++ b/StarsEx/MenuScreen.cpp
@@ -58,7 +58,6 @@
#include "Bitmap.h"
#include "Font.h"
#include "FontMgr.h"
-#include "EventDispatch.h"
#include "DataLoader.h"
// +--------------------------------------------------------------------+
diff --git a/StarsEx/PlanScreen.cpp b/StarsEx/PlanScreen.cpp
index e560be4..47f1c73 100644
--- a/StarsEx/PlanScreen.cpp
+++ b/StarsEx/PlanScreen.cpp
@@ -32,7 +32,6 @@
#include "Bitmap.h"
#include "Font.h"
#include "FontMgr.h"
-#include "EventDispatch.h"
#include "DataLoader.h"
// +--------------------------------------------------------------------+
diff --git a/StarsEx/RichTextBox.cpp b/StarsEx/RichTextBox.cpp
index fe64f0d..5f29867 100644
--- a/StarsEx/RichTextBox.cpp
+++ b/StarsEx/RichTextBox.cpp
@@ -12,7 +12,6 @@
*/
#include "RichTextBox.h"
-#include "EventDispatch.h"
#include "Color.h"
#include "Bitmap.h"
#include "Font.h"
diff --git a/StarsEx/RichTextBox.h b/StarsEx/RichTextBox.h
index 826d483..96838d1 100644
--- a/StarsEx/RichTextBox.h
+++ b/StarsEx/RichTextBox.h
@@ -18,7 +18,6 @@
#include "Color.h"
#include "Bitmap.h"
#include "ScrollWindow.h"
-#include "EventTarget.h"
#include "List.h"
#include "Text.h"
diff --git a/StarsEx/Starshatter.cpp b/StarsEx/Starshatter.cpp
index b3a4be3..6b87fb8 100644
--- a/StarsEx/Starshatter.cpp
+++ b/StarsEx/Starshatter.cpp
@@ -103,7 +103,7 @@
#include "MouseController.h"
#include "Mouse.h"
#include "TrackIR.h"
-#include "EventDispatch.h"
+#include "UIEventDispatch.h"
#include "MultiController.h"
#include "DataLoader.h"
#include "Random.h"
@@ -278,7 +278,7 @@ Starshatter::~Starshatter()
NetServerConfig::Close();
Mouse::Close();
- EventDispatch::Close();
+ UIEventDispatch::Close();
FontMgr::Close();
Button::Close();
DataLoader::Close();
@@ -383,7 +383,7 @@ Starshatter::InitGame()
InitMouse();
Button::Initialize();
- EventDispatch::Create();
+ UIEventDispatch::Create();
NetClientConfig::Initialize();
Player::Initialize();
HUDSounds::Initialize();
@@ -2063,7 +2063,7 @@ Starshatter::SetChatMode(int mode)
void
Starshatter::DoMouseFrame()
{
- EventDispatch* event_dispatch = EventDispatch::GetInstance();
+ UIEventDispatch* event_dispatch = UIEventDispatch::GetInstance();
if (event_dispatch && event_dispatch->GetCapture())
return;
diff --git a/StarsEx/TacRefDlg.cpp b/StarsEx/TacRefDlg.cpp
index ff623bc..6afa3ed 100644
--- a/StarsEx/TacRefDlg.cpp
+++ b/StarsEx/TacRefDlg.cpp
@@ -22,7 +22,7 @@
#include "Game.h"
#include "ContentBundle.h"
-#include "EventDispatch.h"
+#include "UIEventDispatch.h"
#include "Mouse.h"
#include "Button.h"
#include "ListBox.h"
@@ -430,7 +430,7 @@ TacRefDlg::ExecFrame()
bool
TacRefDlg::SetCaptureBeauty()
{
- EventDispatch* dispatch = EventDispatch::GetInstance();
+ UIEventDispatch* dispatch = UIEventDispatch::GetInstance();
if (dispatch && beauty)
return dispatch->CaptureMouse(beauty) ? true : false;
@@ -440,7 +440,7 @@ TacRefDlg::SetCaptureBeauty()
bool
TacRefDlg::ReleaseCaptureBeauty()
{
- EventDispatch* dispatch = EventDispatch::GetInstance();
+ UIEventDispatch* dispatch = UIEventDispatch::GetInstance();
if (dispatch && beauty)
return dispatch->ReleaseMouse(beauty) ? true : false;
diff --git a/StarsEx/EventDispatch.cpp b/StarsEx/UIEventDispatch.cpp
index 0a9b95c..8c69bea 100644
--- a/StarsEx/EventDispatch.cpp
+++ b/StarsEx/UIEventDispatch.cpp
@@ -7,7 +7,8 @@
*/
-#include "EventDispatch.h"
+#include "UIEventDispatch.h"
+
#include "Mouse.h"
#include "Keyboard.h"
@@ -17,30 +18,30 @@ int GetKeyPlus(int& key, int& shift);
// +--------------------------------------------------------------------+
-EventDispatch* EventDispatch::dispatcher = 0;
+UIEventDispatch* UIEventDispatch::dispatcher = 0;
// +--------------------------------------------------------------------+
-EventDispatch::EventDispatch()
+UIEventDispatch::UIEventDispatch()
: capture(0), current(0), focus(0), click_tgt(0),
mouse_x(0), mouse_y(0), mouse_l(0), mouse_r(0)
{ }
-EventDispatch::~EventDispatch()
+UIEventDispatch::~UIEventDispatch()
{ }
// +--------------------------------------------------------------------+
void
-EventDispatch::Create()
+UIEventDispatch::Create()
{
- dispatcher = new EventDispatch;
+ dispatcher = new UIEventDispatch;
}
// +--------------------------------------------------------------------+
void
-EventDispatch::Close()
+UIEventDispatch::Close()
{
delete dispatcher;
dispatcher = 0;
@@ -49,7 +50,7 @@ EventDispatch::Close()
// +--------------------------------------------------------------------+
void
-EventDispatch::Dispatch()
+UIEventDispatch::Dispatch()
{
int ml = Mouse::LButton();
int mr = Mouse::RButton();
@@ -57,14 +58,14 @@ EventDispatch::Dispatch()
int my = Mouse::Y();
int mw = Mouse::Wheel();
- EventTarget* mouse_tgt = capture;
- EventTarget* key_tgt = focus;
- EventTarget* do_click = 0;
+ UIEventTarget* mouse_tgt = capture;
+ UIEventTarget* key_tgt = focus;
+ UIEventTarget* do_click = 0;
if (!mouse_tgt) {
- ListIter<EventTarget> iter = clients;
+ ListIter<UIEventTarget> iter = clients;
while (++iter) {
- EventTarget* test = iter.value();
+ UIEventTarget* test = iter.value();
if (test->IsFormActive()) {
if (test->TargetRect().Contains(mx,my))
mouse_tgt = test;
@@ -180,7 +181,7 @@ EventDispatch::Dispatch()
// +--------------------------------------------------------------------+
void
-EventDispatch::MouseEnter(EventTarget* mouse_tgt)
+UIEventDispatch::MouseEnter(UIEventTarget* mouse_tgt)
{
if (mouse_tgt != current) {
if (current) current->OnMouseExit(0,0);
@@ -192,7 +193,7 @@ EventDispatch::MouseEnter(EventTarget* mouse_tgt)
// +--------------------------------------------------------------------+
void
-EventDispatch::Register(EventTarget* tgt)
+UIEventDispatch::Register(UIEventTarget* tgt)
{
if (!clients.contains(tgt))
clients.append(tgt);
@@ -201,7 +202,7 @@ EventDispatch::Register(EventTarget* tgt)
// +--------------------------------------------------------------------+
void
-EventDispatch::Unregister(EventTarget* tgt)
+UIEventDispatch::Unregister(UIEventTarget* tgt)
{
clients.remove(tgt);
@@ -213,14 +214,14 @@ EventDispatch::Unregister(EventTarget* tgt)
// +--------------------------------------------------------------------+
-EventTarget*
-EventDispatch::GetCapture()
+UIEventTarget*
+UIEventDispatch::GetCapture()
{
return capture;
}
int
-EventDispatch::CaptureMouse(EventTarget* tgt)
+UIEventDispatch::CaptureMouse(UIEventTarget* tgt)
{
if (tgt) {
capture = tgt;
@@ -231,7 +232,7 @@ EventDispatch::CaptureMouse(EventTarget* tgt)
}
int
-EventDispatch::ReleaseMouse(EventTarget* tgt)
+UIEventDispatch::ReleaseMouse(UIEventTarget* tgt)
{
if (capture == tgt) {
capture = 0;
@@ -243,14 +244,14 @@ EventDispatch::ReleaseMouse(EventTarget* tgt)
// +--------------------------------------------------------------------+
-EventTarget*
-EventDispatch::GetFocus()
+UIEventTarget*
+UIEventDispatch::GetFocus()
{
return focus;
}
void
-EventDispatch::SetFocus(EventTarget* tgt)
+UIEventDispatch::SetFocus(UIEventTarget* tgt)
{
if (focus != tgt) {
if (focus)
@@ -264,7 +265,7 @@ EventDispatch::SetFocus(EventTarget* tgt)
}
void
-EventDispatch::KillFocus(EventTarget* tgt)
+UIEventDispatch::KillFocus(UIEventTarget* tgt)
{
if (focus && focus == tgt) {
focus = 0;
diff --git a/StarsEx/UIEventDispatch.h b/StarsEx/UIEventDispatch.h
new file mode 100644
index 0000000..442a539
--- /dev/null
+++ b/StarsEx/UIEventDispatch.h
@@ -0,0 +1,60 @@
+/* Starshatter: The Open Source Project
+ Copyright (c) 2021-2022, Starshatter: The Open Source Project Contributors
+ Copyright (c) 2011-2012, Starshatter OpenSource Distribution Contributors
+ Copyright (c) 1997-2006, Destroyer Studios LLC.
+
+ AUTHOR: John DiCamillo
+
+
+ OVERVIEW
+ ========
+ Event Dispatch class
+*/
+
+#ifndef UIEventDispatch_h
+#define UIEventDispatch_h
+
+#include "List.h"
+#include "Types.h"
+#include "UIEventTarget.h"
+
+
+class UIEventDispatch
+{
+public:
+ static const char* TYPENAME() { return "UIEventDispatch"; }
+
+ UIEventDispatch();
+ virtual ~UIEventDispatch();
+
+ static void Create();
+ static void Close();
+ static UIEventDispatch* GetInstance() { return dispatcher; }
+
+ virtual void Dispatch();
+ virtual void Register(UIEventTarget* tgt);
+ virtual void Unregister(UIEventTarget* tgt);
+
+ virtual UIEventTarget* GetCapture();
+ virtual int CaptureMouse(UIEventTarget* tgt);
+ virtual int ReleaseMouse(UIEventTarget* tgt);
+
+ virtual UIEventTarget* GetFocus();
+ virtual void SetFocus(UIEventTarget* tgt);
+ virtual void KillFocus(UIEventTarget* tgt);
+
+ virtual void MouseEnter(UIEventTarget* tgt);
+
+protected:
+ int mouse_x, mouse_y, mouse_l, mouse_r;
+ List<UIEventTarget> clients;
+ UIEventTarget* capture;
+ UIEventTarget* current;
+ UIEventTarget* focus;
+ UIEventTarget* click_tgt;
+
+ static UIEventDispatch* dispatcher;
+};
+
+
+#endif // UIEventDispatch_h
diff --git a/StarsEx/EventTarget.h b/StarsEx/UIEventTarget.h
index 0c56944..c8acd4c 100644
--- a/StarsEx/EventTarget.h
+++ b/StarsEx/UIEventTarget.h
@@ -11,22 +11,21 @@
Event Target interface class
*/
-#ifndef EventTarget_h
-#define EventTarget_h
+#ifndef UIEventTarget_h
+#define UIEventTarget_h
#include "Types.h"
#include "Geometry.h"
-// +--------------------------------------------------------------------+
-class EventTarget
+class UIEventTarget
{
public:
- static const char* TYPENAME() { return "EventTarget"; }
+ static const char* TYPENAME() { return "UIEventTarget"; }
- virtual ~EventTarget() { }
+ virtual ~UIEventTarget() { }
- int operator == (const EventTarget& t) const { return this == &t; }
+ int operator == (const UIEventTarget& t) const { return this == &t; }
virtual int OnMouseMove(int x, int y) { return 0; }
virtual int OnLButtonDown(int x, int y) { return 0; }
@@ -51,8 +50,8 @@ public:
virtual Rect TargetRect() const { return Rect(); }
- virtual const char* GetDescription() const { return "EventTarget"; }
+ virtual const char* GetDescription() const { return "UIEventTarget"; }
};
-#endif // EventTarget_h
+#endif // UIEventTarget_h