summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-02-15 23:58:22 +0300
committerAndrei Karas <akaras@inbox.ru>2014-02-15 23:58:22 +0300
commit768523601ff80a23bf3e821484cc116c62498a38 (patch)
tree45bcf588111d58755b78cfd900db0b8cdfaecdea /src/gui
parent01d93aedcc4d1632ff5915c3989a502ec31cd978 (diff)
downloadmanaplus-768523601ff80a23bf3e821484cc116c62498a38.tar.gz
manaplus-768523601ff80a23bf3e821484cc116c62498a38.tar.bz2
manaplus-768523601ff80a23bf3e821484cc116c62498a38.tar.xz
manaplus-768523601ff80a23bf3e821484cc116c62498a38.zip
move keylistener from base into listeners.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/base/gui.cpp5
-rw-r--r--src/gui/base/gui.hpp2
-rw-r--r--src/gui/base/keylistener.hpp119
-rw-r--r--src/gui/base/widget.cpp6
-rw-r--r--src/gui/base/widget.hpp2
-rw-r--r--src/gui/base/widgets/button.cpp4
-rw-r--r--src/gui/base/widgets/button.hpp2
-rw-r--r--src/gui/base/widgets/checkbox.cpp4
-rw-r--r--src/gui/base/widgets/checkbox.hpp3
-rw-r--r--src/gui/base/widgets/listbox.cpp4
-rw-r--r--src/gui/base/widgets/listbox.hpp5
-rw-r--r--src/gui/base/widgets/radiobutton.cpp4
-rw-r--r--src/gui/base/widgets/radiobutton.hpp3
-rw-r--r--src/gui/base/widgets/slider.cpp4
-rw-r--r--src/gui/base/widgets/slider.hpp3
-rw-r--r--src/gui/base/widgets/textbox.cpp4
-rw-r--r--src/gui/base/widgets/textbox.hpp3
-rw-r--r--src/gui/base/widgets/textfield.cpp4
-rw-r--r--src/gui/base/widgets/textfield.hpp3
-rw-r--r--src/gui/widgets/dropdown.cpp2
-rw-r--r--src/gui/widgets/dropdown.h7
-rw-r--r--src/gui/widgets/guitable.cpp2
-rw-r--r--src/gui/widgets/guitable.h5
-rw-r--r--src/gui/widgets/itemcontainer.cpp2
-rw-r--r--src/gui/widgets/itemcontainer.h7
-rw-r--r--src/gui/widgets/tabbedarea.cpp2
-rw-r--r--src/gui/widgets/tabbedarea.h5
-rw-r--r--src/gui/widgets/tabs/setup_video.cpp2
-rw-r--r--src/gui/widgets/tabs/setup_video.h4
-rw-r--r--src/gui/windows/charcreatedialog.cpp2
-rw-r--r--src/gui/windows/charcreatedialog.h4
-rw-r--r--src/gui/windows/charselectdialog.cpp2
-rw-r--r--src/gui/windows/charselectdialog.h4
-rw-r--r--src/gui/windows/chatwindow.cpp2
-rw-r--r--src/gui/windows/chatwindow.h4
-rw-r--r--src/gui/windows/editserverdialog.cpp2
-rw-r--r--src/gui/windows/editserverdialog.h4
-rw-r--r--src/gui/windows/inventorywindow.cpp2
-rw-r--r--src/gui/windows/inventorywindow.h4
-rw-r--r--src/gui/windows/itemamountwindow.cpp2
-rw-r--r--src/gui/windows/itemamountwindow.h4
-rw-r--r--src/gui/windows/logindialog.cpp2
-rw-r--r--src/gui/windows/logindialog.h4
-rw-r--r--src/gui/windows/quitdialog.cpp2
-rw-r--r--src/gui/windows/quitdialog.h4
-rw-r--r--src/gui/windows/registerdialog.cpp2
-rw-r--r--src/gui/windows/registerdialog.h4
-rw-r--r--src/gui/windows/serverdialog.cpp2
-rw-r--r--src/gui/windows/serverdialog.h7
-rw-r--r--src/gui/windows/updaterwindow.cpp2
-rw-r--r--src/gui/windows/updaterwindow.h4
-rw-r--r--src/gui/windows/worldselectdialog.cpp2
-rw-r--r--src/gui/windows/worldselectdialog.h4
53 files changed, 94 insertions, 203 deletions
diff --git a/src/gui/base/gui.cpp b/src/gui/base/gui.cpp
index 73d6ff380..e85a17d97 100644
--- a/src/gui/base/gui.cpp
+++ b/src/gui/base/gui.cpp
@@ -72,11 +72,12 @@
#include "gui/base/focushandler.hpp"
#include "gui/base/input.hpp"
#include "gui/base/keyinput.hpp"
-#include "gui/base/keylistener.hpp"
#include "gui/base/mouseinput.hpp"
-#include "gui/base/mouselistener.hpp"
#include "gui/base/widget.hpp"
+#include "listeners/keylistener.h"
+#include "gui/base/mouselistener.hpp"
+
#include "render/graphics.h"
#include "debug.h"
diff --git a/src/gui/base/gui.hpp b/src/gui/base/gui.hpp
index 28a231101..b1d13dcd7 100644
--- a/src/gui/base/gui.hpp
+++ b/src/gui/base/gui.hpp
@@ -72,12 +72,12 @@
#include "gui/base/mouseinput.hpp"
class Graphics;
+class KeyListener;
namespace gcn
{
class FocusHandler;
class Input;
- class KeyListener;
class Widget;
// The following comment will appear in the doxygen main page.
diff --git a/src/gui/base/keylistener.hpp b/src/gui/base/keylistener.hpp
deleted file mode 100644
index 088a937a6..000000000
--- a/src/gui/base/keylistener.hpp
+++ /dev/null
@@ -1,119 +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.
- */
-
-#ifndef GCN_KEYLISTENER_HPP
-#define GCN_KEYLISTENER_HPP
-
-#include "gui/base/keyevent.hpp"
-
-#include "localconsts.h"
-
-namespace gcn
-{
- class Key;
-
- /**
- * Interface for listening for key events from widgets.
- *
- * @see Widget::addKeyListener, Widget::removeKeyListener
- */
- class KeyListener
- {
- public:
- /**
- * Destructor.
- */
- virtual ~KeyListener()
- { }
-
- /**
- * Called if a key is pressed when the widget has keyboard focus.
- * If a key is held down the widget will generate multiple key
- * presses.
- *
- * @param keyEvent Discribes the event.
- */
- virtual void keyPressed(KeyEvent& keyEvent A_UNUSED)
- { }
-
- /**
- * Called if a key is released when the widget has keyboard focus.
- *
- * @param keyEvent Discribes the event.
- */
- virtual void keyReleased(KeyEvent& keyEvent A_UNUSED)
- { }
-
- protected:
- /**
- * Constructor.
- *
- * You should not be able to make an instance of KeyListener,
- * therefore its constructor is protected.
- */
- KeyListener()
- { }
- };
-} // namespace gcn
-
-#endif // end GCN_KEYLISTENER_HPP
diff --git a/src/gui/base/widget.cpp b/src/gui/base/widget.cpp
index b9a98ff1c..c72a06e8b 100644
--- a/src/gui/base/widget.cpp
+++ b/src/gui/base/widget.cpp
@@ -74,12 +74,12 @@
#include "gui/base/exception.hpp"
#include "gui/base/focushandler.hpp"
#include "gui/base/keyinput.hpp"
-#include "gui/base/keylistener.hpp"
#include "gui/base/mouseinput.hpp"
-#include "gui/base/mouselistener.hpp"
-#include "gui/base/widgetlistener.hpp"
#include "listeners/deathlistener.h"
+#include "listeners/keylistener.h"
+#include "gui/base/mouselistener.hpp"
+#include "gui/base/widgetlistener.hpp"
#include "render/graphics.h"
diff --git a/src/gui/base/widget.hpp b/src/gui/base/widget.hpp
index a6dc2ed13..583ade076 100644
--- a/src/gui/base/widget.hpp
+++ b/src/gui/base/widget.hpp
@@ -77,6 +77,7 @@ class ActionListener;
class DeathListener;
class FocusListener;
class Graphics;
+class KeyListener;
namespace gcn
{
@@ -84,7 +85,6 @@ namespace gcn
class FocusHandler;
class Font;
class KeyInput;
- class KeyListener;
class MouseInput;
class MouseListener;
class WidgetListener;
diff --git a/src/gui/base/widgets/button.cpp b/src/gui/base/widgets/button.cpp
index 82ff878a0..4631ed80f 100644
--- a/src/gui/base/widgets/button.cpp
+++ b/src/gui/base/widgets/button.cpp
@@ -82,7 +82,7 @@ namespace gcn
Button::Button() :
gcn::Widget(),
gcn::MouseListener(),
- gcn::KeyListener(),
+ KeyListener(),
FocusListener(),
mCaption(),
mHasMouse(false),
@@ -103,7 +103,7 @@ namespace gcn
Button::Button(const std::string& caption) :
gcn::Widget(),
gcn::MouseListener(),
- gcn::KeyListener(),
+ KeyListener(),
FocusListener(),
mCaption(caption),
mHasMouse(false),
diff --git a/src/gui/base/widgets/button.hpp b/src/gui/base/widgets/button.hpp
index e2d6c0c8e..779a75aa5 100644
--- a/src/gui/base/widgets/button.hpp
+++ b/src/gui/base/widgets/button.hpp
@@ -67,7 +67,7 @@
#include <string>
#include "listeners/focuslistener.h"
-#include "gui/base/keylistener.hpp"
+#include "listeners/keylistener.h"
#include "gui/base/mouselistener.hpp"
#include "gui/base/mouseevent.hpp"
diff --git a/src/gui/base/widgets/checkbox.cpp b/src/gui/base/widgets/checkbox.cpp
index 615808a85..ceb59a1eb 100644
--- a/src/gui/base/widgets/checkbox.cpp
+++ b/src/gui/base/widgets/checkbox.cpp
@@ -81,7 +81,7 @@ namespace gcn
CheckBox::CheckBox() :
gcn::Widget(),
gcn::MouseListener(),
- gcn::KeyListener(),
+ KeyListener(),
mSelected(false),
mCaption()
{
@@ -93,7 +93,7 @@ namespace gcn
CheckBox::CheckBox(const std::string &caption, bool selected) :
gcn::Widget(),
gcn::MouseListener(),
- gcn::KeyListener(),
+ KeyListener(),
mSelected(selected),
mCaption()
{
diff --git a/src/gui/base/widgets/checkbox.hpp b/src/gui/base/widgets/checkbox.hpp
index c9b723879..4904a022f 100644
--- a/src/gui/base/widgets/checkbox.hpp
+++ b/src/gui/base/widgets/checkbox.hpp
@@ -66,8 +66,9 @@
#include <string>
-#include "gui/base/keylistener.hpp"
+#include "listeners/keylistener.h"
#include "gui/base/mouselistener.hpp"
+
#include "gui/base/widget.hpp"
namespace gcn
diff --git a/src/gui/base/widgets/listbox.cpp b/src/gui/base/widgets/listbox.cpp
index dcf443c77..771f22f64 100644
--- a/src/gui/base/widgets/listbox.cpp
+++ b/src/gui/base/widgets/listbox.cpp
@@ -83,7 +83,7 @@ namespace gcn
ListBox::ListBox() :
gcn::Widget(),
gcn::MouseListener(),
- gcn::KeyListener(),
+ KeyListener(),
mSelected(-1),
mListModel(nullptr),
mWrappingEnabled(false),
@@ -99,7 +99,7 @@ namespace gcn
ListBox::ListBox(ListModel *listModel) :
gcn::Widget(),
gcn::MouseListener(),
- gcn::KeyListener(),
+ KeyListener(),
mSelected(-1),
mListModel(listModel),
mWrappingEnabled(false),
diff --git a/src/gui/base/widgets/listbox.hpp b/src/gui/base/widgets/listbox.hpp
index f2780f130..11983262f 100644
--- a/src/gui/base/widgets/listbox.hpp
+++ b/src/gui/base/widgets/listbox.hpp
@@ -66,11 +66,12 @@
#include <list>
-#include "gui/base/keylistener.hpp"
#include "gui/base/listmodel.hpp"
-#include "gui/base/mouselistener.hpp"
#include "gui/base/widget.hpp"
+#include "listeners/keylistener.h"
+#include "gui/base/mouselistener.hpp"
+
namespace gcn
{
class SelectionListener;
diff --git a/src/gui/base/widgets/radiobutton.cpp b/src/gui/base/widgets/radiobutton.cpp
index 1e1da2622..f7145fd55 100644
--- a/src/gui/base/widgets/radiobutton.cpp
+++ b/src/gui/base/widgets/radiobutton.cpp
@@ -82,7 +82,7 @@ namespace gcn
RadioButton::RadioButton() :
gcn::Widget(),
gcn::MouseListener(),
- gcn::KeyListener(),
+ KeyListener(),
mSelected(false),
mCaption(),
mGroup()
@@ -99,7 +99,7 @@ namespace gcn
bool selected) :
gcn::Widget(),
gcn::MouseListener(),
- gcn::KeyListener(),
+ KeyListener(),
mSelected(false),
mCaption(),
mGroup()
diff --git a/src/gui/base/widgets/radiobutton.hpp b/src/gui/base/widgets/radiobutton.hpp
index 07e3d656a..98b562676 100644
--- a/src/gui/base/widgets/radiobutton.hpp
+++ b/src/gui/base/widgets/radiobutton.hpp
@@ -67,8 +67,9 @@
#include <map>
#include <string>
-#include "gui/base/keylistener.hpp"
+#include "listeners/keylistener.h"
#include "gui/base/mouselistener.hpp"
+
#include "gui/base/widget.hpp"
namespace gcn
diff --git a/src/gui/base/widgets/slider.cpp b/src/gui/base/widgets/slider.cpp
index e9ab36e86..2a3fb8c24 100644
--- a/src/gui/base/widgets/slider.cpp
+++ b/src/gui/base/widgets/slider.cpp
@@ -79,7 +79,7 @@ namespace gcn
Slider::Slider(const double scaleEnd) :
gcn::Widget(),
gcn::MouseListener(),
- gcn::KeyListener(),
+ KeyListener(),
mDragged(false),
mValue(0),
mStepLength(scaleEnd / 10),
@@ -98,7 +98,7 @@ namespace gcn
Slider::Slider(const double scaleStart, const double scaleEnd) :
gcn::Widget(),
gcn::MouseListener(),
- gcn::KeyListener(),
+ KeyListener(),
mDragged(false),
mValue(scaleStart),
mStepLength((scaleEnd - scaleStart) / 10),
diff --git a/src/gui/base/widgets/slider.hpp b/src/gui/base/widgets/slider.hpp
index 32cdfefb9..fa047a739 100644
--- a/src/gui/base/widgets/slider.hpp
+++ b/src/gui/base/widgets/slider.hpp
@@ -64,8 +64,9 @@
#ifndef GCN_SLIDER_HPP
#define GCN_SLIDER_HPP
-#include "gui/base/keylistener.hpp"
+#include "listeners/keylistener.h"
#include "gui/base/mouselistener.hpp"
+
#include "gui/base/widget.hpp"
namespace gcn
diff --git a/src/gui/base/widgets/textbox.cpp b/src/gui/base/widgets/textbox.cpp
index 411fc7dd5..c146c4f08 100644
--- a/src/gui/base/widgets/textbox.cpp
+++ b/src/gui/base/widgets/textbox.cpp
@@ -81,7 +81,7 @@ namespace gcn
TextBox::TextBox() :
gcn::Widget(),
gcn::MouseListener(),
- gcn::KeyListener(),
+ KeyListener(),
mTextRows(),
mCaretColumn(0),
mCaretRow(0),
@@ -99,7 +99,7 @@ namespace gcn
TextBox::TextBox(const std::string& text) :
gcn::Widget(),
gcn::MouseListener(),
- gcn::KeyListener(),
+ KeyListener(),
mTextRows(),
mCaretColumn(0),
mCaretRow(0),
diff --git a/src/gui/base/widgets/textbox.hpp b/src/gui/base/widgets/textbox.hpp
index 0a540a2c1..894616360 100644
--- a/src/gui/base/widgets/textbox.hpp
+++ b/src/gui/base/widgets/textbox.hpp
@@ -68,8 +68,9 @@
#include <string>
#include <vector>
-#include "gui/base/keylistener.hpp"
+#include "listeners/keylistener.h"
#include "gui/base/mouselistener.hpp"
+
#include "gui/base/widget.hpp"
namespace gcn
diff --git a/src/gui/base/widgets/textfield.cpp b/src/gui/base/widgets/textfield.cpp
index 3349ebccb..178a012b7 100644
--- a/src/gui/base/widgets/textfield.cpp
+++ b/src/gui/base/widgets/textfield.cpp
@@ -80,7 +80,7 @@ namespace gcn
TextField::TextField() :
gcn::Widget(),
gcn::MouseListener(),
- gcn::KeyListener(),
+ KeyListener(),
mText(),
mCaretPosition(0),
mXScroll(0)
@@ -94,7 +94,7 @@ namespace gcn
TextField::TextField(const std::string& text) :
gcn::Widget(),
gcn::MouseListener(),
- gcn::KeyListener(),
+ KeyListener(),
mText(text),
mCaretPosition(0),
mXScroll(0)
diff --git a/src/gui/base/widgets/textfield.hpp b/src/gui/base/widgets/textfield.hpp
index bc227eb55..56d60b7aa 100644
--- a/src/gui/base/widgets/textfield.hpp
+++ b/src/gui/base/widgets/textfield.hpp
@@ -64,8 +64,9 @@
#ifndef GCN_TEXTFIELD_HPP
#define GCN_TEXTFIELD_HPP
-#include "gui/base/keylistener.hpp"
+#include "listeners/keylistener.h"
#include "gui/base/mouselistener.hpp"
+
#include "gui/base/widget.hpp"
#include <string>
diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp
index 0e9241f21..e4e38aa90 100644
--- a/src/gui/widgets/dropdown.cpp
+++ b/src/gui/widgets/dropdown.cpp
@@ -58,7 +58,7 @@ DropDown::DropDown(const Widget2 *const widget,
const std::string &eventId):
ActionListener(),
gcn::BasicContainer(),
- gcn::KeyListener(),
+ KeyListener(),
gcn::MouseListener(),
FocusListener(),
gcn::SelectionListener(),
diff --git a/src/gui/widgets/dropdown.h b/src/gui/widgets/dropdown.h
index ca0743ae7..525ce83e3 100644
--- a/src/gui/widgets/dropdown.h
+++ b/src/gui/widgets/dropdown.h
@@ -28,13 +28,12 @@
#include "gui/base/basiccontainer.hpp"
#include "gui/base/listmodel.hpp"
+#include "listeners/actionlistener.h"
#include "listeners/focuslistener.h"
-#include "gui/base/keylistener.hpp"
+#include "listeners/keylistener.h"
#include "gui/base/mouselistener.hpp"
#include "gui/base/selectionlistener.hpp"
-#include "listeners/actionlistener.h"
-
#include "localconsts.h"
class Image;
@@ -53,7 +52,7 @@ class Skin;
*/
class DropDown final : public ActionListener,
public gcn::BasicContainer,
- public gcn::KeyListener,
+ public KeyListener,
public gcn::MouseListener,
public FocusListener,
public gcn::SelectionListener,
diff --git a/src/gui/widgets/guitable.cpp b/src/gui/widgets/guitable.cpp
index e2af7f16d..fff2416bf 100644
--- a/src/gui/widgets/guitable.cpp
+++ b/src/gui/widgets/guitable.cpp
@@ -97,7 +97,7 @@ GuiTable::GuiTable(const Widget2 *const widget,
gcn::Widget(),
Widget2(widget),
gcn::MouseListener(),
- gcn::KeyListener(),
+ KeyListener(),
mModel(nullptr),
mTopWidget(nullptr),
mActionListeners(),
diff --git a/src/gui/widgets/guitable.h b/src/gui/widgets/guitable.h
index 2154d0889..8d551de2b 100644
--- a/src/gui/widgets/guitable.h
+++ b/src/gui/widgets/guitable.h
@@ -28,8 +28,9 @@
#include "gui/widgets/tablemodel.h"
#include "gui/widgets/widget2.h"
-#include "gui/base/keylistener.hpp"
+#include "listeners/keylistener.h"
#include "gui/base/mouselistener.hpp"
+
#include "gui/base/widget.hpp"
#include <vector>
@@ -48,7 +49,7 @@ class GuiTableActionListener;
class GuiTable final : public gcn::Widget,
public Widget2,
public gcn::MouseListener,
- public gcn::KeyListener,
+ public KeyListener,
public TableModelListener
{
// so that the action listener can call distributeActionEvent
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index 0913dcae3..4fa8a2705 100644
--- a/src/gui/widgets/itemcontainer.cpp
+++ b/src/gui/widgets/itemcontainer.cpp
@@ -160,7 +160,7 @@ ItemContainer::ItemContainer(const Widget2 *const widget,
const bool forceQuantity) :
gcn::Widget(),
Widget2(widget),
- gcn::KeyListener(),
+ KeyListener(),
gcn::MouseListener(),
gcn::WidgetListener(),
mInventory(inventory),
diff --git a/src/gui/widgets/itemcontainer.h b/src/gui/widgets/itemcontainer.h
index cfacb05c6..7757fa65c 100644
--- a/src/gui/widgets/itemcontainer.h
+++ b/src/gui/widgets/itemcontainer.h
@@ -25,11 +25,12 @@
#include "gui/widgets/widget2.h"
-#include "gui/base/keylistener.hpp"
+#include "listeners/keylistener.h"
#include "gui/base/mouselistener.hpp"
-#include "gui/base/widget.hpp"
#include "gui/base/widgetlistener.hpp"
+#include "gui/base/widget.hpp"
+
#include <list>
#include "localconsts.h"
@@ -51,7 +52,7 @@ namespace gcn
*/
class ItemContainer final : public gcn::Widget,
public Widget2,
- public gcn::KeyListener,
+ public KeyListener,
public gcn::MouseListener,
public gcn::WidgetListener
{
diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp
index d659cd6b6..8841560e2 100644
--- a/src/gui/widgets/tabbedarea.cpp
+++ b/src/gui/widgets/tabbedarea.cpp
@@ -37,7 +37,7 @@ TabbedArea::TabbedArea(const Widget2 *const widget) :
Widget2(widget),
ActionListener(),
gcn::BasicContainer(),
- gcn::KeyListener(),
+ KeyListener(),
gcn::MouseListener(),
gcn::WidgetListener(),
mSelectedTab(nullptr),
diff --git a/src/gui/widgets/tabbedarea.h b/src/gui/widgets/tabbedarea.h
index af7fe5429..03a9f6868 100644
--- a/src/gui/widgets/tabbedarea.h
+++ b/src/gui/widgets/tabbedarea.h
@@ -25,9 +25,10 @@
#include "gui/widgets/widget2.h"
-#include "gui/base/keylistener.hpp"
+#include "listeners/keylistener.h"
#include "gui/base/mouselistener.hpp"
#include "gui/base/widgetlistener.hpp"
+
#include "gui/base/widgets/container.hpp"
#include "listeners/actionlistener.h"
@@ -42,7 +43,7 @@ class Tab;
class TabbedArea final : public Widget2,
public ActionListener,
public gcn::BasicContainer,
- public gcn::KeyListener,
+ public KeyListener,
public gcn::MouseListener,
public gcn::WidgetListener
{
diff --git a/src/gui/widgets/tabs/setup_video.cpp b/src/gui/widgets/tabs/setup_video.cpp
index f35f75413..ffadc5d03 100644
--- a/src/gui/widgets/tabs/setup_video.cpp
+++ b/src/gui/widgets/tabs/setup_video.cpp
@@ -178,7 +178,7 @@ public:
Setup_Video::Setup_Video(const Widget2 *const widget) :
SetupTab(widget),
- gcn::KeyListener(),
+ KeyListener(),
mFullScreenEnabled(config.getBoolValue("screen")),
mOpenGLEnabled(intToRenderType(config.getIntValue("opengl"))),
mFps(config.getIntValue("fpslimit")),
diff --git a/src/gui/widgets/tabs/setup_video.h b/src/gui/widgets/tabs/setup_video.h
index 25ecfabd6..facbcbce3 100644
--- a/src/gui/widgets/tabs/setup_video.h
+++ b/src/gui/widgets/tabs/setup_video.h
@@ -25,7 +25,7 @@
#include "gui/widgets/tabs/setuptab.h"
-#include "gui/base/keylistener.hpp"
+#include "listeners/keylistener.h"
class Button;
class CheckBox;
@@ -37,7 +37,7 @@ class OpenGLListModel;
class Slider;
class TextDialog;
-class Setup_Video final : public SetupTab, public gcn::KeyListener
+class Setup_Video final : public SetupTab, public KeyListener
{
public:
explicit Setup_Video(const Widget2 *const widget);
diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp
index e581cc2c9..4595709ca 100644
--- a/src/gui/windows/charcreatedialog.cpp
+++ b/src/gui/windows/charcreatedialog.cpp
@@ -64,7 +64,7 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent,
// TRANSLATORS: char create dialog name
Window(_("New Character"), true, parent, "charcreate.xml"),
ActionListener(),
- gcn::KeyListener(),
+ KeyListener(),
mCharSelectDialog(parent),
mNameField(new TextField(this, "")),
// TRANSLATORS: char create dialog label
diff --git a/src/gui/windows/charcreatedialog.h b/src/gui/windows/charcreatedialog.h
index 89e3c832a..c0e8e2928 100644
--- a/src/gui/windows/charcreatedialog.h
+++ b/src/gui/windows/charcreatedialog.h
@@ -28,7 +28,7 @@
#include "gui/windows/charselectdialog.h"
#include "listeners/actionlistener.h"
-#include "gui/base/keylistener.hpp"
+#include "listeners/keylistener.h"
class Label;
class PlayerBox;
@@ -43,7 +43,7 @@ class TextField;
*/
class CharCreateDialog final : public Window,
public ActionListener,
- public gcn::KeyListener
+ public KeyListener
{
public:
/**
diff --git a/src/gui/windows/charselectdialog.cpp b/src/gui/windows/charselectdialog.cpp
index 37e93938c..f5b522971 100644
--- a/src/gui/windows/charselectdialog.cpp
+++ b/src/gui/windows/charselectdialog.cpp
@@ -89,7 +89,7 @@ CharSelectDialog::CharSelectDialog(LoginData *const data):
data->username.c_str(), data->lastLogin.c_str()),
false, nullptr, "char.xml"),
ActionListener(),
- gcn::KeyListener(),
+ KeyListener(),
mLoginData(data),
// TRANSLATORS: char select dialog. button.
mSwitchLoginButton(new Button(this, _("Switch Login"), "switch", this)),
diff --git a/src/gui/windows/charselectdialog.h b/src/gui/windows/charselectdialog.h
index 66b2f933e..9f0e4d126 100644
--- a/src/gui/windows/charselectdialog.h
+++ b/src/gui/windows/charselectdialog.h
@@ -30,7 +30,7 @@
#include "net/charserverhandler.h"
#include "listeners/actionlistener.h"
-#include "gui/base/keylistener.hpp"
+#include "listeners/keylistener.h"
class Button;
class CharacterDisplay;
@@ -46,7 +46,7 @@ class TextDialog;
*/
class CharSelectDialog final : public Window,
public ActionListener,
- public gcn::KeyListener
+ public KeyListener
{
public:
friend class CharDeleteConfirm;
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp
index 12ef73516..e62f797e3 100644
--- a/src/gui/windows/chatwindow.cpp
+++ b/src/gui/windows/chatwindow.cpp
@@ -203,7 +203,7 @@ ChatWindow::ChatWindow():
// TRANSLATORS: chat window name
Window(_("Chat"), false, nullptr, "chat.xml"),
ActionListener(),
- gcn::KeyListener(),
+ KeyListener(),
mItemLinkHandler(new ItemLinkHandler),
mChatTabs(new TabbedArea(this)),
mChatInput(new ChatInput(this)),
diff --git a/src/gui/windows/chatwindow.h b/src/gui/windows/chatwindow.h
index 6e4415728..cb7671058 100644
--- a/src/gui/windows/chatwindow.h
+++ b/src/gui/windows/chatwindow.h
@@ -30,7 +30,7 @@
#include "gui/widgets/window.h"
#include "listeners/actionlistener.h"
-#include "gui/base/keylistener.hpp"
+#include "listeners/keylistener.h"
#include <list>
#include <map>
@@ -84,7 +84,7 @@ struct CHATLOG final
*/
class ChatWindow final : public Window,
public ActionListener,
- public gcn::KeyListener,
+ public KeyListener,
public DepricatedListener,
public ConfigListener
{
diff --git a/src/gui/windows/editserverdialog.cpp b/src/gui/windows/editserverdialog.cpp
index 0b065bb0c..ee375a86e 100644
--- a/src/gui/windows/editserverdialog.cpp
+++ b/src/gui/windows/editserverdialog.cpp
@@ -64,7 +64,7 @@ EditServerDialog::EditServerDialog(ServerDialog *const parent,
// TRANSLATORS: edit server dialog name
Window(_("Edit Server"), true, parent),
ActionListener(),
- gcn::KeyListener(),
+ KeyListener(),
mServerAddressField(new TextField(this, std::string())),
mPortField(new TextField(this, std::string())),
mNameField(new TextField(this, std::string())),
diff --git a/src/gui/windows/editserverdialog.h b/src/gui/windows/editserverdialog.h
index 5ef780ef0..bf36c216f 100644
--- a/src/gui/windows/editserverdialog.h
+++ b/src/gui/windows/editserverdialog.h
@@ -32,7 +32,7 @@ class ServerDialog;
#include "net/serverinfo.h"
#include "listeners/actionlistener.h"
-#include "gui/base/keylistener.hpp"
+#include "listeners/keylistener.h"
#include "gui/base/listmodel.hpp"
@@ -77,7 +77,7 @@ class TypeListModel : public gcn::ListModel
*/
class EditServerDialog final : public Window,
public ActionListener,
- public gcn::KeyListener
+ public KeyListener
{
public:
EditServerDialog(ServerDialog *const parent, ServerInfo server,
diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp
index 25f1a0110..9e2c1a6ff 100644
--- a/src/gui/windows/inventorywindow.cpp
+++ b/src/gui/windows/inventorywindow.cpp
@@ -102,7 +102,7 @@ InventoryWindow::WindowList InventoryWindow::invInstances;
InventoryWindow::InventoryWindow(Inventory *const inventory):
Window("Inventory", false, nullptr, "inventory.xml"),
ActionListener(),
- gcn::KeyListener(),
+ KeyListener(),
gcn::SelectionListener(),
InventoryListener(),
mInventory(inventory),
diff --git a/src/gui/windows/inventorywindow.h b/src/gui/windows/inventorywindow.h
index 0ff314fb8..066d0d6d5 100644
--- a/src/gui/windows/inventorywindow.h
+++ b/src/gui/windows/inventorywindow.h
@@ -30,7 +30,7 @@
#include "gui/widgets/window.h"
#include "listeners/actionlistener.h"
-#include "gui/base/keylistener.hpp"
+#include "listeners/keylistener.h"
#include "gui/base/selectionlistener.hpp"
class Button;
@@ -52,7 +52,7 @@ class TextPopup;
*/
class InventoryWindow final : public Window,
public ActionListener,
- public gcn::KeyListener,
+ public KeyListener,
public gcn::SelectionListener,
public InventoryListener,
public DepricatedListener
diff --git a/src/gui/windows/itemamountwindow.cpp b/src/gui/windows/itemamountwindow.cpp
index d35854375..4dd220093 100644
--- a/src/gui/windows/itemamountwindow.cpp
+++ b/src/gui/windows/itemamountwindow.cpp
@@ -139,7 +139,7 @@ ItemAmountWindow::ItemAmountWindow(const Usage usage, Window *const parent,
Item *const item, const int maxRange) :
Window("", false, parent, "amount.xml"),
ActionListener(),
- gcn::KeyListener(),
+ KeyListener(),
mItemAmountTextField(new IntTextField(this, 1)),
mItemPriceTextField(nullptr),
mGPLabel(nullptr),
diff --git a/src/gui/windows/itemamountwindow.h b/src/gui/windows/itemamountwindow.h
index 760555c6c..ac2eae8e1 100644
--- a/src/gui/windows/itemamountwindow.h
+++ b/src/gui/windows/itemamountwindow.h
@@ -25,8 +25,8 @@
#include "gui/widgets/window.h"
-#include "gui/base/keylistener.hpp"
#include "listeners/actionlistener.h"
+#include "listeners/keylistener.h"
class DropDown;
class Icon;
@@ -44,7 +44,7 @@ class Slider;
*/
class ItemAmountWindow final : public Window,
public ActionListener,
- public gcn::KeyListener
+ public KeyListener
{
public:
enum Usage
diff --git a/src/gui/windows/logindialog.cpp b/src/gui/windows/logindialog.cpp
index cc8d02471..609b58b57 100644
--- a/src/gui/windows/logindialog.cpp
+++ b/src/gui/windows/logindialog.cpp
@@ -144,7 +144,7 @@ LoginDialog::LoginDialog(LoginData *const data, std::string serverName,
// TRANSLATORS: login dialog name
Window(_("Login"), false, nullptr, "login.xml"),
ActionListener(),
- gcn::KeyListener(),
+ KeyListener(),
mLoginData(data),
mUserField(new TextField(this, mLoginData->username)),
mPassField(new PasswordField(this, mLoginData->password)),
diff --git a/src/gui/windows/logindialog.h b/src/gui/windows/logindialog.h
index 77fb75dd5..70b16f537 100644
--- a/src/gui/windows/logindialog.h
+++ b/src/gui/windows/logindialog.h
@@ -26,7 +26,7 @@
#include "gui/widgets/window.h"
#include "listeners/actionlistener.h"
-#include "gui/base/keylistener.hpp"
+#include "listeners/keylistener.h"
#include <string>
@@ -46,7 +46,7 @@ class UpdateTypeModel;
*/
class LoginDialog final : public Window,
public ActionListener,
- public gcn::KeyListener
+ public KeyListener
{
public:
/**
diff --git a/src/gui/windows/quitdialog.cpp b/src/gui/windows/quitdialog.cpp
index 375ab415e..99890472b 100644
--- a/src/gui/windows/quitdialog.cpp
+++ b/src/gui/windows/quitdialog.cpp
@@ -50,7 +50,7 @@ QuitDialog::QuitDialog(QuitDialog **const pointerToMe):
// TRANSLATORS: quit dialog name
Window(_("Quit"), true, nullptr, "quit.xml"),
ActionListener(),
- gcn::KeyListener(),
+ KeyListener(),
mOptions(),
// TRANSLATORS: quit dialog button
mLogoutQuit(new RadioButton(this, _("Quit"), "quitdialog")),
diff --git a/src/gui/windows/quitdialog.h b/src/gui/windows/quitdialog.h
index d99ab72d8..0b81992f1 100644
--- a/src/gui/windows/quitdialog.h
+++ b/src/gui/windows/quitdialog.h
@@ -26,7 +26,7 @@
#include "gui/widgets/window.h"
#include "listeners/actionlistener.h"
-#include "gui/base/keylistener.hpp"
+#include "listeners/keylistener.h"
#include <vector>
@@ -40,7 +40,7 @@ class RadioButton;
*/
class QuitDialog final : public Window,
public ActionListener,
- public gcn::KeyListener
+ public KeyListener
{
public:
/**
diff --git a/src/gui/windows/registerdialog.cpp b/src/gui/windows/registerdialog.cpp
index 66a5ad187..fd5ab8f5a 100644
--- a/src/gui/windows/registerdialog.cpp
+++ b/src/gui/windows/registerdialog.cpp
@@ -64,7 +64,7 @@ RegisterDialog::RegisterDialog(LoginData *const data) :
// TRANSLATORS: register dialog name
Window(_("Register"), false, nullptr, "register.xml"),
ActionListener(),
- gcn::KeyListener(),
+ KeyListener(),
mLoginData(data),
mUserField(new TextField(this, mLoginData->username)),
mPasswordField(new PasswordField(this, mLoginData->password)),
diff --git a/src/gui/windows/registerdialog.h b/src/gui/windows/registerdialog.h
index fea74e776..93908c27c 100644
--- a/src/gui/windows/registerdialog.h
+++ b/src/gui/windows/registerdialog.h
@@ -26,7 +26,7 @@
#include "gui/widgets/window.h"
#include "listeners/actionlistener.h"
-#include "gui/base/keylistener.hpp"
+#include "listeners/keylistener.h"
class Button;
class LoginData;
@@ -59,7 +59,7 @@ class WrongDataNoticeListener final : public ActionListener
*/
class RegisterDialog final : public Window,
public ActionListener,
- public gcn::KeyListener
+ public KeyListener
{
public:
/**
diff --git a/src/gui/windows/serverdialog.cpp b/src/gui/windows/serverdialog.cpp
index 1a02f95c6..a307b043e 100644
--- a/src/gui/windows/serverdialog.cpp
+++ b/src/gui/windows/serverdialog.cpp
@@ -245,7 +245,7 @@ ServerDialog::ServerDialog(ServerInfo *const serverInfo,
// TRANSLATORS: servers dialog name
Window(_("Choose Your Server"), false, nullptr, "server.xml"),
ActionListener(),
- gcn::KeyListener(),
+ KeyListener(),
gcn::SelectionListener(),
mMutex(),
mDescription(new Label(this, std::string())),
diff --git a/src/gui/windows/serverdialog.h b/src/gui/windows/serverdialog.h
index 3ea3b23a4..afcdf1643 100644
--- a/src/gui/windows/serverdialog.h
+++ b/src/gui/windows/serverdialog.h
@@ -32,10 +32,11 @@
#include "utils/mutex.h"
#include "listeners/actionlistener.h"
-#include "gui/base/keylistener.hpp"
-#include "gui/base/listmodel.hpp"
+#include "listeners/keylistener.h"
#include "gui/base/selectionlistener.hpp"
+#include "gui/base/listmodel.hpp"
+
#include <string>
#include <vector>
@@ -92,7 +93,7 @@ class ServersListModel final : public gcn::ListModel
*/
class ServerDialog final : public Window,
public ActionListener,
- public gcn::KeyListener,
+ public KeyListener,
public gcn::SelectionListener
{
public:
diff --git a/src/gui/windows/updaterwindow.cpp b/src/gui/windows/updaterwindow.cpp
index 2e3294508..b5339a202 100644
--- a/src/gui/windows/updaterwindow.cpp
+++ b/src/gui/windows/updaterwindow.cpp
@@ -157,7 +157,7 @@ UpdaterWindow::UpdaterWindow(const std::string &restrict updateHost,
// TRANSLATORS: updater window name
Window(_("Updating..."), false, nullptr, "update.xml"),
ActionListener(),
- gcn::KeyListener(),
+ KeyListener(),
mDownloadStatus(UPDATE_NEWS),
mUpdateHost(updateHost),
mUpdatesDir(updatesDir),
diff --git a/src/gui/windows/updaterwindow.h b/src/gui/windows/updaterwindow.h
index affb7edda..d20f2aadc 100644
--- a/src/gui/windows/updaterwindow.h
+++ b/src/gui/windows/updaterwindow.h
@@ -31,7 +31,7 @@
#include "utils/mutex.h"
#include "listeners/actionlistener.h"
-#include "gui/base/keylistener.hpp"
+#include "listeners/keylistener.h"
#include <string>
#include <vector>
@@ -71,7 +71,7 @@ struct UpdateFile final
class UpdaterWindow final : public Window,
public ActionListener,
public LinkHandler,
- public gcn::KeyListener
+ public KeyListener
{
public:
/**
diff --git a/src/gui/windows/worldselectdialog.cpp b/src/gui/windows/worldselectdialog.cpp
index 7372345ef..48be8df8a 100644
--- a/src/gui/windows/worldselectdialog.cpp
+++ b/src/gui/windows/worldselectdialog.cpp
@@ -83,7 +83,7 @@ WorldSelectDialog::WorldSelectDialog(Worlds worlds):
// TRANSLATORS: world select dialog name
Window(_("Select World"), false, nullptr, "world.xml"),
ActionListener(),
- gcn::KeyListener(),
+ KeyListener(),
mWorldListModel(new WorldListModel(worlds)),
mWorldList(new ListBox(this, mWorldListModel, "")),
// TRANSLATORS: world dialog button
diff --git a/src/gui/windows/worldselectdialog.h b/src/gui/windows/worldselectdialog.h
index 9fe42cf13..5542d2360 100644
--- a/src/gui/windows/worldselectdialog.h
+++ b/src/gui/windows/worldselectdialog.h
@@ -28,7 +28,7 @@
#include "net/worldinfo.h"
#include "listeners/actionlistener.h"
-#include "gui/base/keylistener.hpp"
+#include "listeners/keylistener.h"
class Button;
class ListBox;
@@ -41,7 +41,7 @@ class WorldListModel;
*/
class WorldSelectDialog final : public Window,
public ActionListener,
- public gcn::KeyListener
+ public KeyListener
{
public:
/**