From 3ae82048ca8636ce03e71bdd4c11f60594cfc698 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 16 Feb 2014 12:47:15 +0300 Subject: move event into events directory. --- src/gui/base/event.cpp | 87 ---------------------- src/gui/base/event.hpp | 113 ----------------------------- src/gui/base/focushandler.hpp | 2 +- src/gui/base/inputevent.hpp | 2 +- src/gui/base/selectionevent.hpp | 2 +- src/gui/base/widget.cpp | 2 +- src/gui/focushandler.cpp | 2 +- src/gui/focushandler.h | 2 +- src/gui/gui.cpp | 2 +- src/gui/gui.h | 2 +- src/gui/widgets/button.cpp | 4 +- src/gui/widgets/button.h | 4 +- src/gui/widgets/characterdisplay.cpp | 2 +- src/gui/widgets/characterdisplay.h | 2 +- src/gui/widgets/desktop.cpp | 2 +- src/gui/widgets/desktop.h | 2 +- src/gui/widgets/dropshortcutcontainer.cpp | 2 +- src/gui/widgets/dropshortcutcontainer.h | 2 +- src/gui/widgets/emotepage.cpp | 4 +- src/gui/widgets/emotepage.h | 4 +- src/gui/widgets/emoteshortcutcontainer.cpp | 2 +- src/gui/widgets/emoteshortcutcontainer.h | 2 +- src/gui/widgets/flowcontainer.cpp | 4 +- src/gui/widgets/flowcontainer.h | 2 +- src/gui/widgets/horizontcontainer.cpp | 2 +- src/gui/widgets/horizontcontainer.h | 2 +- src/gui/widgets/itemcontainer.cpp | 2 +- src/gui/widgets/itemcontainer.h | 2 +- src/gui/widgets/itemshortcutcontainer.cpp | 2 +- src/gui/widgets/itemshortcutcontainer.h | 2 +- src/gui/widgets/layouthelper.cpp | 2 +- src/gui/widgets/layouthelper.h | 2 +- src/gui/widgets/popup.cpp | 4 +- src/gui/widgets/popup.h | 4 +- src/gui/widgets/popuplist.cpp | 6 +- src/gui/widgets/popuplist.h | 6 +- src/gui/widgets/progressbar.cpp | 4 +- src/gui/widgets/progressbar.h | 4 +- src/gui/widgets/scrollarea.cpp | 4 +- src/gui/widgets/scrollarea.h | 4 +- src/gui/widgets/shortcutcontainer.cpp | 4 +- src/gui/widgets/shortcutcontainer.h | 4 +- src/gui/widgets/spellshortcutcontainer.cpp | 2 +- src/gui/widgets/spellshortcutcontainer.h | 2 +- src/gui/widgets/tabbedarea.cpp | 8 +- src/gui/widgets/tabbedarea.h | 4 +- src/gui/widgets/tabs/setuptabscroll.cpp | 2 +- src/gui/widgets/tabs/setuptabscroll.h | 2 +- src/gui/widgets/tabs/tab.cpp | 4 +- src/gui/widgets/tabs/tab.h | 4 +- src/gui/widgets/textfield.cpp | 4 +- src/gui/widgets/textfield.h | 4 +- src/gui/widgets/vertcontainer.cpp | 2 +- src/gui/widgets/vertcontainer.h | 2 +- src/gui/widgets/widgetgroup.cpp | 2 +- src/gui/widgets/widgetgroup.h | 2 +- src/gui/widgets/window.cpp | 8 +- src/gui/widgets/window.h | 6 +- src/gui/windows/charselectdialog.cpp | 2 +- src/gui/windows/charselectdialog.h | 2 +- src/gui/windows/chatwindow.cpp | 4 +- src/gui/windows/chatwindow.h | 2 +- src/gui/windows/debugwindow.cpp | 2 +- src/gui/windows/debugwindow.h | 2 +- src/gui/windows/didyouknowwindow.cpp | 2 +- src/gui/windows/emotewindow.cpp | 4 +- src/gui/windows/emotewindow.h | 4 +- src/gui/windows/helpwindow.cpp | 2 +- src/gui/windows/inventorywindow.cpp | 6 +- src/gui/windows/inventorywindow.h | 4 +- src/gui/windows/setupwindow.cpp | 4 +- src/gui/windows/setupwindow.h | 2 +- src/gui/windows/shortcutwindow.cpp | 4 +- src/gui/windows/shortcutwindow.h | 4 +- src/gui/windows/skilldialog.cpp | 2 +- src/gui/windows/skilldialog.h | 2 +- src/gui/windows/socialwindow.cpp | 4 +- src/gui/windows/socialwindow.h | 2 +- src/gui/windows/whoisonline.cpp | 4 +- src/gui/windows/whoisonline.h | 2 +- 80 files changed, 119 insertions(+), 319 deletions(-) delete mode 100644 src/gui/base/event.cpp delete mode 100644 src/gui/base/event.hpp (limited to 'src/gui') 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 . - */ - -/* _______ __ __ __ ______ __ __ _______ __ __ - * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ - * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / - * / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / / - * / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / / - * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / - * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ - * - * 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/event.hpp b/src/gui/base/event.hpp deleted file mode 100644 index 2a1f4ca4b..000000000 --- a/src/gui/base/event.hpp +++ /dev/null @@ -1,113 +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 . - */ - -/* _______ __ __ __ ______ __ __ _______ __ __ - * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ - * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / - * / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / / - * / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / / - * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / - * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ - * - * 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. - */ - -#ifndef GCN_EVENT_HPP -#define GCN_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 - { - public: - /** - * Constructor. - * - * @param source The source widget of the event. - */ - explicit Event(Widget *const source); - - A_DELETE_COPY(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; - - protected: - /** - * Holds the source widget of the event. - */ - Widget* mSource; - }; -} // namespace gcn - -#endif // end GCN_EVENT_HPP 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 -#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(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::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 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 &getOnlinePlayers() const A_WARN_UNUSED { return mOnlinePlayers; } -- cgit v1.2.3-70-g09d2