diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-12-02 12:44:30 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-12-02 12:44:30 +0300 |
commit | 892424cc005d41b8976ae9193a3a4161b5c1950f (patch) | |
tree | 6b1cde86aeba82405e87526982910133007d1c52 | |
parent | 8aa68056aec80c775a3ddb152bea8a90a7097199 (diff) | |
download | manaplus-892424cc005d41b8976ae9193a3a4161b5c1950f.tar.gz manaplus-892424cc005d41b8976ae9193a3a4161b5c1950f.tar.bz2 manaplus-892424cc005d41b8976ae9193a3a4161b5c1950f.tar.xz manaplus-892424cc005d41b8976ae9193a3a4161b5c1950f.zip |
Rename DeathListener into WidgetDeathListener.
-rw-r--r-- | src/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/gui/widgets/basiccontainer.h | 8 | ||||
-rw-r--r-- | src/gui/widgets/widget.cpp | 8 | ||||
-rw-r--r-- | src/gui/widgets/widget.h | 12 | ||||
-rw-r--r-- | src/listeners/widgetdeathlistener.h (renamed from src/listeners/deathlistener.h) | 12 |
6 files changed, 22 insertions, 22 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b4ede1dd9..7b704787e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1091,9 +1091,9 @@ SET(SRCS gui/color.h gui/colorpair.h gui/dialogtype.h - listeners/deathlistener.h listeners/errorlistener.cpp listeners/errorlistener.h + listeners/widgetdeathlistener.h events/event.h listeners/focuslistener.h listeners/guiconfiglistener.h diff --git a/src/Makefile.am b/src/Makefile.am index 1631dda65..2660d26bb 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -181,9 +181,9 @@ manaplus_SOURCES += events/actionevent.h \ gui/cliprect.h \ gui/color.h \ gui/dialogtype.h \ - listeners/deathlistener.h \ listeners/errorlistener.cpp \ listeners/errorlistener.h \ + listeners/widgetdeathlistener.h \ events/event.h \ listeners/focuslistener.h \ listeners/guiconfiglistener.h \ diff --git a/src/gui/widgets/basiccontainer.h b/src/gui/widgets/basiccontainer.h index 47fa2abc1..cfbfb8931 100644 --- a/src/gui/widgets/basiccontainer.h +++ b/src/gui/widgets/basiccontainer.h @@ -69,7 +69,7 @@ #include "gui/widgets/widget.h" -#include "listeners/deathlistener.h" +#include "listeners/widgetdeathlistener.h" /** * A base class for containers. The class implements the most @@ -80,12 +80,12 @@ * @since 0.6.0 */ class BasicContainer notfinal : public Widget, - public DeathListener + public WidgetDeathListener { public: explicit BasicContainer(const Widget2 *const widget) : Widget(widget), - DeathListener(), + WidgetDeathListener(), mWidgets(), mLogicWidgets() { } @@ -131,7 +131,7 @@ class BasicContainer notfinal : public Widget, virtual Widget *getWidgetAt(int x, int y) override A_WARN_UNUSED; - // Inherited from DeathListener + // Inherited from WidgetDeathListener virtual void death(const Event& event) override; diff --git a/src/gui/widgets/widget.cpp b/src/gui/widgets/widget.cpp index 43c8df92f..68b97ece2 100644 --- a/src/gui/widgets/widget.cpp +++ b/src/gui/widgets/widget.cpp @@ -74,7 +74,7 @@ #include "gui/focushandler.h" #include "listeners/actionlistener.h" -#include "listeners/deathlistener.h" +#include "listeners/widgetdeathlistener.h" #include "listeners/widgetlistener.h" #include "debug.h" @@ -117,7 +117,7 @@ Widget::Widget(const Widget2 *const widget) : Widget::~Widget() { - FOR_EACH (DeathListenerIterator, iter, mDeathListeners) + FOR_EACH (WidgetDeathListenerIterator, iter, mDeathListeners) { Event event(this); (*iter)->death(event); @@ -258,12 +258,12 @@ void Widget::removeActionListener(ActionListener *const actionListener) mActionListeners.remove(actionListener); } -void Widget::addDeathListener(DeathListener *const deathListener) +void Widget::addDeathListener(WidgetDeathListener *const deathListener) { mDeathListeners.push_back(deathListener); } -void Widget::removeDeathListener(DeathListener *const deathListener) +void Widget::removeDeathListener(WidgetDeathListener *const deathListener) { mDeathListeners.remove(deathListener); } diff --git a/src/gui/widgets/widget.h b/src/gui/widgets/widget.h index 8109d142d..c4d30e492 100644 --- a/src/gui/widgets/widget.h +++ b/src/gui/widgets/widget.h @@ -76,7 +76,7 @@ #include "localconsts.h" class ActionListener; -class DeathListener; +class WidgetDeathListener; class FocusHandler; class FocusListener; class Font; @@ -532,7 +532,7 @@ class Widget notfinal : public Widget2 * @see removeDeathListener * @since 0.1.0 */ - void addDeathListener(DeathListener *const deathListener); + void addDeathListener(WidgetDeathListener *const deathListener); /** * Removes an added death listener from the widget. @@ -541,7 +541,7 @@ class Widget notfinal : public Widget2 * @see addDeathListener * @since 0.1.0 */ - void removeDeathListener(DeathListener *const deathListener); + void removeDeathListener(WidgetDeathListener *const deathListener); /** * Adds a mouse listener to the widget. When a mouse event is @@ -1112,17 +1112,17 @@ class Widget notfinal : public Widget2 /** * Typdef. */ - typedef std::list<DeathListener*> DeathListenerList; + typedef std::list<WidgetDeathListener*> WidgetDeathListenerList; /** * Holds the death listeners of the widget. */ - DeathListenerList mDeathListeners; + WidgetDeathListenerList mDeathListeners; /** * Typdef. */ - typedef DeathListenerList::iterator DeathListenerIterator; + typedef WidgetDeathListenerList::iterator WidgetDeathListenerIterator; /** * Typdef. diff --git a/src/listeners/deathlistener.h b/src/listeners/widgetdeathlistener.h index 940a623b1..b51e28fb5 100644 --- a/src/listeners/deathlistener.h +++ b/src/listeners/widgetdeathlistener.h @@ -61,8 +61,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef LISTENERS_DEATHLISTENER_H -#define LISTENERS_DEATHLISTENER_H +#ifndef LISTENERS_WIDGETDEATHLISTENER_H +#define LISTENERS_WIDGETDEATHLISTENER_H #include <string> @@ -75,13 +75,13 @@ * @author Olof Naessén * @since 0.6.0 */ -class DeathListener notfinal +class WidgetDeathListener notfinal { public: /** * Destructor. */ - virtual ~DeathListener() + virtual ~WidgetDeathListener() { } /** @@ -99,8 +99,8 @@ class DeathListener notfinal * You should not be able to make an instance of DeathListener, * therefore its constructor is protected. */ - DeathListener() + WidgetDeathListener() { } }; -#endif // LISTENERS_DEATHLISTENER_H +#endif // LISTENERS_WIDGETDEATHLISTENER_H |