summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/Makefile.am2
-rw-r--r--src/gui/base/basiccontainer.hpp3
-rw-r--r--src/gui/base/widget.cpp3
-rw-r--r--src/gui/base/widget.hpp2
-rw-r--r--src/listeners/deathlistener.h (renamed from src/gui/base/deathlistener.hpp)53
6 files changed, 32 insertions, 33 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index fccf99fb6..d68026c5d 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -774,7 +774,7 @@ SET(SRCS
gui/base/basiccontainer.hpp
gui/base/cliprectangle.hpp
gui/base/color.hpp
- gui/base/deathlistener.hpp
+ listeners/deathlistener.h
gui/base/event.hpp
gui/base/exception.hpp
gui/base/focushandler.hpp
diff --git a/src/Makefile.am b/src/Makefile.am
index 422b08586..7a74b3d17 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -161,7 +161,7 @@ manaplus_SOURCES += gui/base/actionevent.hpp \
gui/base/basiccontainer.hpp \
gui/base/cliprectangle.hpp \
gui/base/color.hpp \
- gui/base/deathlistener.hpp \
+ listeners/deathlistener.h \
gui/base/event.hpp \
gui/base/exception.hpp \
gui/base/focushandler.hpp \
diff --git a/src/gui/base/basiccontainer.hpp b/src/gui/base/basiccontainer.hpp
index d6dd38b63..0fec2c0e7 100644
--- a/src/gui/base/basiccontainer.hpp
+++ b/src/gui/base/basiccontainer.hpp
@@ -67,9 +67,10 @@
#include <list>
#include <vector>
-#include "gui/base/deathlistener.hpp"
#include "gui/base/widget.hpp"
+#include "listeners/deathlistener.h"
+
namespace gcn
{
/**
diff --git a/src/gui/base/widget.cpp b/src/gui/base/widget.cpp
index c14914cc2..b9a98ff1c 100644
--- a/src/gui/base/widget.cpp
+++ b/src/gui/base/widget.cpp
@@ -70,7 +70,6 @@
#include "gui/base/actionevent.hpp"
#include "listeners/actionlistener.h"
#include "gui/base/basiccontainer.hpp"
-#include "gui/base/deathlistener.hpp"
#include "gui/base/event.hpp"
#include "gui/base/exception.hpp"
#include "gui/base/focushandler.hpp"
@@ -80,6 +79,8 @@
#include "gui/base/mouselistener.hpp"
#include "gui/base/widgetlistener.hpp"
+#include "listeners/deathlistener.h"
+
#include "render/graphics.h"
#include "debug.h"
diff --git a/src/gui/base/widget.hpp b/src/gui/base/widget.hpp
index 1c05c2d03..b896ac1e9 100644
--- a/src/gui/base/widget.hpp
+++ b/src/gui/base/widget.hpp
@@ -74,12 +74,12 @@
#include "localconsts.h"
class ActionListener;
+class DeathListener;
class Graphics;
namespace gcn
{
class BasicContainer;
- class DeathListener;
class FocusHandler;
class FocusListener;
class Font;
diff --git a/src/gui/base/deathlistener.hpp b/src/listeners/deathlistener.h
index b325166c2..ad2eb5364 100644
--- a/src/gui/base/deathlistener.hpp
+++ b/src/listeners/deathlistener.h
@@ -61,49 +61,46 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef GCN_DEATHLISTENER_HPP
-#define GCN_DEATHLISTENER_HPP
+#ifndef LISTENERS_DEATHLISTENER_HPP
+#define LISTENERS_DEATHLISTENER_HPP
#include <string>
#include "gui/base/event.hpp"
-namespace gcn
+/**
+ * Interface for listening for death events from widgets.
+ *
+ * @see Widget::addDeathListener, Widget::removeDeathListener
+ * @author Olof Naessén
+ * @since 0.6.0
+ */
+class DeathListener
{
- /**
- * Interface for listening for death events from widgets.
- *
- * @see Widget::addDeathListener, Widget::removeDeathListener
- * @author Olof Naessén
- * @since 0.6.0
- */
- class DeathListener
- {
public:
/**
- * Destructor.
- */
+ * Destructor.
+ */
virtual ~DeathListener()
{ }
/**
- * Called when a widget dies. It is used to be able to recieve
- * a notification when a death of a widget occurs.
- *
- * @param event The event of the death.
- */
- virtual void death(const Event& event) = 0;
+ * Called when a widget dies. It is used to be able to recieve
+ * a notification when a death of a widget occurs.
+ *
+ * @param event The event of the death.
+ */
+ virtual void death(const gcn::Event &event) = 0;
protected:
/**
- * Constructor.
- *
- * You should not be able to make an instance of DeathListener,
- * therefore its constructor is protected.
- */
+ * Constructor.
+ *
+ * You should not be able to make an instance of DeathListener,
+ * therefore its constructor is protected.
+ */
DeathListener()
{ }
- };
-} // namespace gcn
+};
-#endif // end GCN_DEATHLISTENER_HPP
+#endif // LISTENERS_DEATHLISTENER_HPP