summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-10-19 15:15:19 +0300
committerAndrei Karas <akaras@inbox.ru>2012-10-19 16:39:56 +0300
commit10badd2c0e099c7611f6d23b3973e54f210bc172 (patch)
tree3689c22c252c2fed2f7e3d4cbd57d330fc2bf839 /src/gui
parent876e370925a021bb6731703c3db2db2945f62f85 (diff)
downloadmv-10badd2c0e099c7611f6d23b3973e54f210bc172.tar.gz
mv-10badd2c0e099c7611f6d23b3973e54f210bc172.tar.bz2
mv-10badd2c0e099c7611f6d23b3973e54f210bc172.tar.xz
mv-10badd2c0e099c7611f6d23b3973e54f210bc172.zip
Fix namespace conflicts.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/botcheckerwindow.cpp4
-rw-r--r--src/gui/buydialog.cpp12
-rw-r--r--src/gui/buydialog.h12
-rw-r--r--src/gui/buyselldialog.cpp4
-rw-r--r--src/gui/changeemaildialog.cpp2
-rw-r--r--src/gui/changeemaildialog.h10
-rw-r--r--src/gui/changepassworddialog.cpp2
-rw-r--r--src/gui/changepassworddialog.h12
-rw-r--r--src/gui/charcreatedialog.cpp4
-rw-r--r--src/gui/charcreatedialog.h8
-rw-r--r--src/gui/charselectdialog.cpp4
-rw-r--r--src/gui/chatwindow.cpp6
-rw-r--r--src/gui/confirmdialog.cpp2
-rw-r--r--src/gui/connectiondialog.cpp2
-rw-r--r--src/gui/didyouknowwindow.cpp2
-rw-r--r--src/gui/didyouknowwindow.h8
-rw-r--r--src/gui/editdialog.cpp2
-rw-r--r--src/gui/editserverdialog.cpp4
-rw-r--r--src/gui/editserverdialog.h1
-rw-r--r--src/gui/equipmentwindow.cpp2
-rw-r--r--src/gui/gui.cpp1
-rw-r--r--src/gui/helpwindow.cpp2
-rw-r--r--src/gui/helpwindow.h8
-rw-r--r--src/gui/inventorywindow.cpp6
-rw-r--r--src/gui/inventorywindow.h8
-rw-r--r--src/gui/itemamountwindow.cpp4
-rw-r--r--src/gui/itemamountwindow.h10
-rw-r--r--src/gui/itempopup.cpp3
-rw-r--r--src/gui/itempopup.h10
-rw-r--r--src/gui/killstats.cpp3
-rw-r--r--src/gui/killstats.h5
-rw-r--r--src/gui/logindialog.cpp4
-rw-r--r--src/gui/logindialog.h12
-rw-r--r--src/gui/npcdialog.cpp2
-rw-r--r--src/gui/npcdialog.h14
-rw-r--r--src/gui/npcpostdialog.cpp2
-rw-r--r--src/gui/okdialog.cpp2
-rw-r--r--src/gui/outfitwindow.cpp2
-rw-r--r--src/gui/popupmenu.cpp2
-rw-r--r--src/gui/questswindow.cpp2
-rw-r--r--src/gui/quitdialog.cpp4
-rw-r--r--src/gui/registerdialog.cpp8
-rw-r--r--src/gui/registerdialog.h18
-rw-r--r--src/gui/sdlinput.h1
-rw-r--r--src/gui/selldialog.cpp10
-rw-r--r--src/gui/selldialog.h12
-rw-r--r--src/gui/serverdialog.cpp6
-rw-r--r--src/gui/setup.cpp2
-rw-r--r--src/gui/setup_colors.cpp4
-rw-r--r--src/gui/setup_colors.h24
-rw-r--r--src/gui/setup_input.cpp2
-rw-r--r--src/gui/setup_relations.h4
-rw-r--r--src/gui/setup_video.cpp4
-rw-r--r--src/gui/setup_video.h10
-rw-r--r--src/gui/shopwindow.cpp4
-rw-r--r--src/gui/shopwindow.h11
-rw-r--r--src/gui/skilldialog.cpp2
-rw-r--r--src/gui/socialwindow.cpp8
-rw-r--r--src/gui/statuspopup.cpp1
-rw-r--r--src/gui/statuspopup.h5
-rw-r--r--src/gui/statuswindow.cpp4
-rw-r--r--src/gui/textcommandeditor.cpp2
-rw-r--r--src/gui/textdialog.cpp2
-rw-r--r--src/gui/tradewindow.cpp8
-rw-r--r--src/gui/tradewindow.h8
-rw-r--r--src/gui/unregisterdialog.cpp2
-rw-r--r--src/gui/unregisterdialog.h8
-rw-r--r--src/gui/updaterwindow.cpp4
-rw-r--r--src/gui/viewport.cpp2
-rw-r--r--src/gui/widgets/avatarlistbox.cpp2
-rw-r--r--src/gui/widgets/browserbox.cpp2
-rw-r--r--src/gui/widgets/button.cpp8
-rw-r--r--src/gui/widgets/desktop.cpp2
-rw-r--r--src/gui/widgets/extendednamesmodel.cpp1
-rw-r--r--src/gui/widgets/flowcontainer.cpp2
-rw-r--r--src/gui/widgets/flowcontainer.h2
-rw-r--r--src/gui/widgets/guitable.cpp2
-rw-r--r--src/gui/widgets/horizontcontainer.cpp2
-rw-r--r--src/gui/widgets/icon.cpp4
-rw-r--r--src/gui/widgets/itemcontainer.cpp11
-rw-r--r--src/gui/widgets/layouthelper.cpp2
-rw-r--r--src/gui/widgets/popup.cpp4
-rw-r--r--src/gui/widgets/progressbar.cpp2
-rw-r--r--src/gui/widgets/progressindicator.cpp2
-rw-r--r--src/gui/widgets/setupitem.cpp4
-rw-r--r--src/gui/widgets/tab.cpp4
-rw-r--r--src/gui/widgets/tab.h3
-rw-r--r--src/gui/widgets/tabbedarea.cpp6
88 files changed, 171 insertions, 279 deletions
diff --git a/src/gui/botcheckerwindow.cpp b/src/gui/botcheckerwindow.cpp
index eb7020189..91245eb5d 100644
--- a/src/gui/botcheckerwindow.cpp
+++ b/src/gui/botcheckerwindow.cpp
@@ -266,7 +266,7 @@ protected:
BotCheckerWindow::BotCheckerWindow():
Window(_("Bot Checker"), false, nullptr, "botchecker.xml"),
- ActionListener(),
+ gcn::ActionListener(),
mTableModel(new UsersTableModel()),
mTable(new GuiTable(mTableModel)),
playersScrollArea(new ScrollArea(mTable, true,
@@ -313,7 +313,7 @@ BotCheckerWindow::BotCheckerWindow():
setDefaultSize(w, h, ImageRect::CENTER);
- playersScrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
+ playersScrollArea->setHorizontalScrollPolicy(ScrollArea::SHOW_NEVER);
mPlayerTitleTable->setPosition(getPadding(), getPadding());
mPlayerTitleTable->setWidth(w - 10);
diff --git a/src/gui/buydialog.cpp b/src/gui/buydialog.cpp
index fd2e3a5f3..e855c1b57 100644
--- a/src/gui/buydialog.cpp
+++ b/src/gui/buydialog.cpp
@@ -51,8 +51,8 @@ BuyDialog::DialogList BuyDialog::instances;
BuyDialog::BuyDialog(const int npcId) :
Window(_("Buy"), false, nullptr, "buy.xml"),
- ActionListener(),
- SelectionListener(),
+ gcn::ActionListener(),
+ gcn::SelectionListener(),
mNpcId(npcId), mMoney(0), mAmountItems(0), mMaxItems(0), mNick("")
{
init();
@@ -60,8 +60,8 @@ BuyDialog::BuyDialog(const int npcId) :
BuyDialog::BuyDialog(std::string nick) :
Window(_("Buy"), false, nullptr, "buy.xml"),
- ActionListener(),
- SelectionListener(),
+ gcn::ActionListener(),
+ gcn::SelectionListener(),
mNpcId(-1), mMoney(0), mAmountItems(0), mMaxItems(0), mNick(nick)
{
init();
@@ -253,7 +253,7 @@ void BuyDialog::action(const gcn::ActionEvent &event)
// Reset selection
mAmountItems = 1;
mSlider->setValue(1);
- mSlider->gcn::Slider::setScale(1, mMaxItems);
+ mSlider->setScale(1, mMaxItems);
}
else if (tradeWindow)
{
@@ -280,7 +280,7 @@ void BuyDialog::valueChanged(const gcn::SelectionEvent &event A_UNUSED)
mSlider->setValue(1);
updateButtonsAndLabels();
- mSlider->gcn::Slider::setScale(1, mMaxItems);
+ mSlider->setScale(1, mMaxItems);
mAmountField->setRange(1, mMaxItems);
mAmountField->setValue(1);
}
diff --git a/src/gui/buydialog.h b/src/gui/buydialog.h
index fdfb90f48..f00672042 100644
--- a/src/gui/buydialog.h
+++ b/src/gui/buydialog.h
@@ -34,12 +34,8 @@ class ShopListBox;
class IntTextField;
class Label;
class ListBox;
-
-namespace gcn
-{
- class ScrollArea;
- class Slider;
-}
+class ScrollArea;
+class Slider;
/**
* The buy dialog.
@@ -135,10 +131,10 @@ class BuyDialog final : public Window, public gcn::ActionListener,
Button *mIncreaseButton;
Button *mDecreaseButton;
ShopListBox *mShopItemList;
- gcn::ScrollArea *mScrollArea;
+ ScrollArea *mScrollArea;
Label *mMoneyLabel;
Label *mQuantityLabel;
- gcn::Slider *mSlider;
+ Slider *mSlider;
Label *mAmountLabel;
IntTextField *mAmountField;
diff --git a/src/gui/buyselldialog.cpp b/src/gui/buyselldialog.cpp
index e0cdf2f31..f0f65fb94 100644
--- a/src/gui/buyselldialog.cpp
+++ b/src/gui/buyselldialog.cpp
@@ -36,7 +36,7 @@ BuySellDialog::DialogList BuySellDialog::instances;
BuySellDialog::BuySellDialog(const int npcId) :
Window(_("Shop"), false, nullptr, "buysell.xml"),
- ActionListener(),
+ gcn::ActionListener(),
mNpcId(npcId),
mNick(""),
mBuyButton(nullptr)
@@ -46,7 +46,7 @@ BuySellDialog::BuySellDialog(const int npcId) :
BuySellDialog::BuySellDialog(std::string nick) :
Window(_("Shop"), false, nullptr, "buysell.xml"),
- ActionListener(),
+ gcn::ActionListener(),
mNpcId(-1),
mNick(nick),
mBuyButton(nullptr)
diff --git a/src/gui/changeemaildialog.cpp b/src/gui/changeemaildialog.cpp
index 7f85ab80c..a61840e06 100644
--- a/src/gui/changeemaildialog.cpp
+++ b/src/gui/changeemaildialog.cpp
@@ -45,7 +45,7 @@
ChangeEmailDialog::ChangeEmailDialog(LoginData *const data):
Window(_("Change Email Address"), true, nullptr, "changeemail.xml"),
- ActionListener(),
+ gcn::ActionListener(),
mFirstEmailField(new TextField),
mSecondEmailField(new TextField),
mChangeEmailButton(new Button(_("Change Email Address"),
diff --git a/src/gui/changeemaildialog.h b/src/gui/changeemaildialog.h
index 9322919b3..69b7c0e8d 100644
--- a/src/gui/changeemaildialog.h
+++ b/src/gui/changeemaildialog.h
@@ -30,13 +30,9 @@
class Button;
class LoginData;
class OkDialog;
+class TextField;
class WrongDataNoticeListener;
-namespace gcn
-{
- class TextField;
-}
-
/**
* The Change email dialog.
*
@@ -71,8 +67,8 @@ class ChangeEmailDialog final : public Window, public gcn::ActionListener
static void setEmail(std::string *email);
private:
- gcn::TextField *mFirstEmailField;
- gcn::TextField *mSecondEmailField;
+ TextField *mFirstEmailField;
+ TextField *mSecondEmailField;
Button *mChangeEmailButton;
Button *mCancelButton;
diff --git a/src/gui/changepassworddialog.cpp b/src/gui/changepassworddialog.cpp
index d63626fe3..30c2a5447 100644
--- a/src/gui/changepassworddialog.cpp
+++ b/src/gui/changepassworddialog.cpp
@@ -46,7 +46,7 @@
ChangePasswordDialog::ChangePasswordDialog(LoginData *const data):
Window(_("Change Password"), true, nullptr, "changepassword.xml"),
- ActionListener(),
+ gcn::ActionListener(),
mOldPassField(new PasswordField),
mFirstPassField(new PasswordField),
mSecondPassField(new PasswordField),
diff --git a/src/gui/changepassworddialog.h b/src/gui/changepassworddialog.h
index 47a75b163..d8a125849 100644
--- a/src/gui/changepassworddialog.h
+++ b/src/gui/changepassworddialog.h
@@ -30,13 +30,9 @@
class Button;
class LoginData;
class OkDialog;
+class TextField;
class WrongDataNoticeListener;
-namespace gcn
-{
- class TextField;
-}
-
/**
* The Change password dialog.
*
@@ -65,9 +61,9 @@ class ChangePasswordDialog final : public Window, public gcn::ActionListener
void action(const gcn::ActionEvent &event) override;
private:
- gcn::TextField *mOldPassField;
- gcn::TextField *mFirstPassField;
- gcn::TextField *mSecondPassField;
+ TextField *mOldPassField;
+ TextField *mFirstPassField;
+ TextField *mSecondPassField;
Button *mChangePassButton;
Button *mCancelButton;
diff --git a/src/gui/charcreatedialog.cpp b/src/gui/charcreatedialog.cpp
index d029b7083..d3923f025 100644
--- a/src/gui/charcreatedialog.cpp
+++ b/src/gui/charcreatedialog.cpp
@@ -67,8 +67,8 @@ static const uint8_t directions[] =
CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent,
const int slot) :
Window(_("New Character"), true, parent, "charcreate.xml"),
- ActionListener(),
- KeyListener(),
+ gcn::ActionListener(),
+ gcn::KeyListener(),
mCharSelectDialog(parent),
mNameField(new TextField("")),
mNameLabel(new Label(_("Name:"))),
diff --git a/src/gui/charcreatedialog.h b/src/gui/charcreatedialog.h
index f14746605..d2bd57c61 100644
--- a/src/gui/charcreatedialog.h
+++ b/src/gui/charcreatedialog.h
@@ -34,13 +34,9 @@ class Label;
class LocalPlayer;
class PlayerBox;
class RadioButton;
+class Slider;
class TextField;
-namespace gcn
-{
- class Slider;
-}
-
/**
* Character creation dialog.
*
@@ -126,7 +122,7 @@ class CharCreateDialog final : public Window,
RadioButton *mFemale;
RadioButton *mOther;
- std::vector<gcn::Slider*> mAttributeSlider;
+ std::vector<Slider*> mAttributeSlider;
std::vector<Label*> mAttributeLabel;
std::vector<Label*> mAttributeValue;
Label *mAttributesLeft;
diff --git a/src/gui/charselectdialog.cpp b/src/gui/charselectdialog.cpp
index 1dd5f801b..e778cd921 100644
--- a/src/gui/charselectdialog.cpp
+++ b/src/gui/charselectdialog.cpp
@@ -136,8 +136,8 @@ class CharacterDisplay final : public Container
CharSelectDialog::CharSelectDialog(LoginData *const data):
Window(_("Account and Character Management"), false, nullptr, "char.xml"),
- ActionListener(),
- KeyListener(),
+ gcn::ActionListener(),
+ gcn::KeyListener(),
mLocked(false),
mLoginData(data),
mAccountNameLabel(new Label(mLoginData->username)),
diff --git a/src/gui/chatwindow.cpp b/src/gui/chatwindow.cpp
index 9f6953d1d..b32ff190f 100644
--- a/src/gui/chatwindow.cpp
+++ b/src/gui/chatwindow.cpp
@@ -78,7 +78,7 @@ class ChatInput final : public TextField, public gcn::FocusListener
public:
ChatInput(ChatWindow *const window, TabbedArea *const tabs):
TextField("", false),
- FocusListener(),
+ gcn::FocusListener(),
mWindow(window),
mChatTabs(tabs)
{
@@ -157,8 +157,8 @@ static const char *const ACTION_COLOR_PICKER = "color picker";
ChatWindow::ChatWindow():
Window(_("Chat"), false, nullptr, "chat.xml"),
- ActionListener(),
- KeyListener(),
+ gcn::ActionListener(),
+ gcn::KeyListener(),
mItemLinkHandler(new ItemLinkHandler),
mChatTabs(new TabbedArea),
mChatInput(new ChatInput(this, mChatTabs)),
diff --git a/src/gui/confirmdialog.cpp b/src/gui/confirmdialog.cpp
index 66b32a6da..b75a519fd 100644
--- a/src/gui/confirmdialog.cpp
+++ b/src/gui/confirmdialog.cpp
@@ -39,7 +39,7 @@ ConfirmDialog::ConfirmDialog(const std::string &title, const std::string &msg,
const bool ignore, const bool modal,
Window *const parent):
Window(title, modal, parent, "confirm.xml"),
- ActionListener(),
+ gcn::ActionListener(),
mTextBox(new TextBox)
{
mTextBox->setEditable(false);
diff --git a/src/gui/connectiondialog.cpp b/src/gui/connectiondialog.cpp
index 9a5beb725..ed8b0222d 100644
--- a/src/gui/connectiondialog.cpp
+++ b/src/gui/connectiondialog.cpp
@@ -36,7 +36,7 @@
ConnectionDialog::ConnectionDialog(const std::string &text,
const State cancelState):
Window(""),
- ActionListener(),
+ gcn::ActionListener(),
mCancelState(cancelState)
{
setTitleBarHeight(0);
diff --git a/src/gui/didyouknowwindow.cpp b/src/gui/didyouknowwindow.cpp
index 6e7891967..c40c60fe7 100644
--- a/src/gui/didyouknowwindow.cpp
+++ b/src/gui/didyouknowwindow.cpp
@@ -49,7 +49,7 @@ static const int maxTip = 16;
DidYouKnowWindow::DidYouKnowWindow():
Window(_("Did You Know?"), false, nullptr, "didyouknow.xml"),
- ActionListener(),
+ gcn::ActionListener(),
mBrowserBox(new BrowserBox),
mScrollArea(new ScrollArea(mBrowserBox,
true, "didyouknow_background.xml")),
diff --git a/src/gui/didyouknowwindow.h b/src/gui/didyouknowwindow.h
index c08fa832b..a0c0105c6 100644
--- a/src/gui/didyouknowwindow.h
+++ b/src/gui/didyouknowwindow.h
@@ -32,11 +32,7 @@ class Button;
class BrowserBox;
class CheckBox;
class LinkHandler;
-
-namespace gcn
-{
- class ScrollArea;
-}
+class ScrollArea;
/**
* The help dialog.
@@ -72,7 +68,7 @@ class DidYouKnowWindow final : public Window,
void loadFile(const int num);
BrowserBox *mBrowserBox;
- gcn::ScrollArea *mScrollArea;
+ ScrollArea *mScrollArea;
Button *mButtonPrev;
Button *mButtonNext;
CheckBox *mOpenAgainCheckBox;
diff --git a/src/gui/editdialog.cpp b/src/gui/editdialog.cpp
index 776254463..19f7011bb 100644
--- a/src/gui/editdialog.cpp
+++ b/src/gui/editdialog.cpp
@@ -36,7 +36,7 @@ EditDialog::EditDialog(const std::string &title, const std::string &msg,
std::string eventOk, const int width,
Window *const parent, const bool modal):
Window(title, modal, parent, "edit.xml"),
- ActionListener(),
+ gcn::ActionListener(),
mTextField(new TextField)
{
mTextField->setText(msg);
diff --git a/src/gui/editserverdialog.cpp b/src/gui/editserverdialog.cpp
index c4d36da74..93a0f00c9 100644
--- a/src/gui/editserverdialog.cpp
+++ b/src/gui/editserverdialog.cpp
@@ -64,8 +64,8 @@ EditServerDialog::EditServerDialog(ServerDialog *const parent,
ServerInfo server,
const int index) :
Window(_("Edit Server"), true, parent),
- ActionListener(),
- KeyListener(),
+ gcn::ActionListener(),
+ gcn::KeyListener(),
mServerAddressField(new TextField(std::string())),
mPortField(new TextField(std::string())),
mNameField(new TextField(std::string())),
diff --git a/src/gui/editserverdialog.h b/src/gui/editserverdialog.h
index ea6ea326d..722c0a009 100644
--- a/src/gui/editserverdialog.h
+++ b/src/gui/editserverdialog.h
@@ -37,7 +37,6 @@ class TypeListModel;
#include <guichan/keylistener.hpp>
#include <guichan/listmodel.hpp>
-
/**
* Server Type List Model
*/
diff --git a/src/gui/equipmentwindow.cpp b/src/gui/equipmentwindow.cpp
index 5b5c8d1d1..6ba036f5b 100644
--- a/src/gui/equipmentwindow.cpp
+++ b/src/gui/equipmentwindow.cpp
@@ -53,7 +53,7 @@ EquipmentWindow::EquipmentWindow(Equipment *const equipment,
Being *const being,
const bool foring):
Window(_("Equipment"), false, nullptr, "equipment.xml"),
- ActionListener(),
+ gcn::ActionListener(),
mEquipment(equipment),
mItemPopup(new ItemPopup),
mPlayerBox(new PlayerBox("equipment_playerbox.xml")),
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index e5893b69a..b0d62fbff 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -44,7 +44,6 @@
#include "utils/langs.h"
#include <guichan/exception.hpp>
-#include <guichan/image.hpp>
#include "debug.h"
diff --git a/src/gui/helpwindow.cpp b/src/gui/helpwindow.cpp
index 62be2fd1a..9018f68aa 100644
--- a/src/gui/helpwindow.cpp
+++ b/src/gui/helpwindow.cpp
@@ -46,7 +46,7 @@
HelpWindow::HelpWindow():
Window(_("Help"), false, nullptr, "help.xml"),
- ActionListener(),
+ gcn::ActionListener(),
mBrowserBox(new BrowserBox),
mScrollArea(new ScrollArea(mBrowserBox, true, "help_background.xml"))
{
diff --git a/src/gui/helpwindow.h b/src/gui/helpwindow.h
index f7c8ff690..11598dd25 100644
--- a/src/gui/helpwindow.h
+++ b/src/gui/helpwindow.h
@@ -35,11 +35,7 @@
class BrowserBox;
class LinkHandler;
-
-namespace gcn
-{
- class ScrollArea;
-}
+class ScrollArea;
typedef std::set<std::string> HelpNames;
typedef HelpNames::const_iterator HelpNamesCIter;
@@ -86,7 +82,7 @@ class HelpWindow final : public Window, public LinkHandler,
void loadFile(const std::string &file);
BrowserBox *mBrowserBox;
- gcn::ScrollArea *mScrollArea;
+ ScrollArea *mScrollArea;
HelpTagsMap mTagFileMap;
};
diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp
index fd85b0d85..f0f619fae 100644
--- a/src/gui/inventorywindow.cpp
+++ b/src/gui/inventorywindow.cpp
@@ -91,9 +91,9 @@ InventoryWindow::WindowList InventoryWindow::instances;
InventoryWindow::InventoryWindow(Inventory *const inventory):
Window("Inventory", false, nullptr, "inventory.xml"),
- ActionListener(),
- KeyListener(),
- SelectionListener(),
+ gcn::ActionListener(),
+ gcn::KeyListener(),
+ gcn::SelectionListener(),
InventoryListener(),
mInventory(inventory),
mUseButton(nullptr),
diff --git a/src/gui/inventorywindow.h b/src/gui/inventorywindow.h
index 5ae7295cd..2340e60ed 100644
--- a/src/gui/inventorywindow.h
+++ b/src/gui/inventorywindow.h
@@ -39,17 +39,13 @@ class Button;
class DropDown;
class Item;
class ItemContainer;
-class TabStrip;
+class Label;
class LayoutCell;
class ProgressBar;
class SortListModel;
+class TabStrip;
class TextField;
-namespace gcn
-{
- class Label;
-}
-
/**
* Inventory dialog.
*
diff --git a/src/gui/itemamountwindow.cpp b/src/gui/itemamountwindow.cpp
index 516b7f6f0..299006e6f 100644
--- a/src/gui/itemamountwindow.cpp
+++ b/src/gui/itemamountwindow.cpp
@@ -138,8 +138,8 @@ void ItemAmountWindow::finish(Item *const item, const int amount,
ItemAmountWindow::ItemAmountWindow(const Usage usage, Window *const parent,
Item *const item, const int maxRange) :
Window("", true, parent, "amount.xml"),
- ActionListener(),
- KeyListener(),
+ gcn::ActionListener(),
+ gcn::KeyListener(),
mItemAmountTextField(new IntTextField(1)),
mItemPriceTextField(nullptr),
mGPLabel(nullptr),
diff --git a/src/gui/itemamountwindow.h b/src/gui/itemamountwindow.h
index 9db74c692..ef2613653 100644
--- a/src/gui/itemamountwindow.h
+++ b/src/gui/itemamountwindow.h
@@ -35,11 +35,7 @@ class Item;
class ItemsModal;
class ItemPopup;
class Label;
-
-namespace gcn
-{
- class Slider;
-}
+class Slider;
/**
* Window used for selecting the amount of items to drop, trade or split.
@@ -114,9 +110,9 @@ class ItemAmountWindow final : public Window,
/**
* Item Amount buttons.
*/
- gcn::Slider *mItemAmountSlide;
+ Slider *mItemAmountSlide;
- gcn::Slider *mItemPriceSlide;
+ Slider *mItemPriceSlide;
DropDown *mItemDropDown;
diff --git a/src/gui/itempopup.cpp b/src/gui/itempopup.cpp
index f5de59579..ae20c0ac4 100644
--- a/src/gui/itempopup.cpp
+++ b/src/gui/itempopup.cpp
@@ -43,9 +43,6 @@
#include <guichan/font.hpp>
-#include <guichan/widgets/label.hpp>
-#include <guichan/widgets/container.hpp>
-
#include "debug.h"
ItemPopup::ItemPopup():
diff --git a/src/gui/itempopup.h b/src/gui/itempopup.h
index 22fd20e79..4968e7263 100644
--- a/src/gui/itempopup.h
+++ b/src/gui/itempopup.h
@@ -30,17 +30,13 @@
#include <guichan/mouselistener.hpp>
+class Button;
+class CheckBox;
class Icon;
class Label;
+class ScrollArea;
class TextBox;
-namespace gcn
-{
- class Button;
- class CheckBox;
- class ScrollArea;
-}
-
/**
* A popup that displays information about an item.
*/
diff --git a/src/gui/killstats.cpp b/src/gui/killstats.cpp
index d26b3bf84..15112b2b4 100644
--- a/src/gui/killstats.cpp
+++ b/src/gui/killstats.cpp
@@ -35,13 +35,12 @@
#include "utils/gettext.h"
#include <math.h>
-#include <guichan/widgets/label.hpp>
#include "debug.h"
KillStats::KillStats():
Window(_("Kill stats"), false, nullptr, "killstats.xml"),
- ActionListener(),
+ gcn::ActionListener(),
mKillCounter(0),
mExpCounter(0),
mKillTCounter(0),
diff --git a/src/gui/killstats.h b/src/gui/killstats.h
index 3576f84be..7ffaf7922 100644
--- a/src/gui/killstats.h
+++ b/src/gui/killstats.h
@@ -32,11 +32,6 @@
class Label;
class Button;
-namespace gcn
-{
- class Label;
-}
-
class KillStats final : public Window,
private gcn::ActionListener,
public Listener
diff --git a/src/gui/logindialog.cpp b/src/gui/logindialog.cpp
index 6fba82fb0..e38e6291a 100644
--- a/src/gui/logindialog.cpp
+++ b/src/gui/logindialog.cpp
@@ -117,8 +117,8 @@ class UpdateListModel final : public gcn::ListModel
LoginDialog::LoginDialog(LoginData *const data, std::string serverName,
std::string *const updateHost):
Window(_("Login"), false, nullptr, "login.xml"),
- ActionListener(),
- KeyListener(),
+ gcn::ActionListener(),
+ gcn::KeyListener(),
mLoginData(data),
mUserField(new TextField(mLoginData->username)),
mPassField(new PasswordField(mLoginData->password)),
diff --git a/src/gui/logindialog.h b/src/gui/logindialog.h
index d08eade5e..2a4dec9fd 100644
--- a/src/gui/logindialog.h
+++ b/src/gui/logindialog.h
@@ -37,14 +37,10 @@ class CheckBox;
class DropDown;
class Label;
class LoginData;
+class TextField;
class UpdateListModel;
class UpdateTypeModel;
-namespace gcn
-{
- class TextField;
-}
-
/**
* The login dialog.
*
@@ -88,8 +84,8 @@ class LoginDialog final : public Window, public gcn::ActionListener,
LoginData *mLoginData;
- gcn::TextField *mUserField;
- gcn::TextField *mPassField;
+ TextField *mUserField;
+ TextField *mPassField;
CheckBox *mKeepCheck;
Label *mUpdateTypeLabel;
Label *mUpdateHostLabel;
@@ -99,7 +95,7 @@ class LoginDialog final : public Window, public gcn::ActionListener,
Button *mLoginButton;
Button *mRegisterButton;
CheckBox *mCustomUpdateHost;
- gcn::TextField *mUpdateHostText;
+ TextField *mUpdateHostText;
UpdateListModel *mUpdateListModel;
DropDown *mUpdateHostDropDown;
diff --git a/src/gui/npcdialog.cpp b/src/gui/npcdialog.cpp
index 1333842bb..d558c417b 100644
--- a/src/gui/npcdialog.cpp
+++ b/src/gui/npcdialog.cpp
@@ -62,7 +62,7 @@ NpcDialog::DialogList NpcDialog::instances;
NpcDialog::NpcDialog(const int npcId) :
Window(_("NPC"), false, nullptr, "npc.xml"),
- ActionListener(),
+ gcn::ActionListener(),
mNpcId(npcId),
mLogInteraction(config.getBoolValue("logNpcInGui")),
mDefaultInt(0),
diff --git a/src/gui/npcdialog.h b/src/gui/npcdialog.h
index aa4fc00ac..a3e9eec9c 100644
--- a/src/gui/npcdialog.h
+++ b/src/gui/npcdialog.h
@@ -36,19 +36,15 @@
#include <list>
class Being;
+class Button;
class BrowserBox;
+class ExtendedListBox;
class ItemLinkHandler;
class IntTextField;
-class ExtendedListBox;
class PlayerBox;
+class ScrollArea;
class TextBox;
class TextField;
-class Button;
-
-namespace gcn
-{
- class ScrollArea;
-}
/**
* The npc dialog.
@@ -226,14 +222,14 @@ class NpcDialog final : public Window, public gcn::ActionListener,
// Used for the main input area
BrowserBox *mTextBox;
- gcn::ScrollArea *mScrollArea;
+ ScrollArea *mScrollArea;
//TextBox *mTextBox;
std::string mText;
std::string mNewText;
// Used for choice input
ExtendedListBox *mItemList;
- gcn::ScrollArea *mListScrollArea;
+ ScrollArea *mListScrollArea;
StringVect mItems;
std::vector<Image *> mImages;
ItemLinkHandler *mItemLinkHandler;
diff --git a/src/gui/npcpostdialog.cpp b/src/gui/npcpostdialog.cpp
index 304467f20..cc3d5494b 100644
--- a/src/gui/npcpostdialog.cpp
+++ b/src/gui/npcpostdialog.cpp
@@ -40,7 +40,7 @@ NpcPostDialog::DialogList NpcPostDialog::instances;
NpcPostDialog::NpcPostDialog(const int npcId):
Window(_("NPC"), false, nullptr, "npcpost.xml"),
- ActionListener(),
+ gcn::ActionListener(),
mNpcId(npcId),
mText(new TextBox),
mSender(new TextField)
diff --git a/src/gui/okdialog.cpp b/src/gui/okdialog.cpp
index b06ba832c..cd7fd915d 100644
--- a/src/gui/okdialog.cpp
+++ b/src/gui/okdialog.cpp
@@ -40,7 +40,7 @@ OkDialog::OkDialog(const std::string &title, const std::string &msg,
const bool showCenter, Window *const parent,
const int minWidth) :
Window(title, modal, parent, "ok.xml"),
- ActionListener(),
+ gcn::ActionListener(),
mTextBox(new TextBox)
{
mTextBox->setEditable(false);
diff --git a/src/gui/outfitwindow.cpp b/src/gui/outfitwindow.cpp
index 21ef7e2cb..a23aad5df 100644
--- a/src/gui/outfitwindow.cpp
+++ b/src/gui/outfitwindow.cpp
@@ -57,7 +57,7 @@ float OutfitWindow::mAlpha = 1.0;
OutfitWindow::OutfitWindow():
Window(_("Outfits"), false, nullptr, "outfits.xml"),
- ActionListener(),
+ gcn::ActionListener(),
mPreviousButton(new Button(_("<"), "previous", this)),
mNextButton(new Button(_(">"), "next", this)),
mEquipButtom(new Button(_("Equip"), "equip", this)),
diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp
index be03f2ef1..4b41ed98b 100644
--- a/src/gui/popupmenu.cpp
+++ b/src/gui/popupmenu.cpp
@@ -2189,7 +2189,7 @@ void PopupMenu::addPickupFilter(const std::string &name)
}
RenameListener::RenameListener() :
- ActionListener(),
+ gcn::ActionListener(),
mMapItem(nullptr),
mDialog(nullptr)
{
diff --git a/src/gui/questswindow.cpp b/src/gui/questswindow.cpp
index 25a8f24e3..29b921159 100644
--- a/src/gui/questswindow.cpp
+++ b/src/gui/questswindow.cpp
@@ -88,7 +88,7 @@ class QuestsModel final : public ExtendedNamesModel
QuestsWindow::QuestsWindow() :
Window(_("Quests"), false, nullptr, "quests.xml"),
- ActionListener(),
+ gcn::ActionListener(),
mQuestsModel(new QuestsModel),
mQuestsListBox(new ExtendedListBox(mQuestsModel)),
mQuestScrollArea(new ScrollArea(mQuestsListBox,
diff --git a/src/gui/quitdialog.cpp b/src/gui/quitdialog.cpp
index 9af09d24e..48159657b 100644
--- a/src/gui/quitdialog.cpp
+++ b/src/gui/quitdialog.cpp
@@ -49,8 +49,8 @@
QuitDialog::QuitDialog(QuitDialog **const pointerToMe):
Window(_("Quit"), true, nullptr, "quit.xml"),
- ActionListener(),
- KeyListener(),
+ gcn::ActionListener(),
+ gcn::KeyListener(),
mLogoutQuit(new RadioButton(_("Quit"), "quitdialog")),
mForceQuit(new RadioButton(_("Quit"), "quitdialog")),
mSwitchAccountServer(new RadioButton(_("Switch server"), "quitdialog")),
diff --git a/src/gui/registerdialog.cpp b/src/gui/registerdialog.cpp
index 1458d043d..cfbb44a5c 100644
--- a/src/gui/registerdialog.cpp
+++ b/src/gui/registerdialog.cpp
@@ -45,12 +45,12 @@
#include "debug.h"
WrongDataNoticeListener::WrongDataNoticeListener():
- ActionListener(),
+ gcn::ActionListener(),
mTarget(nullptr)
{
}
-void WrongDataNoticeListener::setTarget(gcn::TextField *const textField)
+void WrongDataNoticeListener::setTarget(TextField *const textField)
{
mTarget = textField;
}
@@ -63,8 +63,8 @@ void WrongDataNoticeListener::action(const gcn::ActionEvent &event)
RegisterDialog::RegisterDialog(LoginData *const data):
Window(_("Register"), false, nullptr, "register.xml"),
- ActionListener(),
- KeyListener(),
+ gcn::ActionListener(),
+ gcn::KeyListener(),
mLoginData(data),
mUserField(new TextField(mLoginData->username)),
mPasswordField(new PasswordField(mLoginData->password)),
diff --git a/src/gui/registerdialog.h b/src/gui/registerdialog.h
index d21cf802d..7d375c691 100644
--- a/src/gui/registerdialog.h
+++ b/src/gui/registerdialog.h
@@ -34,11 +34,7 @@ class Button;
class LoginData;
class OkDialog;
class RadioButton;
-
-namespace gcn
-{
- class TextField;
-}
+class TextField;
/**
* Listener used while dealing with wrong data. It is used to direct the focus
@@ -52,11 +48,11 @@ class WrongDataNoticeListener final : public gcn::ActionListener
A_DELETE_COPY(WrongDataNoticeListener)
- void setTarget(gcn::TextField *const textField);
+ void setTarget(TextField *const textField);
void action(const gcn::ActionEvent &event) override;
private:
- gcn::TextField *mTarget;
+ TextField *mTarget;
};
/**
@@ -102,10 +98,10 @@ class RegisterDialog final : public Window, public gcn::ActionListener,
LoginData *mLoginData;
- gcn::TextField *mUserField;
- gcn::TextField *mPasswordField;
- gcn::TextField *mConfirmField;
- gcn::TextField *mEmailField;
+ TextField *mUserField;
+ TextField *mPasswordField;
+ TextField *mConfirmField;
+ TextField *mEmailField;
Button *mRegisterButton;
Button *mCancelButton;
RadioButton *mMaleButton;
diff --git a/src/gui/sdlinput.h b/src/gui/sdlinput.h
index 6cf9df904..cb9e50f30 100644
--- a/src/gui/sdlinput.h
+++ b/src/gui/sdlinput.h
@@ -66,7 +66,6 @@
#include <guichan/input.hpp>
#include <guichan/keyinput.hpp>
#include <guichan/mouseinput.hpp>
-#include <guichan/platform.hpp>
#include <queue>
diff --git a/src/gui/selldialog.cpp b/src/gui/selldialog.cpp
index e299362cc..13d06bc47 100644
--- a/src/gui/selldialog.cpp
+++ b/src/gui/selldialog.cpp
@@ -49,8 +49,8 @@ SellDialog::DialogList SellDialog::instances;
SellDialog::SellDialog(const int npcId) :
Window(_("Sell"), false, nullptr, "sell.xml"),
- ActionListener(),
- SelectionListener(),
+ gcn::ActionListener(),
+ gcn::SelectionListener(),
mNpcId(npcId), mMaxItems(0), mAmountItems(0), mNick("")
{
init();
@@ -58,8 +58,8 @@ SellDialog::SellDialog(const int npcId) :
SellDialog::SellDialog(std::string nick):
Window(_("Sell"), false, nullptr, "sell.xml"),
- ActionListener(),
- SelectionListener(),
+ gcn::ActionListener(),
+ gcn::SelectionListener(),
mNpcId(-1), mMaxItems(0), mAmountItems(0), mNick(nick)
{
init();
@@ -288,7 +288,7 @@ void SellDialog::valueChanged(const gcn::SelectionEvent &event A_UNUSED)
mSlider->setValue(0);
updateButtonsAndLabels();
- mSlider->gcn::Slider::setScale(1, mMaxItems);
+ mSlider->setScale(1, mMaxItems);
}
void SellDialog::setMoney(const int amount)
diff --git a/src/gui/selldialog.h b/src/gui/selldialog.h
index 1c62ede42..2e257ec52 100644
--- a/src/gui/selldialog.h
+++ b/src/gui/selldialog.h
@@ -33,14 +33,10 @@
class Button;
class Item;
class Label;
+class ScrollArea;
class ShopItems;
class ShopListBox;
-
-namespace gcn
-{
- class ScrollArea;
- class Slider;
-}
+class Slider;
/**
* The sell dialog.
@@ -136,10 +132,10 @@ class SellDialog final : public Window,
Button *mIncreaseButton;
Button *mDecreaseButton;
ShopListBox *mShopItemList;
- gcn::ScrollArea *mScrollArea;
+ ScrollArea *mScrollArea;
Label *mMoneyLabel;
Label *mQuantityLabel;
- gcn::Slider *mSlider;
+ Slider *mSlider;
ShopItems *mShopItems;
int mPlayerMoney;
diff --git a/src/gui/serverdialog.cpp b/src/gui/serverdialog.cpp
index 673bfbcd5..c9dc3d054 100644
--- a/src/gui/serverdialog.cpp
+++ b/src/gui/serverdialog.cpp
@@ -244,9 +244,9 @@ private:
ServerDialog::ServerDialog(ServerInfo *const serverInfo,
const std::string &dir) :
Window(_("Choose Your Server"), false, nullptr, "server.xml"),
- ActionListener(),
- KeyListener(),
- SelectionListener(),
+ gcn::ActionListener(),
+ gcn::KeyListener(),
+ gcn::SelectionListener(),
mDescription(new Label(std::string())),
mQuitButton(new Button(_("Quit"), "quit", this)),
mConnectButton(new Button(_("Connect"), "connect", this)),
diff --git a/src/gui/setup.cpp b/src/gui/setup.cpp
index ddcf13d77..f06396ff7 100644
--- a/src/gui/setup.cpp
+++ b/src/gui/setup.cpp
@@ -51,7 +51,7 @@ extern Window *statusWindow;
Setup::Setup():
Window(_("Setup"), false, nullptr, "setup.xml"),
- ActionListener(),
+ gcn::ActionListener(),
mResetWindows(nullptr),
mPanel(new TabbedArea)
{
diff --git a/src/gui/setup_colors.cpp b/src/gui/setup_colors.cpp
index b8ccc7bf2..3332c1d73 100644
--- a/src/gui/setup_colors.cpp
+++ b/src/gui/setup_colors.cpp
@@ -50,7 +50,7 @@ const std::string Setup_Colors::rawmsg =
Setup_Colors::Setup_Colors() :
SetupTab(),
- SelectionListener(),
+ gcn::SelectionListener(),
mColorBox(new ListBox(userPalette)),
mScroll(new ScrollArea(mColorBox, true, "setup_colors_background.xml")),
mPreview(new BrowserBox(BrowserBox::AUTO_WRAP)),
@@ -340,7 +340,7 @@ void Setup_Colors::valueChanged(const gcn::SelectionEvent &event A_UNUSED)
mGradTypeSlider->setEnabled(true);
}
-void Setup_Colors::setEntry(gcn::Slider *const s, TextField *const t,
+void Setup_Colors::setEntry(Slider *const s, TextField *const t,
const int value)
{
if (s)
diff --git a/src/gui/setup_colors.h b/src/gui/setup_colors.h
index 89909ecce..6f3b8eafb 100644
--- a/src/gui/setup_colors.h
+++ b/src/gui/setup_colors.h
@@ -32,15 +32,11 @@
class BrowserBox;
class Label;
class ListBox;
+class ScrollArea;
+class Slider;
class TextField;
class TextPreview;
-namespace gcn
-{
- class ScrollArea;
- class Slider;
-}
-
class Setup_Colors final : public SetupTab,
public gcn::SelectionListener
{
@@ -63,36 +59,36 @@ class Setup_Colors final : public SetupTab,
static const std::string rawmsg;
ListBox *mColorBox;
- gcn::ScrollArea *mScroll;
+ ScrollArea *mScroll;
BrowserBox *mPreview;
TextPreview *mTextPreview;
- gcn::ScrollArea *mPreviewBox;
+ ScrollArea *mPreviewBox;
int mSelected;
Label *mGradTypeLabel;
- gcn::Slider *mGradTypeSlider;
+ Slider *mGradTypeSlider;
Label *mGradTypeText;
Label *mGradDelayLabel;
- gcn::Slider *mGradDelaySlider;
+ Slider *mGradDelaySlider;
TextField *mGradDelayText;
Label *mRedLabel;
- gcn::Slider *mRedSlider;
+ Slider *mRedSlider;
TextField *mRedText;
int mRedValue;
Label *mGreenLabel;
- gcn::Slider *mGreenSlider;
+ Slider *mGreenSlider;
TextField *mGreenText;
int mGreenValue;
Label *mBlueLabel;
- gcn::Slider *mBlueSlider;
+ Slider *mBlueSlider;
TextField *mBlueText;
int mBlueValue;
- static void setEntry(gcn::Slider *const s, TextField *const t,
+ static void setEntry(Slider *const s, TextField *const t,
const int value);
void updateColor();
void updateGradType();
diff --git a/src/gui/setup_input.cpp b/src/gui/setup_input.cpp
index 58e34857f..efb4006ff 100644
--- a/src/gui/setup_input.cpp
+++ b/src/gui/setup_input.cpp
@@ -123,7 +123,7 @@ Setup_Input::Setup_Input() :
ScrollArea *const scrollArea = new ScrollArea(mKeyList,
true, "setup_input_background.xml");
- scrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
+ scrollArea->setHorizontalScrollPolicy(ScrollArea::SHOW_NEVER);
mAssignKeyButton->addActionListener(this);
mAssignKeyButton->setEnabled(false);
diff --git a/src/gui/setup_relations.h b/src/gui/setup_relations.h
index 8e83cf22c..83b72ba97 100644
--- a/src/gui/setup_relations.h
+++ b/src/gui/setup_relations.h
@@ -35,12 +35,12 @@ class DropDown;
class EditDialog;
class GuiTable;
class PlayerTableModel;
+class ScrollArea;
class StaticTableModel;
namespace gcn
{
class ListModel;
- class ScrollArea;
}
class Setup_Relations final : public SetupTab,
@@ -72,7 +72,7 @@ private:
PlayerTableModel *mPlayerTableModel;
GuiTable *mPlayerTable;
GuiTable *mPlayerTitleTable;
- gcn::ScrollArea *mPlayerScrollArea;
+ ScrollArea *mPlayerScrollArea;
CheckBox *mDefaultTrading;
CheckBox *mDefaultWhisper;
diff --git a/src/gui/setup_video.cpp b/src/gui/setup_video.cpp
index c0a680116..d06a922ac 100644
--- a/src/gui/setup_video.cpp
+++ b/src/gui/setup_video.cpp
@@ -55,8 +55,6 @@
#include <guichan/key.hpp>
#include <guichan/listmodel.hpp>
-#include <guichan/widgets/button.hpp>
-
#include <SDL.h>
#include <algorithm>
@@ -223,7 +221,7 @@ public:
Setup_Video::Setup_Video() :
SetupTab(),
- KeyListener(),
+ gcn::KeyListener(),
mFullScreenEnabled(config.getBoolValue("screen")),
mOpenGLEnabled(config.getIntValue("opengl")),
mCustomCursorEnabled(config.getBoolValue("customcursor")),
diff --git a/src/gui/setup_video.h b/src/gui/setup_video.h
index 0955910da..5adcec8b6 100644
--- a/src/gui/setup_video.h
+++ b/src/gui/setup_video.h
@@ -37,13 +37,9 @@ class Label;
class ListBox;
class ModeListModel;
class OpenGLListModel;
+class Slider;
class TextDialog;
-namespace gcn
-{
- class Slider;
-}
-
class Setup_Video final : public SetupTab, public gcn::KeyListener
{
public:
@@ -86,9 +82,9 @@ class Setup_Video final : public SetupTab, public gcn::KeyListener
CheckBox *mNoFrameCheckBox;
CheckBox *mFpsCheckBox;
- gcn::Slider *mFpsSlider;
+ Slider *mFpsSlider;
Label *mFpsLabel;
- gcn::Slider *mAltFpsSlider;
+ Slider *mAltFpsSlider;
Label *mAltFpsLabel;
Button *mDetectButton;
diff --git a/src/gui/shopwindow.cpp b/src/gui/shopwindow.cpp
index 9b32d0a38..6f332730e 100644
--- a/src/gui/shopwindow.cpp
+++ b/src/gui/shopwindow.cpp
@@ -73,8 +73,8 @@ ShopWindow::DialogList ShopWindow::instances;
ShopWindow::ShopWindow():
Window(_("Personal Shop"), false, nullptr, "shop.xml"),
- ActionListener(),
- SelectionListener(),
+ gcn::ActionListener(),
+ gcn::SelectionListener(),
mCloseButton(new Button(_("Close"), "close", this)),
mBuyShopItems(new ShopItems),
mSellShopItems(new ShopItems),
diff --git a/src/gui/shopwindow.h b/src/gui/shopwindow.h
index dbf102f85..b04a3a474 100644
--- a/src/gui/shopwindow.h
+++ b/src/gui/shopwindow.h
@@ -33,16 +33,11 @@ class CheckBox;
class Item;
class Label;
class ListBox;
+class ScrollArea;
class ShopItem;
class ShopItems;
class ShopListBox;
-namespace gcn
-{
- class CheckBox;
- class ScrollArea;
-}
-
/**
* The buy dialog.
*
@@ -152,8 +147,8 @@ class ShopWindow final : public Window, public gcn::ActionListener,
ShopListBox *mBuyShopItemList;
ShopListBox *mSellShopItemList;
- gcn::ScrollArea *mBuyScrollArea;
- gcn::ScrollArea *mSellScrollArea;
+ ScrollArea *mBuyScrollArea;
+ ScrollArea *mSellScrollArea;
Label *mBuyLabel;
Label *mSellLabel;
Button *mBuyAddButton;
diff --git a/src/gui/skilldialog.cpp b/src/gui/skilldialog.cpp
index 1d0c12001..2a2d46dca 100644
--- a/src/gui/skilldialog.cpp
+++ b/src/gui/skilldialog.cpp
@@ -230,7 +230,7 @@ class SkillTab final : public Tab
SkillDialog::SkillDialog() :
Window(_("Skills"), false, nullptr, "skills.xml"),
- ActionListener(),
+ gcn::ActionListener(),
mTabs(new TabbedArea()),
mPointsLabel(new Label("0")),
mUseButton(new Button(_("Use"), "use", this)),
diff --git a/src/gui/socialwindow.cpp b/src/gui/socialwindow.cpp
index a91057ddb..ad0bf9206 100644
--- a/src/gui/socialwindow.cpp
+++ b/src/gui/socialwindow.cpp
@@ -138,7 +138,7 @@ class SocialGuildTab final : public SocialTab, public gcn::ActionListener
public:
SocialGuildTab(Guild *const guild, const bool showBackground) :
SocialTab(),
- ActionListener(),
+ gcn::ActionListener(),
mGuild(guild)
{
setCaption(_("Guild"));
@@ -244,7 +244,7 @@ class SocialGuildTab2 final : public SocialTab, public gcn::ActionListener
public:
SocialGuildTab2(Guild *const guild, const bool showBackground) :
SocialTab(),
- ActionListener(),
+ gcn::ActionListener(),
mGuild(guild)
{
setCaption(_("Guild"));
@@ -306,7 +306,7 @@ class SocialPartyTab final : public SocialTab, public gcn::ActionListener
public:
SocialPartyTab(Party *const party, const bool showBackground) :
SocialTab(),
- ActionListener(),
+ gcn::ActionListener(),
mParty(party)
{
setCaption(_("Party"));
@@ -1218,7 +1218,7 @@ private:
SocialWindow::SocialWindow() :
Window(_("Social"), false, nullptr, "social.xml"),
- ActionListener(),
+ gcn::ActionListener(),
mGuildInvited(0),
mGuildAcceptDialog(nullptr),
mGuildCreateDialog(nullptr),
diff --git a/src/gui/statuspopup.cpp b/src/gui/statuspopup.cpp
index 55f9b59d6..63563aadf 100644
--- a/src/gui/statuspopup.cpp
+++ b/src/gui/statuspopup.cpp
@@ -38,7 +38,6 @@
#include "keyboardconfig.h"
#include <guichan/font.hpp>
-#include <guichan/widgets/label.hpp>
#include "debug.h"
diff --git a/src/gui/statuspopup.h b/src/gui/statuspopup.h
index e636812f5..d0eaf3c01 100644
--- a/src/gui/statuspopup.h
+++ b/src/gui/statuspopup.h
@@ -35,11 +35,6 @@
class Label;
class TextBox;
-namespace gcn
-{
- class Label;
-}
-
/**
* A popup that displays information about an item.
*/
diff --git a/src/gui/statuswindow.cpp b/src/gui/statuswindow.cpp
index 078669bca..a8f5b8e39 100644
--- a/src/gui/statuswindow.cpp
+++ b/src/gui/statuswindow.cpp
@@ -127,7 +127,7 @@ class ChangeDisplay final : public AttrDisplay, gcn::ActionListener
StatusWindow::StatusWindow() :
Window(player_node ? player_node->getName() :
"?", false, nullptr, "status.xml"),
- ActionListener(),
+ gcn::ActionListener(),
mLvlLabel(new Label(strprintf(_("Level: %d"), 0))),
mMoneyLabel(new Label(strprintf(_("Money: %s"), ""))),
mHpLabel(new Label(_("HP:"))),
@@ -795,7 +795,7 @@ DerDisplay::DerDisplay(const int id, const std::string &name) :
ChangeDisplay::ChangeDisplay(const int id, const std::string &name) :
AttrDisplay(id, name),
- ActionListener(),
+ gcn::ActionListener(),
mNeeded(1),
mPoints(new Label(_("Max"))),
mDec(nullptr),
diff --git a/src/gui/textcommandeditor.cpp b/src/gui/textcommandeditor.cpp
index eddb49180..ceec14f4c 100644
--- a/src/gui/textcommandeditor.cpp
+++ b/src/gui/textcommandeditor.cpp
@@ -165,7 +165,7 @@ public:
TextCommandEditor::TextCommandEditor(TextCommand *const command) :
Window(_("Command Editor"), false, nullptr, "commandeditor.xml"),
- ActionListener(),
+ gcn::ActionListener(),
mIsMagicCommand(command->getCommandType() == TEXT_COMMAND_MAGIC),
mCommand(command),
mIsMagic(new RadioButton(_("magic"), "magic", mIsMagicCommand)),
diff --git a/src/gui/textdialog.cpp b/src/gui/textdialog.cpp
index 879505f64..5a19637e5 100644
--- a/src/gui/textdialog.cpp
+++ b/src/gui/textdialog.cpp
@@ -39,7 +39,7 @@ int TextDialog::instances = 0;
TextDialog::TextDialog(const std::string &title, const std::string &msg,
Window *const parent, const bool isPassword):
Window(title, true, parent, "textdialog.xml"),
- ActionListener(),
+ gcn::ActionListener(),
mTextField(nullptr),
mPasswordField(nullptr),
mOkButton(new Button(_("OK"), "OK", this)),
diff --git a/src/gui/tradewindow.cpp b/src/gui/tradewindow.cpp
index 437b8bc9f..5cb77dd9d 100644
--- a/src/gui/tradewindow.cpp
+++ b/src/gui/tradewindow.cpp
@@ -61,8 +61,8 @@
TradeWindow::TradeWindow():
Window(_("Trade: You"), false, nullptr, "trade.xml"),
- ActionListener(),
- SelectionListener(),
+ gcn::ActionListener(),
+ gcn::SelectionListener(),
mMyInventory(new Inventory(Inventory::TRADE)),
mPartnerInventory(new Inventory(Inventory::TRADE)),
mMyItemContainer(new ItemContainer(mMyInventory.get())),
@@ -104,13 +104,13 @@ TradeWindow::TradeWindow():
ScrollArea *const myScroll = new ScrollArea(mMyItemContainer,
true, "trade_background.xml");
- myScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
+ myScroll->setHorizontalScrollPolicy(ScrollArea::SHOW_NEVER);
mPartnerItemContainer->addSelectionListener(this);
ScrollArea *const partnerScroll = new ScrollArea(mPartnerItemContainer,
true, "trade_background.xml");
- partnerScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
+ partnerScroll->setHorizontalScrollPolicy(ScrollArea::SHOW_NEVER);
Label *const moneyLabel2 = new Label(_("You give:"));
diff --git a/src/gui/tradewindow.h b/src/gui/tradewindow.h
index e6958ab23..1763771f3 100644
--- a/src/gui/tradewindow.h
+++ b/src/gui/tradewindow.h
@@ -36,11 +36,7 @@ class Item;
class ItemContainer;
class Label;
class ScrollArea;
-
-namespace gcn
-{
- class TextField;
-}
+class TextField;
/**
* Trade dialog.
@@ -173,7 +169,7 @@ class TradeWindow final : public Window,
Button *mAddButton;
Button *mOkButton;
Button *mMoneyChangeButton;
- gcn::TextField *mMoneyField;
+ TextField *mMoneyField;
Status mStatus;
bool mOkOther, mOkMe;
diff --git a/src/gui/unregisterdialog.cpp b/src/gui/unregisterdialog.cpp
index 300912ca4..c9f3d9351 100644
--- a/src/gui/unregisterdialog.cpp
+++ b/src/gui/unregisterdialog.cpp
@@ -46,7 +46,7 @@
UnRegisterDialog::UnRegisterDialog(LoginData *const data):
Window(_("Unregister"), true, nullptr, "unregister.xml"),
- ActionListener(),
+ gcn::ActionListener(),
mLoginData(data),
mPasswordField(new PasswordField(mLoginData->password)),
mUnRegisterButton(new Button(_("Unregister"), "unregister", this)),
diff --git a/src/gui/unregisterdialog.h b/src/gui/unregisterdialog.h
index 5bfb70f39..c9caa2cb4 100644
--- a/src/gui/unregisterdialog.h
+++ b/src/gui/unregisterdialog.h
@@ -30,13 +30,9 @@
class Button;
class LoginData;
class OkDialog;
+class TextField;
class WrongDataNoticeListener;
-namespace gcn
-{
- class TextField;
-}
-
/**
* The Unregister dialog.
*
@@ -64,7 +60,7 @@ class UnRegisterDialog final : public Window, public gcn::ActionListener
private:
LoginData *mLoginData;
- gcn::TextField *mPasswordField;
+ TextField *mPasswordField;
Button *mUnRegisterButton;
Button *mCancelButton;
diff --git a/src/gui/updaterwindow.cpp b/src/gui/updaterwindow.cpp
index 23c51c109..c0f8efba8 100644
--- a/src/gui/updaterwindow.cpp
+++ b/src/gui/updaterwindow.cpp
@@ -137,8 +137,8 @@ UpdaterWindow::UpdaterWindow(const std::string &updateHost,
const bool applyUpdates,
const int updateType):
Window(_("Updating..."), false, nullptr, "update.xml"),
- ActionListener(),
- KeyListener(),
+ gcn::ActionListener(),
+ gcn::KeyListener(),
mDownloadStatus(UPDATE_NEWS),
mUpdateHost(updateHost),
mUpdatesDir(updatesDir),
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index 273b8d306..4d95a4416 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -56,7 +56,7 @@ extern volatile int tick_time;
Viewport::Viewport() :
WindowContainer(),
- MouseListener(),
+ gcn::MouseListener(),
mMap(nullptr),
mScrollRadius(config.getIntValue("ScrollRadius")),
mScrollLaziness(config.getIntValue("ScrollLaziness")),
diff --git a/src/gui/widgets/avatarlistbox.cpp b/src/gui/widgets/avatarlistbox.cpp
index f8a025142..486b6fd2e 100644
--- a/src/gui/widgets/avatarlistbox.cpp
+++ b/src/gui/widgets/avatarlistbox.cpp
@@ -107,7 +107,7 @@ void AvatarListBox::draw(gcn::Graphics *gcnGraphics)
const int fontHeight = getFont()->getHeight();
- const Widget *const parent = mParent;
+ const gcn::Widget *const parent = mParent;
const std::string name = player_node->getName();
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp
index e338ab009..8c27d7b23 100644
--- a/src/gui/widgets/browserbox.cpp
+++ b/src/gui/widgets/browserbox.cpp
@@ -47,7 +47,7 @@
BrowserBox::BrowserBox(const unsigned int mode, const bool opaque) :
gcn::Widget(),
- MouseListener(),
+ gcn::MouseListener(),
mLinkHandler(nullptr),
mMode(mode),
mHighMode(UNDERLINE | BACKGROUND),
diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp
index 4cba0b535..235f72f5c 100644
--- a/src/gui/widgets/button.cpp
+++ b/src/gui/widgets/button.cpp
@@ -66,7 +66,7 @@ Skin *Button::button[BUTTON_COUNT];
Button::Button() :
gcn::Button(),
- WidgetListener(),
+ gcn::WidgetListener(),
mDescription(""), mClickCount(0),
mTag(0),
mVertexes(new GraphicsVertexes()),
@@ -88,7 +88,7 @@ Button::Button() :
Button::Button(const std::string &caption, const std::string &actionEventId,
gcn::ActionListener *const listener) :
gcn::Button(caption),
- WidgetListener(),
+ gcn::WidgetListener(),
mDescription(""),
mClickCount(0),
mTag(0),
@@ -117,7 +117,7 @@ Button::Button(const std::string &caption, const std::string &imageName,
const std::string &actionEventId,
gcn::ActionListener *const listener) :
gcn::Button(caption),
- WidgetListener(),
+ gcn::WidgetListener(),
mDescription(""),
mClickCount(0),
mTag(0),
@@ -147,7 +147,7 @@ Button::Button(const std::string &imageName,
const std::string &actionEventId,
gcn::ActionListener *const listener) :
gcn::Button(""),
- WidgetListener(),
+ gcn::WidgetListener(),
mDescription(""),
mClickCount(0),
mTag(0),
diff --git a/src/gui/widgets/desktop.cpp b/src/gui/widgets/desktop.cpp
index 7cf6b2608..275f57363 100644
--- a/src/gui/widgets/desktop.cpp
+++ b/src/gui/widgets/desktop.cpp
@@ -40,7 +40,7 @@
Desktop::Desktop() :
Container(),
- WidgetListener(),
+ gcn::WidgetListener(),
mWallpaper(nullptr),
mBackgroundColor(Theme::getThemeColor(Theme::BACKGROUND, 128)),
mBackgroundGrayColor(Theme::getThemeColor(Theme::BACKGROUND_GRAY))
diff --git a/src/gui/widgets/extendednamesmodel.cpp b/src/gui/widgets/extendednamesmodel.cpp
index 083ce938e..0a01df626 100644
--- a/src/gui/widgets/extendednamesmodel.cpp
+++ b/src/gui/widgets/extendednamesmodel.cpp
@@ -24,7 +24,6 @@
#include "utils/gettext.h"
-#include <guichan/exception.hpp>
#include <guichan/font.hpp>
#include "debug.h"
diff --git a/src/gui/widgets/flowcontainer.cpp b/src/gui/widgets/flowcontainer.cpp
index 240ec41f7..753fea2ea 100644
--- a/src/gui/widgets/flowcontainer.cpp
+++ b/src/gui/widgets/flowcontainer.cpp
@@ -25,7 +25,7 @@
FlowContainer::FlowContainer(const int boxWidth, const int boxHeight) :
Container(),
- WidgetListener(),
+ gcn::WidgetListener(),
mBoxWidth(boxWidth),
mBoxHeight(boxHeight),
mGridWidth(1),
diff --git a/src/gui/widgets/flowcontainer.h b/src/gui/widgets/flowcontainer.h
index a56b0e2e8..2279a6376 100644
--- a/src/gui/widgets/flowcontainer.h
+++ b/src/gui/widgets/flowcontainer.h
@@ -22,7 +22,7 @@
#ifndef FLOWCONTAINER_H
#define FLOWCONTAINER_H
-#include "container.h"
+#include "gui/widgets/container.h"
#include <guichan/widgetlistener.hpp>
diff --git a/src/gui/widgets/guitable.cpp b/src/gui/widgets/guitable.cpp
index 18e7c37d7..e5e56cbf3 100644
--- a/src/gui/widgets/guitable.cpp
+++ b/src/gui/widgets/guitable.cpp
@@ -62,7 +62,7 @@ protected:
GuiTableActionListener::GuiTableActionListener(GuiTable *table,
gcn::Widget *widget, int row,
int column) :
- ActionListener(),
+ gcn::ActionListener(),
mTable(table),
mRow(row),
mColumn(column),
diff --git a/src/gui/widgets/horizontcontainer.cpp b/src/gui/widgets/horizontcontainer.cpp
index 83a430b47..d08b8adcc 100644
--- a/src/gui/widgets/horizontcontainer.cpp
+++ b/src/gui/widgets/horizontcontainer.cpp
@@ -25,7 +25,7 @@
HorizontContainer::HorizontContainer(const int height, const int spacing) :
Container(),
- WidgetListener(),
+ gcn::WidgetListener(),
mSpacing(spacing),
mCount(0),
mLastX(spacing)
diff --git a/src/gui/widgets/icon.cpp b/src/gui/widgets/icon.cpp
index 0236cde6a..e8893a5f7 100644
--- a/src/gui/widgets/icon.cpp
+++ b/src/gui/widgets/icon.cpp
@@ -30,7 +30,7 @@
#include "debug.h"
Icon::Icon(const std::string &file) :
- Widget(),
+ gcn::Widget(),
mImage(ResourceManager::getInstance()->getImage(file))
{
if (mImage)
@@ -38,7 +38,7 @@ Icon::Icon(const std::string &file) :
}
Icon::Icon(Image *const image) :
- Widget(),
+ gcn::Widget(),
mImage(image)
{
if (mImage)
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index e12a15a6b..d950b28c6 100644
--- a/src/gui/widgets/itemcontainer.cpp
+++ b/src/gui/widgets/itemcontainer.cpp
@@ -49,9 +49,6 @@
#include "debug.h"
-// TODO: Add support for adding items to the item shortcut window (global
-// itemShortcut).
-
static const int BOX_WIDTH = 35;
static const int BOX_HEIGHT = 43;
@@ -156,10 +153,10 @@ class SortItemTypeFunctor final
ItemContainer::ItemContainer(Inventory *const inventory,
const bool forceQuantity) :
- Widget(),
- KeyListener(),
- MouseListener(),
- WidgetListener(),
+ gcn::Widget(),
+ gcn::KeyListener(),
+ gcn::MouseListener(),
+ gcn::WidgetListener(),
mInventory(inventory),
mGridColumns(1),
mGridRows(1),
diff --git a/src/gui/widgets/layouthelper.cpp b/src/gui/widgets/layouthelper.cpp
index c3b219415..4f082f4b2 100644
--- a/src/gui/widgets/layouthelper.cpp
+++ b/src/gui/widgets/layouthelper.cpp
@@ -25,7 +25,7 @@
#include "debug.h"
LayoutHelper::LayoutHelper(gcn::Container *const container) :
- WidgetListener(),
+ gcn::WidgetListener(),
mContainer(container)
{
mContainer->addWidgetListener(this);
diff --git a/src/gui/widgets/popup.cpp b/src/gui/widgets/popup.cpp
index 9a16d8530..eb3bcd64b 100644
--- a/src/gui/widgets/popup.cpp
+++ b/src/gui/widgets/popup.cpp
@@ -38,8 +38,8 @@
Popup::Popup(const std::string &name, std::string skin) :
Container(),
- MouseListener(),
- WidgetListener(),
+ gcn::MouseListener(),
+ gcn::WidgetListener(),
mPopupName(name),
mMinWidth(100),
mMinHeight(40),
diff --git a/src/gui/widgets/progressbar.cpp b/src/gui/widgets/progressbar.cpp
index 5ab6d1280..7667d399e 100644
--- a/src/gui/widgets/progressbar.cpp
+++ b/src/gui/widgets/progressbar.cpp
@@ -44,7 +44,7 @@ ProgressBar::ProgressBar(float progress,
const int width, const int height,
const int color):
gcn::Widget(),
- WidgetListener(),
+ gcn::WidgetListener(),
mProgress(progress),
mProgressToGo(progress),
mSmoothProgress(true),
diff --git a/src/gui/widgets/progressindicator.cpp b/src/gui/widgets/progressindicator.cpp
index 6ff31fd0e..9b6726ce9 100644
--- a/src/gui/widgets/progressindicator.cpp
+++ b/src/gui/widgets/progressindicator.cpp
@@ -30,8 +30,6 @@
#include "resources/imageset.h"
#include "resources/resourcemanager.h"
-#include <guichan/widgets/label.hpp>
-
#include "debug.h"
ProgressIndicator::ProgressIndicator() :
diff --git a/src/gui/widgets/setupitem.cpp b/src/gui/widgets/setupitem.cpp
index 82d5132a3..3a1db94bd 100644
--- a/src/gui/widgets/setupitem.cpp
+++ b/src/gui/widgets/setupitem.cpp
@@ -50,7 +50,7 @@
SetupItem::SetupItem(std::string text, std::string description,
std::string keyName, SetupTabScroll *const parent,
std::string eventName, const bool mainConfig) :
- ActionListener(),
+ gcn::ActionListener(),
mText(text),
mDescription(description),
mKeyName(keyName),
@@ -69,7 +69,7 @@ SetupItem::SetupItem(std::string text, std::string description,
std::string keyName, SetupTabScroll *const parent,
std::string eventName, std::string def,
const bool mainConfig) :
- ActionListener(),
+ gcn::ActionListener(),
mText(text),
mDescription(description),
mKeyName(keyName),
diff --git a/src/gui/widgets/tab.cpp b/src/gui/widgets/tab.cpp
index af3a18560..b6133af0e 100644
--- a/src/gui/widgets/tab.cpp
+++ b/src/gui/widgets/tab.cpp
@@ -36,8 +36,6 @@
#include "utils/dtor.h"
-#include <guichan/widgets/label.hpp>
-
#include "debug.h"
int Tab::mInstances = 0;
@@ -66,11 +64,9 @@ Tab::Tab() :
gcn::BasicContainer(),
gcn::MouseListener(),
gcn::WidgetListener(),
-
mLabel(new Label),
mHasMouse(false),
mTabbedArea(nullptr),
-
mTabColor(&Theme::getThemeColor(Theme::TAB)),
mTabHighlightedColor(&Theme::getThemeColor(Theme::TAB_HIGHLIGHTED)),
mTabSelectedColor(&Theme::getThemeColor(Theme::TAB_SELECTED)),
diff --git a/src/gui/widgets/tab.h b/src/gui/widgets/tab.h
index fd3353707..fe9fd3b32 100644
--- a/src/gui/widgets/tab.h
+++ b/src/gui/widgets/tab.h
@@ -25,9 +25,6 @@
#include <guichan/basiccontainer.hpp>
#include <guichan/mouselistener.hpp>
-
-#include <guichan/widgets/label.hpp>
-
#include <guichan/widgetlistener.hpp>
#include "localconsts.h"
diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp
index b1d0ca35e..d41af4542 100644
--- a/src/gui/widgets/tabbedarea.cpp
+++ b/src/gui/widgets/tabbedarea.cpp
@@ -40,12 +40,10 @@ TabbedArea::TabbedArea() :
gcn::KeyListener(),
gcn::MouseListener(),
gcn::WidgetListener(),
-
mSelectedTab(nullptr),
mTabContainer(new gcn::Container()),
mWidgetContainer(new gcn::Container()),
mOpaque(false),
-
mTabsWidth(0),
mVisibleTabsWidth(0),
mTabScrollIndex(0),
@@ -509,7 +507,7 @@ void TabbedArea::adjustTabPositions()
void TabbedArea::action(const gcn::ActionEvent& actionEvent)
{
- Widget *const source = actionEvent.getSource();
+ gcn::Widget *const source = actionEvent.getSource();
Tab *const tab = dynamic_cast<Tab *const>(source);
if (tab)
@@ -597,7 +595,7 @@ void TabbedArea::removeAll()
{
const int idx = getNumberOfTabs() - 1;
Tab *tab = mTabs[idx].first;
- Widget *widget = mTabs[idx].second;
+ gcn::Widget *widget = mTabs[idx].second;
removeTab(tab);
delete tab;
delete widget;