summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-02-16 12:47:15 +0300
committerAndrei Karas <akaras@inbox.ru>2014-02-16 12:47:15 +0300
commit3ae82048ca8636ce03e71bdd4c11f60594cfc698 (patch)
tree51d344c3baeaa586fdfc8fc913c7863558b99093 /src
parent0d73f54f842a9690c65faedf094112017fd07430 (diff)
downloadManaVerse-3ae82048ca8636ce03e71bdd4c11f60594cfc698.tar.gz
ManaVerse-3ae82048ca8636ce03e71bdd4c11f60594cfc698.tar.bz2
ManaVerse-3ae82048ca8636ce03e71bdd4c11f60594cfc698.tar.xz
ManaVerse-3ae82048ca8636ce03e71bdd4c11f60594cfc698.zip
move event into events directory.
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt3
-rw-r--r--src/Makefile.am6
-rw-r--r--src/events/actionevent.h6
-rw-r--r--src/events/event.h (renamed from src/gui/base/event.hpp)66
-rw-r--r--src/gui/base/event.cpp87
-rw-r--r--src/gui/base/focushandler.hpp2
-rw-r--r--src/gui/base/inputevent.hpp2
-rw-r--r--src/gui/base/selectionevent.hpp2
-rw-r--r--src/gui/base/widget.cpp2
-rw-r--r--src/gui/focushandler.cpp2
-rw-r--r--src/gui/focushandler.h2
-rw-r--r--src/gui/gui.cpp2
-rw-r--r--src/gui/gui.h2
-rw-r--r--src/gui/widgets/button.cpp4
-rw-r--r--src/gui/widgets/button.h4
-rw-r--r--src/gui/widgets/characterdisplay.cpp2
-rw-r--r--src/gui/widgets/characterdisplay.h2
-rw-r--r--src/gui/widgets/desktop.cpp2
-rw-r--r--src/gui/widgets/desktop.h2
-rw-r--r--src/gui/widgets/dropshortcutcontainer.cpp2
-rw-r--r--src/gui/widgets/dropshortcutcontainer.h2
-rw-r--r--src/gui/widgets/emotepage.cpp4
-rw-r--r--src/gui/widgets/emotepage.h4
-rw-r--r--src/gui/widgets/emoteshortcutcontainer.cpp2
-rw-r--r--src/gui/widgets/emoteshortcutcontainer.h2
-rw-r--r--src/gui/widgets/flowcontainer.cpp4
-rw-r--r--src/gui/widgets/flowcontainer.h2
-rw-r--r--src/gui/widgets/horizontcontainer.cpp2
-rw-r--r--src/gui/widgets/horizontcontainer.h2
-rw-r--r--src/gui/widgets/itemcontainer.cpp2
-rw-r--r--src/gui/widgets/itemcontainer.h2
-rw-r--r--src/gui/widgets/itemshortcutcontainer.cpp2
-rw-r--r--src/gui/widgets/itemshortcutcontainer.h2
-rw-r--r--src/gui/widgets/layouthelper.cpp2
-rw-r--r--src/gui/widgets/layouthelper.h2
-rw-r--r--src/gui/widgets/popup.cpp4
-rw-r--r--src/gui/widgets/popup.h4
-rw-r--r--src/gui/widgets/popuplist.cpp6
-rw-r--r--src/gui/widgets/popuplist.h6
-rw-r--r--src/gui/widgets/progressbar.cpp4
-rw-r--r--src/gui/widgets/progressbar.h4
-rw-r--r--src/gui/widgets/scrollarea.cpp4
-rw-r--r--src/gui/widgets/scrollarea.h4
-rw-r--r--src/gui/widgets/shortcutcontainer.cpp4
-rw-r--r--src/gui/widgets/shortcutcontainer.h4
-rw-r--r--src/gui/widgets/spellshortcutcontainer.cpp2
-rw-r--r--src/gui/widgets/spellshortcutcontainer.h2
-rw-r--r--src/gui/widgets/tabbedarea.cpp8
-rw-r--r--src/gui/widgets/tabbedarea.h4
-rw-r--r--src/gui/widgets/tabs/setuptabscroll.cpp2
-rw-r--r--src/gui/widgets/tabs/setuptabscroll.h2
-rw-r--r--src/gui/widgets/tabs/tab.cpp4
-rw-r--r--src/gui/widgets/tabs/tab.h4
-rw-r--r--src/gui/widgets/textfield.cpp4
-rw-r--r--src/gui/widgets/textfield.h4
-rw-r--r--src/gui/widgets/vertcontainer.cpp2
-rw-r--r--src/gui/widgets/vertcontainer.h2
-rw-r--r--src/gui/widgets/widgetgroup.cpp2
-rw-r--r--src/gui/widgets/widgetgroup.h2
-rw-r--r--src/gui/widgets/window.cpp8
-rw-r--r--src/gui/widgets/window.h6
-rw-r--r--src/gui/windows/charselectdialog.cpp2
-rw-r--r--src/gui/windows/charselectdialog.h2
-rw-r--r--src/gui/windows/chatwindow.cpp4
-rw-r--r--src/gui/windows/chatwindow.h2
-rw-r--r--src/gui/windows/debugwindow.cpp2
-rw-r--r--src/gui/windows/debugwindow.h2
-rw-r--r--src/gui/windows/didyouknowwindow.cpp2
-rw-r--r--src/gui/windows/emotewindow.cpp4
-rw-r--r--src/gui/windows/emotewindow.h4
-rw-r--r--src/gui/windows/helpwindow.cpp2
-rw-r--r--src/gui/windows/inventorywindow.cpp6
-rw-r--r--src/gui/windows/inventorywindow.h4
-rw-r--r--src/gui/windows/setupwindow.cpp4
-rw-r--r--src/gui/windows/setupwindow.h2
-rw-r--r--src/gui/windows/shortcutwindow.cpp4
-rw-r--r--src/gui/windows/shortcutwindow.h4
-rw-r--r--src/gui/windows/skilldialog.cpp2
-rw-r--r--src/gui/windows/skilldialog.h2
-rw-r--r--src/gui/windows/socialwindow.cpp4
-rw-r--r--src/gui/windows/socialwindow.h2
-rw-r--r--src/gui/windows/whoisonline.cpp4
-rw-r--r--src/gui/windows/whoisonline.h2
-rw-r--r--src/listeners/deathlistener.h4
-rw-r--r--src/listeners/focuslistener.h6
-rw-r--r--src/listeners/widgetlistener.h10
86 files changed, 170 insertions, 256 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 99d36e1ec..2a79f5839 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -775,7 +775,7 @@ SET(SRCS
gui/base/cliprectangle.hpp
gui/base/color.hpp
listeners/deathlistener.h
- gui/base/event.hpp
+ events/event.h
gui/base/exception.hpp
gui/base/focushandler.hpp
listeners/focuslistener.h
@@ -811,7 +811,6 @@ SET(SRCS
gui/base/basiccontainer.cpp
gui/base/cliprectangle.cpp
gui/base/color.cpp
- gui/base/event.cpp
gui/base/exception.cpp
gui/base/focushandler.cpp
gui/base/font.cpp
diff --git a/src/Makefile.am b/src/Makefile.am
index 21c2fc0e9..8a731c17f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -28,7 +28,6 @@ endif
dyecmd_CXXFLAGS =
dyecmd_SOURCES = gui/base/cliprectangle.cpp \
gui/base/color.cpp \
- gui/base/event.cpp \
gui/base/exception.cpp \
gui/base/font.cpp \
gui/base/rectangle.cpp \
@@ -36,7 +35,7 @@ dyecmd_SOURCES = gui/base/cliprectangle.cpp \
events/actionevent.h \
gui/base/cliprectangle.hpp \
gui/base/color.hpp \
- gui/base/event.hpp \
+ events/event.h \
gui/base/exception.hpp \
gui/base/font.hpp \
gui/base/rectangle.hpp \
@@ -161,7 +160,7 @@ manaplus_SOURCES += events/actionevent.h \
gui/base/cliprectangle.hpp \
gui/base/color.hpp \
listeners/deathlistener.h \
- gui/base/event.hpp \
+ events/event.h \
gui/base/exception.hpp \
gui/base/focushandler.hpp \
listeners/focuslistener.h \
@@ -198,7 +197,6 @@ manaplus_SOURCES += events/actionevent.h \
gui/base/basiccontainer.cpp \
gui/base/cliprectangle.cpp \
gui/base/color.cpp \
- gui/base/event.cpp \
gui/base/exception.cpp \
gui/base/focushandler.cpp \
gui/base/font.cpp \
diff --git a/src/events/actionevent.h b/src/events/actionevent.h
index 77f945693..70ed0f398 100644
--- a/src/events/actionevent.h
+++ b/src/events/actionevent.h
@@ -64,7 +64,7 @@
#ifndef EVENTS_ACTIONEVENT_HPP
#define EVENTS_ACTIONEVENT_HPP
-#include "gui/base/event.hpp"
+#include "events/event.h"
#include <string>
@@ -97,7 +97,7 @@ namespace GCN
* @author Olof Naessén
* @since 0.6.0
*/
-class ActionEvent final : public gcn::Event
+class ActionEvent final : public Event
{
public:
/**
@@ -107,7 +107,7 @@ class ActionEvent final : public gcn::Event
* @param id An identifier of the event.
*/
ActionEvent(gcn::Widget *const source, const std::string &id) :
- gcn::Event(source),
+ Event(source),
mId(id)
{
}
diff --git a/src/gui/base/event.hpp b/src/events/event.h
index 2a1f4ca4b..d62dd672b 100644
--- a/src/gui/base/event.hpp
+++ b/src/events/event.h
@@ -61,53 +61,57 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef GCN_EVENT_HPP
-#define GCN_EVENT_HPP
+#ifndef EVENTS_EVENT_HPP
+#define EVENTS_EVENT_HPP
#include "localconsts.h"
namespace gcn
{
class Widget;
+}
- /**
- * Base class for all events. All events in Guichan should
- * inherit from this class.
- *
- * @author Olof Naessén
- * @since 0.6.0
- */
- class Event
- {
+/**
+ * Base class for all events. All events in Guichan should
+ * inherit from this class.
+ *
+ * @author Olof Naessén
+ * @since 0.6.0
+ */
+class Event
+{
public:
/**
- * Constructor.
- *
- * @param source The source widget of the event.
- */
- explicit Event(Widget *const source);
+ * Constructor.
+ *
+ * @param source The source widget of the event.
+ */
+ explicit Event(gcn::Widget *const source) :
+ mSource(source)
+ { }
A_DELETE_COPY(Event)
/**
- * Destructor.
- */
- virtual ~Event();
+ * Destructor.
+ */
+ virtual ~Event()
+ { }
/**
- * Gets the source widget of the event. The function
- * is used to tell which widget fired an event.
- *
- * @return The source widget of the event.
- */
- Widget* getSource() const A_WARN_UNUSED;
+ * Gets the source widget of the event. The function
+ * is used to tell which widget fired an event.
+ *
+ * @return The source widget of the event.
+ */
+ gcn::Widget* getSource() const A_WARN_UNUSED
+ { return mSource; }
protected:
/**
- * Holds the source widget of the event.
- */
- Widget* mSource;
- };
-} // namespace gcn
+ * Holds the source widget of the event.
+ */
+ gcn::Widget* mSource;
+};
-#endif // end GCN_EVENT_HPP
+#endif // EVENTS_EVENT_HPP
diff --git a/src/gui/base/event.cpp b/src/gui/base/event.cpp
deleted file mode 100644
index 359b780bf..000000000
--- a/src/gui/base/event.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * The ManaPlus Client
- * Copyright (C) 2011-2014 The ManaPlus Developers
- *
- * This file is part of The ManaPlus Client.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/* _______ __ __ __ ______ __ __ _______ __ __
- * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\
- * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / /
- * / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / /
- * / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / /
- * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ /
- * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/
- *
- * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson
- *
- *
- * Per Larsson a.k.a finalman
- * Olof Naessén a.k.a jansem/yakslem
- *
- * Visit: http://guichan.sourceforge.net
- *
- * License: (BSD)
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name of Guichan nor the names of its contributors may
- * be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * For comments regarding functions please see the header file.
- */
-
-#include "gui/base/event.hpp"
-
-#include "debug.h"
-
-namespace gcn
-{
- Event::Event(Widget *const source) :
- mSource(source)
- {
- }
-
- Event::~Event()
- {
- }
-
- Widget* Event::getSource() const
- {
- return mSource;
- }
-} // namespace gcn
diff --git a/src/gui/base/focushandler.hpp b/src/gui/base/focushandler.hpp
index aab3f2464..a5c1b14a1 100644
--- a/src/gui/base/focushandler.hpp
+++ b/src/gui/base/focushandler.hpp
@@ -66,7 +66,7 @@
#include <vector>
-#include "gui/base/event.hpp"
+#include "events/event.h"
namespace gcn
{
diff --git a/src/gui/base/inputevent.hpp b/src/gui/base/inputevent.hpp
index 166edf038..fab68e2a4 100644
--- a/src/gui/base/inputevent.hpp
+++ b/src/gui/base/inputevent.hpp
@@ -64,7 +64,7 @@
#ifndef GCN_INPUTEVENT_HPP
#define GCN_INPUTEVENT_HPP
-#include "gui/base/event.hpp"
+#include "events/event.h"
namespace gcn
{
diff --git a/src/gui/base/selectionevent.hpp b/src/gui/base/selectionevent.hpp
index 543b3a9ad..5d05f015c 100644
--- a/src/gui/base/selectionevent.hpp
+++ b/src/gui/base/selectionevent.hpp
@@ -64,7 +64,7 @@
#ifndef GCN_SELECTIONEVENT_HPP
#define GCN_SELECTIONEVENT_HPP
-#include "gui/base/event.hpp"
+#include "events/event.h"
#include "localconsts.h"
diff --git a/src/gui/base/widget.cpp b/src/gui/base/widget.cpp
index de133ac09..6083fb35a 100644
--- a/src/gui/base/widget.cpp
+++ b/src/gui/base/widget.cpp
@@ -70,7 +70,7 @@
#include "events/actionevent.h"
#include "gui/base/basiccontainer.hpp"
-#include "gui/base/event.hpp"
+#include "events/event.h"
#include "gui/base/exception.hpp"
#include "gui/base/focushandler.hpp"
#include "gui/base/keyinput.hpp"
diff --git a/src/gui/focushandler.cpp b/src/gui/focushandler.cpp
index cd780e12d..04cb3f555 100644
--- a/src/gui/focushandler.cpp
+++ b/src/gui/focushandler.cpp
@@ -103,7 +103,7 @@ void FocusHandler::checkForWindow() const
}
}
-void FocusHandler::distributeFocusGainedEvent(const gcn::Event &focusEvent)
+void FocusHandler::distributeFocusGainedEvent(const Event &focusEvent)
{
if (gui)
gui->distributeGlobalFocusGainedEvent(focusEvent);
diff --git a/src/gui/focushandler.h b/src/gui/focushandler.h
index b051fe300..0e07625b7 100644
--- a/src/gui/focushandler.h
+++ b/src/gui/focushandler.h
@@ -71,7 +71,7 @@ class FocusHandler final : public gcn::FocusHandler
void tabPrevious() override final;
- void distributeFocusGainedEvent(const gcn::Event &focusEvent)
+ void distributeFocusGainedEvent(const Event &focusEvent)
override final;
private:
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index bced937c7..5d72c9dcb 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -920,7 +920,7 @@ void Gui::removeGlobalFocusListener(FocusListener* focusListener)
mFocusListeners.remove(focusListener);
}
-void Gui::distributeGlobalFocusGainedEvent(const gcn::Event &focusEvent)
+void Gui::distributeGlobalFocusGainedEvent(const Event &focusEvent)
{
for (FocusListenerIterator iter = mFocusListeners.begin();
iter != mFocusListeners.end();
diff --git a/src/gui/gui.h b/src/gui/gui.h
index 544d9dd3d..1ec73e42f 100644
--- a/src/gui/gui.h
+++ b/src/gui/gui.h
@@ -156,7 +156,7 @@ class Gui final : public gcn::Gui
void removeGlobalFocusListener(FocusListener* focusListener);
- void distributeGlobalFocusGainedEvent(const gcn::Event &focusEvent);
+ void distributeGlobalFocusGainedEvent(const Event &focusEvent);
void removeDragged(gcn::Widget *widget);
diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp
index ee984a18a..5478d8164 100644
--- a/src/gui/widgets/button.cpp
+++ b/src/gui/widgets/button.cpp
@@ -546,12 +546,12 @@ void Button::mouseReleased(gcn::MouseEvent& mouseEvent)
}
}
-void Button::widgetResized(const gcn::Event &event A_UNUSED)
+void Button::widgetResized(const Event &event A_UNUSED)
{
mRedraw = true;
}
-void Button::widgetMoved(const gcn::Event &event A_UNUSED)
+void Button::widgetMoved(const Event &event A_UNUSED)
{
mRedraw = true;
}
diff --git a/src/gui/widgets/button.h b/src/gui/widgets/button.h
index 8f79755a8..7fd7e4a9a 100644
--- a/src/gui/widgets/button.h
+++ b/src/gui/widgets/button.h
@@ -132,9 +132,9 @@ class Button final : public gcn::Button,
void setPressed(bool b)
{ mPressed = b; }
- void widgetResized(const gcn::Event &event) override final;
+ void widgetResized(const Event &event) override final;
- void widgetMoved(const gcn::Event &event) override final;
+ void widgetMoved(const Event &event) override final;
void loadImage(const std::string &imageName);
diff --git a/src/gui/widgets/characterdisplay.cpp b/src/gui/widgets/characterdisplay.cpp
index 21de10412..3f4a672f0 100644
--- a/src/gui/widgets/characterdisplay.cpp
+++ b/src/gui/widgets/characterdisplay.cpp
@@ -110,7 +110,7 @@ void CharacterDisplay::update()
distributeResizedEvent();
}
-void CharacterDisplay::widgetHidden(const gcn::Event &event A_UNUSED)
+void CharacterDisplay::widgetHidden(const Event &event A_UNUSED)
{
mPopup->setVisible(false);
}
diff --git a/src/gui/widgets/characterdisplay.h b/src/gui/widgets/characterdisplay.h
index 940dbe5c6..84a288ab0 100644
--- a/src/gui/widgets/characterdisplay.h
+++ b/src/gui/widgets/characterdisplay.h
@@ -73,7 +73,7 @@ class CharacterDisplay final : public Container,
void setSelect(bool b)
{ mPlayerBox->setSelected(b); }
- void widgetHidden(const gcn::Event &event) override final;
+ void widgetHidden(const Event &event) override final;
void mouseExited(gcn::MouseEvent &event) override final;
diff --git a/src/gui/widgets/desktop.cpp b/src/gui/widgets/desktop.cpp
index 5874ee441..8e0496fea 100644
--- a/src/gui/widgets/desktop.cpp
+++ b/src/gui/widgets/desktop.cpp
@@ -98,7 +98,7 @@ void Desktop::reloadWallpaper()
setBestFittingWallpaper();
}
-void Desktop::widgetResized(const gcn::Event &event A_UNUSED)
+void Desktop::widgetResized(const Event &event A_UNUSED)
{
setBestFittingWallpaper();
}
diff --git a/src/gui/widgets/desktop.h b/src/gui/widgets/desktop.h
index 9e49ceb59..ad07b0ff8 100644
--- a/src/gui/widgets/desktop.h
+++ b/src/gui/widgets/desktop.h
@@ -60,7 +60,7 @@ class Desktop final : public Container,
*/
void reloadWallpaper();
- void widgetResized(const gcn::Event &event) override final;
+ void widgetResized(const Event &event) override final;
void draw(Graphics *graphics) override final;
diff --git a/src/gui/widgets/dropshortcutcontainer.cpp b/src/gui/widgets/dropshortcutcontainer.cpp
index 9b37682fe..4b991bc34 100644
--- a/src/gui/widgets/dropshortcutcontainer.cpp
+++ b/src/gui/widgets/dropshortcutcontainer.cpp
@@ -308,7 +308,7 @@ void DropShortcutContainer::mouseExited(gcn::MouseEvent &event A_UNUSED)
mItemPopup->setVisible(false);
}
-void DropShortcutContainer::widgetHidden(const gcn::Event &event A_UNUSED)
+void DropShortcutContainer::widgetHidden(const Event &event A_UNUSED)
{
if (mItemPopup)
mItemPopup->setVisible(false);
diff --git a/src/gui/widgets/dropshortcutcontainer.h b/src/gui/widgets/dropshortcutcontainer.h
index 6b7a9f151..26cbdffa7 100644
--- a/src/gui/widgets/dropshortcutcontainer.h
+++ b/src/gui/widgets/dropshortcutcontainer.h
@@ -67,7 +67,7 @@ class DropShortcutContainer final : public ShortcutContainer
*/
void mouseReleased(gcn::MouseEvent &event) override final;
- void widgetHidden(const gcn::Event &event) override final;
+ void widgetHidden(const Event &event) override final;
void mouseExited(gcn::MouseEvent &event) override final;
diff --git a/src/gui/widgets/emotepage.cpp b/src/gui/widgets/emotepage.cpp
index 091d699a7..e255afc30 100644
--- a/src/gui/widgets/emotepage.cpp
+++ b/src/gui/widgets/emotepage.cpp
@@ -139,12 +139,12 @@ void EmotePage::resetAction()
mSelectedIndex = -1;
}
-void EmotePage::widgetResized(const gcn::Event &event A_UNUSED)
+void EmotePage::widgetResized(const Event &event A_UNUSED)
{
mRedraw = true;
}
-void EmotePage::widgetMoved(const gcn::Event &event A_UNUSED)
+void EmotePage::widgetMoved(const Event &event A_UNUSED)
{
mRedraw = true;
}
diff --git a/src/gui/widgets/emotepage.h b/src/gui/widgets/emotepage.h
index afc950f79..cb6fd8711 100644
--- a/src/gui/widgets/emotepage.h
+++ b/src/gui/widgets/emotepage.h
@@ -48,9 +48,9 @@ class EmotePage final : public gcn::Widget,
int getIndexFromGrid(const int x, const int y) const;
- void widgetResized(const gcn::Event &event A_UNUSED) override final;
+ void widgetResized(const Event &event A_UNUSED) override final;
- void widgetMoved(const gcn::Event &event A_UNUSED) override final;
+ void widgetMoved(const Event &event A_UNUSED) override final;
void resetAction();
diff --git a/src/gui/widgets/emoteshortcutcontainer.cpp b/src/gui/widgets/emoteshortcutcontainer.cpp
index dc25d9e5c..d00f01495 100644
--- a/src/gui/widgets/emoteshortcutcontainer.cpp
+++ b/src/gui/widgets/emoteshortcutcontainer.cpp
@@ -232,7 +232,7 @@ void EmoteShortcutContainer::mouseExited(gcn::MouseEvent &event A_UNUSED)
mEmotePopup->setVisible(false);
}
-void EmoteShortcutContainer::widgetHidden(const gcn::Event &event A_UNUSED)
+void EmoteShortcutContainer::widgetHidden(const Event &event A_UNUSED)
{
if (mEmotePopup)
mEmotePopup->setVisible(false);
diff --git a/src/gui/widgets/emoteshortcutcontainer.h b/src/gui/widgets/emoteshortcutcontainer.h
index 62999207e..37ebe0cf9 100644
--- a/src/gui/widgets/emoteshortcutcontainer.h
+++ b/src/gui/widgets/emoteshortcutcontainer.h
@@ -74,7 +74,7 @@ class EmoteShortcutContainer final : public ShortcutContainer
void mouseExited(gcn::MouseEvent &event) override final;
- void widgetHidden(const gcn::Event &event) override final;
+ void widgetHidden(const Event &event) override final;
void setWidget2(const Widget2 *const widget) override final;
diff --git a/src/gui/widgets/flowcontainer.cpp b/src/gui/widgets/flowcontainer.cpp
index bfcd704d3..1c5961140 100644
--- a/src/gui/widgets/flowcontainer.cpp
+++ b/src/gui/widgets/flowcontainer.cpp
@@ -39,7 +39,7 @@ FlowContainer::FlowContainer(const Widget2 *const widget,
mBoxHeight = 1;
}
-void FlowContainer::widgetResized(const gcn::Event &event A_UNUSED)
+void FlowContainer::widgetResized(const Event &event A_UNUSED)
{
if (getWidth() < mBoxWidth)
{
@@ -92,5 +92,5 @@ void FlowContainer::add(gcn::Widget *widget)
Container::add(widget);
widget->setSize(mBoxWidth, mBoxHeight);
- widgetResized(gcn::Event(nullptr));
+ widgetResized(Event(nullptr));
}
diff --git a/src/gui/widgets/flowcontainer.h b/src/gui/widgets/flowcontainer.h
index e2773d34c..a425e8465 100644
--- a/src/gui/widgets/flowcontainer.h
+++ b/src/gui/widgets/flowcontainer.h
@@ -55,7 +55,7 @@ class FlowContainer final : public Container,
* Invoked when a widget changes its size. This is used to determine
* the new height of the container.
*/
- void widgetResized(const gcn::Event &event) override final;
+ void widgetResized(const Event &event) override final;
int getBoxWidth() const A_WARN_UNUSED
{ return mBoxWidth; }
diff --git a/src/gui/widgets/horizontcontainer.cpp b/src/gui/widgets/horizontcontainer.cpp
index 77dff3232..b2fddfcae 100644
--- a/src/gui/widgets/horizontcontainer.cpp
+++ b/src/gui/widgets/horizontcontainer.cpp
@@ -58,6 +58,6 @@ void HorizontContainer::clear()
mCount = 0;
}
-void HorizontContainer::widgetResized(const gcn::Event &event A_UNUSED)
+void HorizontContainer::widgetResized(const Event &event A_UNUSED)
{
}
diff --git a/src/gui/widgets/horizontcontainer.h b/src/gui/widgets/horizontcontainer.h
index eb1f8c5aa..4f652df64 100644
--- a/src/gui/widgets/horizontcontainer.h
+++ b/src/gui/widgets/horizontcontainer.h
@@ -48,7 +48,7 @@ class HorizontContainer final : public Container,
void clear() override;
- void widgetResized(const gcn::Event &event) override final;
+ void widgetResized(const Event &event) override final;
protected:
int mSpacing;
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index 84934911c..2c9e9b731 100644
--- a/src/gui/widgets/itemcontainer.cpp
+++ b/src/gui/widgets/itemcontainer.cpp
@@ -618,7 +618,7 @@ void ItemContainer::mouseExited(gcn::MouseEvent &event A_UNUSED)
mItemPopup->setVisible(false);
}
-void ItemContainer::widgetResized(const gcn::Event &event A_UNUSED)
+void ItemContainer::widgetResized(const Event &event A_UNUSED)
{
mGridColumns = std::max(1, mDimension.width / mBoxWidth);
adjustHeight();
diff --git a/src/gui/widgets/itemcontainer.h b/src/gui/widgets/itemcontainer.h
index 3d98d425b..ecb7b658e 100644
--- a/src/gui/widgets/itemcontainer.h
+++ b/src/gui/widgets/itemcontainer.h
@@ -96,7 +96,7 @@ class ItemContainer final : public gcn::Widget,
void mouseExited(gcn::MouseEvent &event) override final;
// WidgetListener
- void widgetResized(const gcn::Event &event) override final;
+ void widgetResized(const Event &event) override final;
/**
* Returns the selected item.
diff --git a/src/gui/widgets/itemshortcutcontainer.cpp b/src/gui/widgets/itemshortcutcontainer.cpp
index 2438050d9..ef4d8ebfa 100644
--- a/src/gui/widgets/itemshortcutcontainer.cpp
+++ b/src/gui/widgets/itemshortcutcontainer.cpp
@@ -467,7 +467,7 @@ void ItemShortcutContainer::mouseExited(gcn::MouseEvent &event A_UNUSED)
mSpellPopup->setVisible(false);
}
-void ItemShortcutContainer::widgetHidden(const gcn::Event &event A_UNUSED)
+void ItemShortcutContainer::widgetHidden(const Event &event A_UNUSED)
{
if (mItemPopup)
mItemPopup->setVisible(false);
diff --git a/src/gui/widgets/itemshortcutcontainer.h b/src/gui/widgets/itemshortcutcontainer.h
index c2dbe93a3..5efda0433 100644
--- a/src/gui/widgets/itemshortcutcontainer.h
+++ b/src/gui/widgets/itemshortcutcontainer.h
@@ -68,7 +68,7 @@ class ItemShortcutContainer final : public ShortcutContainer
*/
void mouseReleased(gcn::MouseEvent &event) override final;
- void widgetHidden(const gcn::Event &event) override final;
+ void widgetHidden(const Event &event) override final;
void mouseExited(gcn::MouseEvent &event) override final;
diff --git a/src/gui/widgets/layouthelper.cpp b/src/gui/widgets/layouthelper.cpp
index 460810adf..066cabaf8 100644
--- a/src/gui/widgets/layouthelper.cpp
+++ b/src/gui/widgets/layouthelper.cpp
@@ -61,7 +61,7 @@ void LayoutHelper::reflowLayout(int w, int h)
mContainer->setSize(w, h);
}
-void LayoutHelper::widgetResized(const gcn::Event &event A_UNUSED)
+void LayoutHelper::widgetResized(const Event &event A_UNUSED)
{
const gcn::Rectangle area = mContainer->getChildrenArea();
int w = area.width;
diff --git a/src/gui/widgets/layouthelper.h b/src/gui/widgets/layouthelper.h
index bdd923560..d5a94e656 100644
--- a/src/gui/widgets/layouthelper.h
+++ b/src/gui/widgets/layouthelper.h
@@ -78,7 +78,7 @@ class LayoutHelper final : public WidgetListener
/**
* Called whenever the managed container changes size.
*/
- void widgetResized(const gcn::Event &event) override final;
+ void widgetResized(const Event &event) override final;
private:
Layout mLayout; /**< Layout handler */
diff --git a/src/gui/widgets/popup.cpp b/src/gui/widgets/popup.cpp
index 9d34beaa7..7036968ad 100644
--- a/src/gui/widgets/popup.cpp
+++ b/src/gui/widgets/popup.cpp
@@ -244,12 +244,12 @@ void Popup::hide()
mRedraw = true;
}
-void Popup::widgetResized(const gcn::Event &event A_UNUSED)
+void Popup::widgetResized(const Event &event A_UNUSED)
{
mRedraw = true;
}
-void Popup::widgetMoved(const gcn::Event &event A_UNUSED)
+void Popup::widgetMoved(const Event &event A_UNUSED)
{
mRedraw = true;
}
diff --git a/src/gui/widgets/popup.h b/src/gui/widgets/popup.h
index 25998e21d..e467783ef 100644
--- a/src/gui/widgets/popup.h
+++ b/src/gui/widgets/popup.h
@@ -164,9 +164,9 @@ class Popup : public Container,
void hide();
- void widgetResized(const gcn::Event &event) override;
+ void widgetResized(const Event &event) override;
- void widgetMoved(const gcn::Event &event) override final;
+ void widgetMoved(const Event &event) override final;
bool isPopupVisible() const
{ return mVisible; }
diff --git a/src/gui/widgets/popuplist.cpp b/src/gui/widgets/popuplist.cpp
index b8e4dabb4..37dd6b1ec 100644
--- a/src/gui/widgets/popuplist.cpp
+++ b/src/gui/widgets/popuplist.cpp
@@ -90,7 +90,7 @@ void PopupList::show(int x, int y)
requestModalFocus();
}
-void PopupList::widgetResized(const gcn::Event &event)
+void PopupList::widgetResized(const Event &event)
{
Popup::widgetResized(event);
adjustSize();
@@ -154,7 +154,7 @@ void PopupList::mouseReleased(gcn::MouseEvent& mouseEvent)
releaseModalFocus();
}
-void PopupList::focusGained(const gcn::Event& event)
+void PopupList::focusGained(const Event& event)
{
const gcn::Widget *const source = event.getSource();
if (!mVisible || source == this || source == mListBox
@@ -170,7 +170,7 @@ void PopupList::focusGained(const gcn::Event& event)
releaseModalFocus();
}
-void PopupList::focusLost(const gcn::Event& event A_UNUSED)
+void PopupList::focusLost(const Event& event A_UNUSED)
{
if (mDropDown)
mDropDown->updateSelection();
diff --git a/src/gui/widgets/popuplist.h b/src/gui/widgets/popuplist.h
index 454b5617c..31308fff8 100644
--- a/src/gui/widgets/popuplist.h
+++ b/src/gui/widgets/popuplist.h
@@ -49,7 +49,7 @@ class PopupList final : public Popup,
void show(int x, int y);
- void widgetResized(const gcn::Event &event) override final;
+ void widgetResized(const Event &event) override final;
void setSelected(int selected);
@@ -62,9 +62,9 @@ class PopupList final : public Popup,
void adjustSize();
- void focusGained(const gcn::Event& event A_UNUSED) override final;
+ void focusGained(const Event& event A_UNUSED) override final;
- void focusLost(const gcn::Event& event A_UNUSED) override final;
+ void focusLost(const Event& event A_UNUSED) override final;
void mousePressed(gcn::MouseEvent& mouseEvent) override final;
diff --git a/src/gui/widgets/progressbar.cpp b/src/gui/widgets/progressbar.cpp
index 415962310..b120e4289 100644
--- a/src/gui/widgets/progressbar.cpp
+++ b/src/gui/widgets/progressbar.cpp
@@ -283,12 +283,12 @@ void ProgressBar::render(Graphics *graphics)
}
}
-void ProgressBar::widgetResized(const gcn::Event &event A_UNUSED)
+void ProgressBar::widgetResized(const Event &event A_UNUSED)
{
mRedraw = true;
}
-void ProgressBar::widgetMoved(const gcn::Event &event A_UNUSED)
+void ProgressBar::widgetMoved(const Event &event A_UNUSED)
{
mRedraw = true;
}
diff --git a/src/gui/widgets/progressbar.h b/src/gui/widgets/progressbar.h
index 2835a7ffc..86e314e16 100644
--- a/src/gui/widgets/progressbar.h
+++ b/src/gui/widgets/progressbar.h
@@ -132,9 +132,9 @@ class ProgressBar final : public gcn::Widget,
*/
void render(Graphics *graphics);
- void widgetResized(const gcn::Event &event) override final;
+ void widgetResized(const Event &event) override final;
- void widgetMoved(const gcn::Event &event) override final;
+ void widgetMoved(const Event &event) override final;
void setPadding(unsigned int padding)
{ mPadding = padding; }
diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp
index e9e850b1c..73ff82be0 100644
--- a/src/gui/widgets/scrollarea.cpp
+++ b/src/gui/widgets/scrollarea.cpp
@@ -667,7 +667,7 @@ void ScrollArea::mouseExited(gcn::MouseEvent& event A_UNUSED)
mHasMouse = false;
}
-void ScrollArea::widgetResized(const gcn::Event &event A_UNUSED)
+void ScrollArea::widgetResized(const Event &event A_UNUSED)
{
mRedraw = true;
const unsigned int frameSize = 2 * mFrameSize;
@@ -679,7 +679,7 @@ void ScrollArea::widgetResized(const gcn::Event &event A_UNUSED)
}
}
-void ScrollArea::widgetMoved(const gcn::Event& event A_UNUSED)
+void ScrollArea::widgetMoved(const Event& event A_UNUSED)
{
mRedraw = true;
}
diff --git a/src/gui/widgets/scrollarea.h b/src/gui/widgets/scrollarea.h
index 69f567b02..7bf7e811c 100644
--- a/src/gui/widgets/scrollarea.h
+++ b/src/gui/widgets/scrollarea.h
@@ -124,9 +124,9 @@ class ScrollArea final : public gcn::ScrollArea,
void mouseDragged(gcn::MouseEvent &event) override final;
- void widgetResized(const gcn::Event &event) override final;
+ void widgetResized(const Event &event) override final;
- void widgetMoved(const gcn::Event &event) override final;
+ void widgetMoved(const Event &event) override final;
gcn::Rectangle getVerticalBarDimension() const;
diff --git a/src/gui/widgets/shortcutcontainer.cpp b/src/gui/widgets/shortcutcontainer.cpp
index 8b3507b8e..767a32974 100644
--- a/src/gui/widgets/shortcutcontainer.cpp
+++ b/src/gui/widgets/shortcutcontainer.cpp
@@ -53,7 +53,7 @@ ShortcutContainer::~ShortcutContainer()
mVertexes = nullptr;
}
-void ShortcutContainer::widgetResized(const gcn::Event &event A_UNUSED)
+void ShortcutContainer::widgetResized(const Event &event A_UNUSED)
{
mGridWidth = mDimension.width / mBoxWidth;
@@ -116,7 +116,7 @@ void ShortcutContainer::drawBackground(Graphics *g)
}
}
-void ShortcutContainer::widgetMoved(const gcn::Event& event A_UNUSED)
+void ShortcutContainer::widgetMoved(const Event& event A_UNUSED)
{
mRedraw = true;
}
diff --git a/src/gui/widgets/shortcutcontainer.h b/src/gui/widgets/shortcutcontainer.h
index 1db3e0482..2c237f513 100644
--- a/src/gui/widgets/shortcutcontainer.h
+++ b/src/gui/widgets/shortcutcontainer.h
@@ -59,9 +59,9 @@ class ShortcutContainer : public gcn::Widget,
* Invoked when a widget changes its size. This is used to determine
* the new height of the container.
*/
- virtual void widgetResized(const gcn::Event &event) override final;
+ virtual void widgetResized(const Event &event) override final;
- virtual void widgetMoved(const gcn::Event& event) override final;
+ virtual void widgetMoved(const Event& event) override final;
/**
* Handles mouse when dragged.
diff --git a/src/gui/widgets/spellshortcutcontainer.cpp b/src/gui/widgets/spellshortcutcontainer.cpp
index 696b0fbb4..ee76ee5dd 100644
--- a/src/gui/widgets/spellshortcutcontainer.cpp
+++ b/src/gui/widgets/spellshortcutcontainer.cpp
@@ -314,7 +314,7 @@ void SpellShortcutContainer::mouseExited(gcn::MouseEvent &event A_UNUSED)
mSpellPopup->setVisible(false);
}
-void SpellShortcutContainer::widgetHidden(const gcn::Event &event A_UNUSED)
+void SpellShortcutContainer::widgetHidden(const Event &event A_UNUSED)
{
if (mSpellPopup)
mSpellPopup->setVisible(false);
diff --git a/src/gui/widgets/spellshortcutcontainer.h b/src/gui/widgets/spellshortcutcontainer.h
index 3115e47fe..b5968dfe5 100644
--- a/src/gui/widgets/spellshortcutcontainer.h
+++ b/src/gui/widgets/spellshortcutcontainer.h
@@ -67,7 +67,7 @@ class SpellShortcutContainer final : public ShortcutContainer
*/
void mouseReleased(gcn::MouseEvent &event) override final;
- void widgetHidden(const gcn::Event &event) override final;
+ void widgetHidden(const Event &event) override final;
void mouseExited(gcn::MouseEvent &event) override final;
diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp
index 500e821f5..2fe4f1332 100644
--- a/src/gui/widgets/tabbedarea.cpp
+++ b/src/gui/widgets/tabbedarea.cpp
@@ -72,7 +72,7 @@ TabbedArea::TabbedArea(const Widget2 *const widget) :
void TabbedArea::postInit()
{
- widgetResized(gcn::Event(nullptr));
+ widgetResized(Event(nullptr));
}
TabbedArea::~TabbedArea()
@@ -365,7 +365,7 @@ void TabbedArea::setSelectedTab(Tab *const tab)
if (newTab)
newTab->setCurrent();
- widgetResized(gcn::Event(nullptr));
+ widgetResized(Event(nullptr));
}
int TabbedArea::getSelectedTabIndex() const
@@ -392,7 +392,7 @@ void TabbedArea::setSelectedTabByName(const std::string &name)
}
}
-void TabbedArea::widgetResized(const gcn::Event &event A_UNUSED)
+void TabbedArea::widgetResized(const Event &event A_UNUSED)
{
adjustSize();
@@ -716,7 +716,7 @@ void TabbedArea::keyPressed(gcn::KeyEvent& keyEvent)
}
}
-void TabbedArea::death(const gcn::Event &event)
+void TabbedArea::death(const Event &event)
{
Tab *const tab = dynamic_cast<Tab*>(event.getSource());
diff --git a/src/gui/widgets/tabbedarea.h b/src/gui/widgets/tabbedarea.h
index ec4c02ce5..d517c9a51 100644
--- a/src/gui/widgets/tabbedarea.h
+++ b/src/gui/widgets/tabbedarea.h
@@ -142,7 +142,7 @@ class TabbedArea final : public Widget2,
void setSelectedTabByName(const std::string &name);
- void widgetResized(const gcn::Event &event) override final;
+ void widgetResized(const Event &event) override final;
/*
void moveLeft(Tab *tab);
@@ -184,7 +184,7 @@ class TabbedArea final : public Widget2,
void setDimension(const gcn::Rectangle &dimension);
- void death(const gcn::Event &event);
+ void death(const Event &event);
void setResizeHeight(bool b)
{ mResizeHeight = b; }
diff --git a/src/gui/widgets/tabs/setuptabscroll.cpp b/src/gui/widgets/tabs/setuptabscroll.cpp
index 659ef5824..9a37ced42 100644
--- a/src/gui/widgets/tabs/setuptabscroll.cpp
+++ b/src/gui/widgets/tabs/setuptabscroll.cpp
@@ -146,7 +146,7 @@ void SetupTabScroll::externalUnloaded()
}
}
-void SetupTabScroll::widgetResized(const gcn::Event &event A_UNUSED)
+void SetupTabScroll::widgetResized(const Event &event A_UNUSED)
{
mScroll->setWidth(getWidth() - 12);
mScroll->setHeight(getHeight() - 12 - 12);
diff --git a/src/gui/widgets/tabs/setuptabscroll.h b/src/gui/widgets/tabs/setuptabscroll.h
index 779826e5a..f7aa628c9 100644
--- a/src/gui/widgets/tabs/setuptabscroll.h
+++ b/src/gui/widgets/tabs/setuptabscroll.h
@@ -63,7 +63,7 @@ class SetupTabScroll : public SetupTab
int getPreferredFirstItemSize() const A_WARN_UNUSED
{ return mPreferredFirstItemSize; }
- void widgetResized(const gcn::Event &event) override final;
+ void widgetResized(const Event &event) override final;
void reread(const std::string &name);
diff --git a/src/gui/widgets/tabs/tab.cpp b/src/gui/widgets/tabs/tab.cpp
index 398802eb0..db5ddf6b4 100644
--- a/src/gui/widgets/tabs/tab.cpp
+++ b/src/gui/widgets/tabs/tab.cpp
@@ -254,12 +254,12 @@ void Tab::draw(Graphics *graphics)
BLOCK_END("Tab::draw")
}
-void Tab::widgetResized(const gcn::Event &event A_UNUSED)
+void Tab::widgetResized(const Event &event A_UNUSED)
{
mRedraw = true;
}
-void Tab::widgetMoved(const gcn::Event &event A_UNUSED)
+void Tab::widgetMoved(const Event &event A_UNUSED)
{
mRedraw = true;
}
diff --git a/src/gui/widgets/tabs/tab.h b/src/gui/widgets/tabs/tab.h
index ac10b7dc7..e979c71b8 100644
--- a/src/gui/widgets/tabs/tab.h
+++ b/src/gui/widgets/tabs/tab.h
@@ -130,9 +130,9 @@ class Tab : public gcn::BasicContainer,
int getFlash() const A_WARN_UNUSED
{ return mFlash; }
- void widgetResized(const gcn::Event &event) override final;
+ void widgetResized(const Event &event) override final;
- void widgetMoved(const gcn::Event &event) override final;
+ void widgetMoved(const Event &event) override final;
void setLabelFont(gcn::Font *const font);
diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp
index 22e9d42dd..58facecb8 100644
--- a/src/gui/widgets/textfield.cpp
+++ b/src/gui/widgets/textfield.cpp
@@ -760,7 +760,7 @@ void TextField::mousePressed(gcn::MouseEvent &mouseEvent)
}
}
-void TextField::focusGained(const gcn::Event &event A_UNUSED)
+void TextField::focusGained(const Event &event A_UNUSED)
{
#ifdef ANDROID
if (!client->isKeyboardVisible())
@@ -768,6 +768,6 @@ void TextField::focusGained(const gcn::Event &event A_UNUSED)
#endif
}
-void TextField::focusLost(const gcn::Event &event A_UNUSED)
+void TextField::focusLost(const Event &event A_UNUSED)
{
}
diff --git a/src/gui/widgets/textfield.h b/src/gui/widgets/textfield.h
index 4545e9ff9..42f76985c 100644
--- a/src/gui/widgets/textfield.h
+++ b/src/gui/widgets/textfield.h
@@ -124,9 +124,9 @@ class TextField : public gcn::TextField,
void handleCopy() const;
- void focusGained(const gcn::Event &event) override final;
+ void focusGained(const Event &event) override final;
- void focusLost(const gcn::Event &event) override;
+ void focusLost(const Event &event) override;
void moveCaretBack();
diff --git a/src/gui/widgets/vertcontainer.cpp b/src/gui/widgets/vertcontainer.cpp
index ed3d00219..e38ebb9af 100644
--- a/src/gui/widgets/vertcontainer.cpp
+++ b/src/gui/widgets/vertcontainer.cpp
@@ -79,7 +79,7 @@ void VertContainer::clear()
mResizableWidgets.clear();
}
-void VertContainer::widgetResized(const gcn::Event &event A_UNUSED)
+void VertContainer::widgetResized(const Event &event A_UNUSED)
{
FOR_EACH (std::vector<gcn::Widget*>::const_iterator, it, mResizableWidgets)
(*it)->setWidth(getWidth());
diff --git a/src/gui/widgets/vertcontainer.h b/src/gui/widgets/vertcontainer.h
index 34fcf3d45..1d396efc9 100644
--- a/src/gui/widgets/vertcontainer.h
+++ b/src/gui/widgets/vertcontainer.h
@@ -52,7 +52,7 @@ class VertContainer final : public Container,
void clear();
- void widgetResized(const gcn::Event &event) override final;
+ void widgetResized(const Event &event) override final;
private:
std::vector<gcn::Widget*> mResizableWidgets;
diff --git a/src/gui/widgets/widgetgroup.cpp b/src/gui/widgets/widgetgroup.cpp
index 56da2d492..3957fab30 100644
--- a/src/gui/widgets/widgetgroup.cpp
+++ b/src/gui/widgets/widgetgroup.cpp
@@ -84,6 +84,6 @@ void WidgetGroup::clear()
mCount = 0;
}
-void WidgetGroup::widgetResized(const gcn::Event &event A_UNUSED)
+void WidgetGroup::widgetResized(const Event &event A_UNUSED)
{
}
diff --git a/src/gui/widgets/widgetgroup.h b/src/gui/widgets/widgetgroup.h
index 835738a6f..b26d88d15 100644
--- a/src/gui/widgets/widgetgroup.h
+++ b/src/gui/widgets/widgetgroup.h
@@ -47,7 +47,7 @@ class WidgetGroup : public Container,
virtual void clear();
- void widgetResized(const gcn::Event &event) override final;
+ void widgetResized(const Event &event) override final;
virtual Widget *createWidget(const std::string &name)
const A_WARN_UNUSED = 0;
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp
index 1fc439abf..54c18bd52 100644
--- a/src/gui/widgets/window.cpp
+++ b/src/gui/widgets/window.cpp
@@ -490,7 +490,7 @@ void Window::setResizable(const bool r)
}
}
-void Window::widgetResized(const gcn::Event &event A_UNUSED)
+void Window::widgetResized(const Event &event A_UNUSED)
{
const gcn::Rectangle area = getChildrenArea();
@@ -554,12 +554,12 @@ void Window::widgetResized(const gcn::Event &event A_UNUSED)
mRedraw = true;
}
-void Window::widgetMoved(const gcn::Event& event A_UNUSED)
+void Window::widgetMoved(const Event& event A_UNUSED)
{
mRedraw = true;
}
-void Window::widgetHidden(const gcn::Event &event A_UNUSED)
+void Window::widgetHidden(const Event &event A_UNUSED)
{
if (gui)
gui->setCursorType(Cursor::CURSOR_POINTER);
@@ -1085,7 +1085,7 @@ void Window::adjustSizeToScreen()
if (mDimension.height > screenHeight)
mDimension.height = screenHeight;
if (oldWidth != mDimension.width || oldHeight != mDimension.height)
- widgetResized(gcn::Event(this));
+ widgetResized(Event(this));
}
int Window::getResizeHandles(const gcn::MouseEvent &event)
diff --git a/src/gui/widgets/window.h b/src/gui/widgets/window.h
index 5ff5abe2b..0c3b69880 100644
--- a/src/gui/widgets/window.h
+++ b/src/gui/widgets/window.h
@@ -114,14 +114,14 @@ class Window : public gcn::Window,
/**
* Called whenever the widget changes size.
*/
- virtual void widgetResized(const gcn::Event &event) override;
+ virtual void widgetResized(const Event &event) override;
- virtual void widgetMoved(const gcn::Event& event) override;
+ virtual void widgetMoved(const Event& event) override;
/**
* Called whenever the widget is hidden.
*/
- virtual void widgetHidden(const gcn::Event &event) override;
+ virtual void widgetHidden(const Event &event) override;
/**
* Sets whether or not the window has a close button.
diff --git a/src/gui/windows/charselectdialog.cpp b/src/gui/windows/charselectdialog.cpp
index 5d447c717..793315067 100644
--- a/src/gui/windows/charselectdialog.cpp
+++ b/src/gui/windows/charselectdialog.cpp
@@ -563,7 +563,7 @@ void CharSelectDialog::close()
Window::close();
}
-void CharSelectDialog::widgetResized(const gcn::Event &event)
+void CharSelectDialog::widgetResized(const Event &event)
{
Window::widgetResized(event);
if (mCharacterView)
diff --git a/src/gui/windows/charselectdialog.h b/src/gui/windows/charselectdialog.h
index 6c6759932..e2b9c1ba8 100644
--- a/src/gui/windows/charselectdialog.h
+++ b/src/gui/windows/charselectdialog.h
@@ -86,7 +86,7 @@ class CharSelectDialog final : public Window,
void close() override final;
- void widgetResized(const gcn::Event &event) override final;
+ void widgetResized(const Event &event) override final;
void updateState();
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp
index 28f58aaa9..40b4b9400 100644
--- a/src/gui/windows/chatwindow.cpp
+++ b/src/gui/windows/chatwindow.cpp
@@ -97,7 +97,7 @@ class ChatInput final : public TextField
* Called if the chat input loses focus. It will set itself to
* invisible as result.
*/
- void focusLost(const gcn::Event &event)
+ void focusLost(const Event &event)
{
TextField::focusLost(event);
if (mFocusGaining || !config.getBoolValue("protectChatFocus"))
@@ -441,7 +441,7 @@ void ChatWindow::adjustTabSize()
mChatTabs->adjustSize();
}
-void ChatWindow::widgetResized(const gcn::Event &event)
+void ChatWindow::widgetResized(const Event &event)
{
Window::widgetResized(event);
diff --git a/src/gui/windows/chatwindow.h b/src/gui/windows/chatwindow.h
index e18eef7b2..f8458bd32 100644
--- a/src/gui/windows/chatwindow.h
+++ b/src/gui/windows/chatwindow.h
@@ -286,7 +286,7 @@ class ChatWindow final : public Window,
void unHideWindow();
- void widgetResized(const gcn::Event &event) override final;
+ void widgetResized(const Event &event) override final;
void addGlobalMessage(const std::string &line);
diff --git a/src/gui/windows/debugwindow.cpp b/src/gui/windows/debugwindow.cpp
index 7cc074086..7e68aa6d8 100644
--- a/src/gui/windows/debugwindow.cpp
+++ b/src/gui/windows/debugwindow.cpp
@@ -147,7 +147,7 @@ void DebugWindow::draw(Graphics *g)
BLOCK_END("DebugWindow::draw")
}
-void DebugWindow::widgetResized(const gcn::Event &event)
+void DebugWindow::widgetResized(const Event &event)
{
Window::widgetResized(event);
diff --git a/src/gui/windows/debugwindow.h b/src/gui/windows/debugwindow.h
index 83d6676da..aa7bdfe6c 100644
--- a/src/gui/windows/debugwindow.h
+++ b/src/gui/windows/debugwindow.h
@@ -151,7 +151,7 @@ class DebugWindow final : public Window
void setPing(int pingTime);
- void widgetResized(const gcn::Event &event) override final;
+ void widgetResized(const Event &event) override final;
#ifdef USE_PROFILER
void logicChildren();
diff --git a/src/gui/windows/didyouknowwindow.cpp b/src/gui/windows/didyouknowwindow.cpp
index cb2fdec95..89b1eda26 100644
--- a/src/gui/windows/didyouknowwindow.cpp
+++ b/src/gui/windows/didyouknowwindow.cpp
@@ -99,7 +99,7 @@ DidYouKnowWindow::DidYouKnowWindow() :
void DidYouKnowWindow::postInit()
{
- widgetResized(gcn::Event(nullptr));
+ widgetResized(Event(nullptr));
}
void DidYouKnowWindow::action(const ActionEvent &event)
diff --git a/src/gui/windows/emotewindow.cpp b/src/gui/windows/emotewindow.cpp
index 2d2fdbd26..5f3aa1bb1 100644
--- a/src/gui/windows/emotewindow.cpp
+++ b/src/gui/windows/emotewindow.cpp
@@ -214,7 +214,7 @@ void EmoteWindow::addListeners(ActionListener *const listener)
mFontPage->addActionListener(listener);
}
-void EmoteWindow::widgetResized(const gcn::Event &event)
+void EmoteWindow::widgetResized(const Event &event)
{
Window::widgetResized(event);
const int pad2 = mPadding * 2;
@@ -229,7 +229,7 @@ void EmoteWindow::widgetResized(const gcn::Event &event)
mEmotePage->widgetResized(event);
}
-void EmoteWindow::widgetMoved(const gcn::Event &event)
+void EmoteWindow::widgetMoved(const Event &event)
{
Window::widgetMoved(event);
mEmotePage->widgetResized(event);
diff --git a/src/gui/windows/emotewindow.h b/src/gui/windows/emotewindow.h
index 2ddc64886..37a5c015f 100644
--- a/src/gui/windows/emotewindow.h
+++ b/src/gui/windows/emotewindow.h
@@ -61,9 +61,9 @@ class EmoteWindow final : public Window
void addListeners(ActionListener *const listener);
- void widgetResized(const gcn::Event &event) override final;
+ void widgetResized(const Event &event) override final;
- void widgetMoved(const gcn::Event &event) override final;
+ void widgetMoved(const Event &event) override final;
private:
TabbedArea *mTabs;
diff --git a/src/gui/windows/helpwindow.cpp b/src/gui/windows/helpwindow.cpp
index 53e82335e..9738378ea 100644
--- a/src/gui/windows/helpwindow.cpp
+++ b/src/gui/windows/helpwindow.cpp
@@ -87,7 +87,7 @@ HelpWindow::HelpWindow() :
loadWindowState();
loadTags();
enableVisibleSound(true);
- widgetResized(gcn::Event(nullptr));
+ widgetResized(Event(nullptr));
}
void HelpWindow::action(const ActionEvent &event)
diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp
index 509b085b5..2412b524b 100644
--- a/src/gui/windows/inventorywindow.cpp
+++ b/src/gui/windows/inventorywindow.cpp
@@ -295,7 +295,7 @@ void InventoryWindow::postInit()
slotsChanged(mInventory);
mItems->setSortType(mSortDropDown->getSelected());
- widgetResized(gcn::Event(nullptr));
+ widgetResized(Event(nullptr));
if (!isMainInventory())
setVisible(true);
}
@@ -459,7 +459,7 @@ void InventoryWindow::unselectItem()
mItems->selectNone();
}
-void InventoryWindow::widgetHidden(const gcn::Event &event)
+void InventoryWindow::widgetHidden(const Event &event)
{
Window::widgetHidden(event);
mItems->hidePopup();
@@ -812,7 +812,7 @@ bool InventoryWindow::isAnyInputFocused()
return false;
}
-void InventoryWindow::widgetResized(const gcn::Event &event)
+void InventoryWindow::widgetResized(const Event &event)
{
Window::widgetResized(event);
diff --git a/src/gui/windows/inventorywindow.h b/src/gui/windows/inventorywindow.h
index 4babbc264..cd5172c03 100644
--- a/src/gui/windows/inventorywindow.h
+++ b/src/gui/windows/inventorywindow.h
@@ -92,7 +92,7 @@ class InventoryWindow final : public Window,
/**
* Handles closing of the window
*/
- void widgetHidden(const gcn::Event &event) override final;
+ void widgetHidden(const Event &event) override final;
/**
* Handles the mouse clicks.
@@ -145,7 +145,7 @@ class InventoryWindow final : public Window,
bool isInputFocused() const A_WARN_UNUSED;
- void widgetResized(const gcn::Event &event) override final;
+ void widgetResized(const Event &event) override final;
void mouseMoved(gcn::MouseEvent &event) override final;
diff --git a/src/gui/windows/setupwindow.cpp b/src/gui/windows/setupwindow.cpp
index 710702f5e..a996d776b 100644
--- a/src/gui/windows/setupwindow.cpp
+++ b/src/gui/windows/setupwindow.cpp
@@ -149,7 +149,7 @@ void SetupWindow::postInit()
center();
- widgetResized(gcn::Event(nullptr));
+ widgetResized(Event(nullptr));
setInGame(false);
enableVisibleSound(true);
}
@@ -260,7 +260,7 @@ void SetupWindow::setVisible(bool visible)
Window::setVisible(visible);
}
-void SetupWindow::widgetResized(const gcn::Event &event)
+void SetupWindow::widgetResized(const Event &event)
{
Window::widgetResized(event);
diff --git a/src/gui/windows/setupwindow.h b/src/gui/windows/setupwindow.h
index 27e44b243..38b3eb206 100644
--- a/src/gui/windows/setupwindow.h
+++ b/src/gui/windows/setupwindow.h
@@ -71,7 +71,7 @@ class SetupWindow final : public Window,
void setVisible(bool visible) override final;
- void widgetResized(const gcn::Event &event) override final;
+ void widgetResized(const Event &event) override final;
private:
void unloadModTab();
diff --git a/src/gui/windows/shortcutwindow.cpp b/src/gui/windows/shortcutwindow.cpp
index 96ec8c93c..7916ce8e4 100644
--- a/src/gui/windows/shortcutwindow.cpp
+++ b/src/gui/windows/shortcutwindow.cpp
@@ -176,7 +176,7 @@ int ShortcutWindow::getTabIndex() const
return mTabs->getSelectedTabIndex();
}
-void ShortcutWindow::widgetHidden(const gcn::Event &event)
+void ShortcutWindow::widgetHidden(const Event &event)
{
if (mItems)
mItems->widgetHidden(event);
@@ -226,7 +226,7 @@ void ShortcutWindow::mouseDragged(gcn::MouseEvent &event)
}
}
-void ShortcutWindow::widgetMoved(const gcn::Event& event)
+void ShortcutWindow::widgetMoved(const Event& event)
{
Window::widgetMoved(event);
if (mItems)
diff --git a/src/gui/windows/shortcutwindow.h b/src/gui/windows/shortcutwindow.h
index f4c417c94..707a0a1d7 100644
--- a/src/gui/windows/shortcutwindow.h
+++ b/src/gui/windows/shortcutwindow.h
@@ -60,9 +60,9 @@ class ShortcutWindow final : public Window
int getTabIndex() const A_WARN_UNUSED;
- void widgetHidden(const gcn::Event &event) override final;
+ void widgetHidden(const Event &event) override final;
- void widgetMoved(const gcn::Event& event) override final;
+ void widgetMoved(const Event& event) override final;
void mousePressed(gcn::MouseEvent &event) override final;
diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp
index 12c6e76d8..deeffb9a0 100644
--- a/src/gui/windows/skilldialog.cpp
+++ b/src/gui/windows/skilldialog.cpp
@@ -617,7 +617,7 @@ SkillInfo* SkillDialog::getSkillByItem(const int itemId) const
return nullptr;
}
-void SkillDialog::widgetResized(const gcn::Event &event)
+void SkillDialog::widgetResized(const Event &event)
{
Window::widgetResized(event);
diff --git a/src/gui/windows/skilldialog.h b/src/gui/windows/skilldialog.h
index 2bedef2b0..3bf64df9b 100644
--- a/src/gui/windows/skilldialog.h
+++ b/src/gui/windows/skilldialog.h
@@ -88,7 +88,7 @@ class SkillDialog final : public Window,
bool hasSkills() const A_WARN_UNUSED
{ return !mSkills.empty(); }
- void widgetResized(const gcn::Event &event) override final;
+ void widgetResized(const Event &event) override final;
void useItem(const int itemId) const;
diff --git a/src/gui/windows/socialwindow.cpp b/src/gui/windows/socialwindow.cpp
index 72590ab60..4df0ab6f1 100644
--- a/src/gui/windows/socialwindow.cpp
+++ b/src/gui/windows/socialwindow.cpp
@@ -1336,7 +1336,7 @@ void SocialWindow::postInit()
place(0, 1, mCountLabel);
place(0, 2, mTabs, 4, 4);
- widgetResized(gcn::Event(nullptr));
+ widgetResized(Event(nullptr));
loadWindowState();
@@ -1863,7 +1863,7 @@ void SocialWindow::updateParty()
}
}
-void SocialWindow::widgetResized(const gcn::Event &event)
+void SocialWindow::widgetResized(const Event &event)
{
Window::widgetResized(event);
if (mTabs)
diff --git a/src/gui/windows/socialwindow.h b/src/gui/windows/socialwindow.h
index 08497c5c8..fc93aed4f 100644
--- a/src/gui/windows/socialwindow.h
+++ b/src/gui/windows/socialwindow.h
@@ -123,7 +123,7 @@ public:
void updatePickupFilter();
- void widgetResized(const gcn::Event &event) override final;
+ void widgetResized(const Event &event) override final;
void setCounter(const SocialTab *const tab, const std::string &str);
diff --git a/src/gui/windows/whoisonline.cpp b/src/gui/windows/whoisonline.cpp
index 0d65eff35..201a5e11e 100644
--- a/src/gui/windows/whoisonline.cpp
+++ b/src/gui/windows/whoisonline.cpp
@@ -133,7 +133,7 @@ void WhoIsOnline::postInit()
download();
- widgetResized(gcn::Event(nullptr));
+ widgetResized(Event(nullptr));
config.addListener("updateOnlineList", this);
config.addListener("groupFriends", this);
mGroupFriends = config.getBoolValue("groupFriends");
@@ -715,7 +715,7 @@ void WhoIsOnline::action(const ActionEvent &event)
}
}
-void WhoIsOnline::widgetResized(const gcn::Event &event)
+void WhoIsOnline::widgetResized(const Event &event)
{
Window::widgetResized(event);
updateSize();
diff --git a/src/gui/windows/whoisonline.h b/src/gui/windows/whoisonline.h
index af0d14f7b..99eeb1911 100644
--- a/src/gui/windows/whoisonline.h
+++ b/src/gui/windows/whoisonline.h
@@ -136,7 +136,7 @@ public:
void action(const ActionEvent &event) override final;
- void widgetResized(const gcn::Event &event) override final;
+ void widgetResized(const Event &event) override final;
const std::set<OnlinePlayer*> &getOnlinePlayers() const A_WARN_UNUSED
{ return mOnlinePlayers; }
diff --git a/src/listeners/deathlistener.h b/src/listeners/deathlistener.h
index ad2eb5364..beefe1746 100644
--- a/src/listeners/deathlistener.h
+++ b/src/listeners/deathlistener.h
@@ -66,7 +66,7 @@
#include <string>
-#include "gui/base/event.hpp"
+#include "events/event.h"
/**
* Interface for listening for death events from widgets.
@@ -90,7 +90,7 @@ class DeathListener
*
* @param event The event of the death.
*/
- virtual void death(const gcn::Event &event) = 0;
+ virtual void death(const Event &event) = 0;
protected:
/**
diff --git a/src/listeners/focuslistener.h b/src/listeners/focuslistener.h
index 1a6dd3fb2..c910f833e 100644
--- a/src/listeners/focuslistener.h
+++ b/src/listeners/focuslistener.h
@@ -66,7 +66,7 @@
#include <string>
-#include "gui/base/event.hpp"
+#include "events/event.h"
#include "localconsts.h"
@@ -91,7 +91,7 @@ class FocusListener
*
* @param event Discribes the event.
*/
- virtual void focusGained(const gcn::Event &event A_UNUSED)
+ virtual void focusGained(const Event &event A_UNUSED)
{ }
/**
@@ -99,7 +99,7 @@ class FocusListener
*
* @param event Discribes the event.
*/
- virtual void focusLost(const gcn::Event &event A_UNUSED)
+ virtual void focusLost(const Event &event A_UNUSED)
{ }
protected:
diff --git a/src/listeners/widgetlistener.h b/src/listeners/widgetlistener.h
index d7d348cd0..16d9e1f15 100644
--- a/src/listeners/widgetlistener.h
+++ b/src/listeners/widgetlistener.h
@@ -66,7 +66,7 @@
#include <string>
-#include "gui/base/event.hpp"
+#include "events/event.h"
#include "localconsts.h"
@@ -94,7 +94,7 @@ class WidgetListener
* @param event Describes the event.
* @since 0.8.0
*/
- virtual void widgetResized(const gcn::Event &event A_UNUSED)
+ virtual void widgetResized(const Event &event A_UNUSED)
{ }
/**
@@ -103,7 +103,7 @@ class WidgetListener
* @param event Describes the event.
* @since 0.8.0
*/
- virtual void widgetMoved(const gcn::Event &event A_UNUSED)
+ virtual void widgetMoved(const Event &event A_UNUSED)
{ }
/**
@@ -113,7 +113,7 @@ class WidgetListener
* @param event Describes the event.
* @since 0.8.0
*/
- virtual void widgetHidden(const gcn::Event &event A_UNUSED)
+ virtual void widgetHidden(const Event &event A_UNUSED)
{ }
/**
@@ -123,7 +123,7 @@ class WidgetListener
* @param event Describes the event.
* @since 0.8.0
*/
- virtual void widgetShown(const gcn::Event &event A_UNUSED)
+ virtual void widgetShown(const Event &event A_UNUSED)
{ }
protected: