summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-10-14 19:48:40 +0300
committerAndrei Karas <akaras@inbox.ru>2012-10-14 19:48:40 +0300
commitdb461ee046e63b7148174c40e05de76c5d7be31a (patch)
tree06e4386463e495b8e74e7dbc2bfea0da6c34413a
parent066488a6f4d086b57f4fe32e8799c207552cccb7 (diff)
downloadmanaplus-db461ee046e63b7148174c40e05de76c5d7be31a.tar.gz
manaplus-db461ee046e63b7148174c40e05de76c5d7be31a.tar.bz2
manaplus-db461ee046e63b7148174c40e05de76c5d7be31a.tar.xz
manaplus-db461ee046e63b7148174c40e05de76c5d7be31a.zip
Replace gcn::Button to Button in all classes.
-rw-r--r--src/gui/botcheckerwindow.h8
-rw-r--r--src/gui/buydialog.h12
-rw-r--r--src/gui/buyselldialog.h7
-rw-r--r--src/gui/changeemaildialog.h6
-rw-r--r--src/gui/changepassworddialog.h6
-rw-r--r--src/gui/charcreatedialog.h20
-rw-r--r--src/gui/charselectdialog.h14
-rw-r--r--src/gui/confirmdialog.cpp6
-rw-r--r--src/gui/editdialog.cpp2
-rw-r--r--src/gui/equipmentwindow.h8
-rw-r--r--src/gui/inventorywindow.h20
-rw-r--r--src/gui/logindialog.h8
-rw-r--r--src/gui/okdialog.cpp2
-rw-r--r--src/gui/popupmenu.cpp4
-rw-r--r--src/gui/quitdialog.h7
-rw-r--r--src/gui/registerdialog.h6
-rw-r--r--src/gui/selldialog.h12
-rw-r--r--src/gui/setup.h2
-rw-r--r--src/gui/setup_input.h11
-rw-r--r--src/gui/setup_joystick.h4
-rw-r--r--src/gui/setup_relations.h4
-rw-r--r--src/gui/setup_video.h4
-rw-r--r--src/gui/shopwindow.h20
-rw-r--r--src/gui/statuswindow.h8
-rw-r--r--src/gui/textdialog.cpp2
-rw-r--r--src/gui/textdialog.h8
-rw-r--r--src/gui/tradewindow.h8
-rw-r--r--src/gui/unregisterdialog.h6
-rw-r--r--src/gui/whoisonline.h8
-rw-r--r--src/gui/widgets/tabbedarea.h10
-rw-r--r--src/gui/windowmenu.cpp6
-rw-r--r--src/gui/windowmenu.h8
-rw-r--r--src/gui/worldselectdialog.h6
33 files changed, 115 insertions, 148 deletions
diff --git a/src/gui/botcheckerwindow.h b/src/gui/botcheckerwindow.h
index 0d93cc14c..2dc9edd38 100644
--- a/src/gui/botcheckerwindow.h
+++ b/src/gui/botcheckerwindow.h
@@ -37,16 +37,12 @@ struct BOTCHK final
short lv, sp;
};
+class Button;
class GuiTable;
class ScrollArea;
class UsersTableModel;
class StaticTableModel;
-namespace gcn
-{
- class Button;
-}
-
class BotCheckerWindow final : public Window,
public gcn::ActionListener,
public ConfigListener
@@ -84,7 +80,7 @@ class BotCheckerWindow final : public Window,
ScrollArea *playersScrollArea;
StaticTableModel *mPlayerTableTitleModel;
GuiTable *mPlayerTitleTable;
- gcn::Button *mIncButton;
+ Button *mIncButton;
int mLastUpdateTime;
bool mNeedUpdate;
bool mEnabled;
diff --git a/src/gui/buydialog.h b/src/gui/buydialog.h
index 04d4205d7..01d99e194 100644
--- a/src/gui/buydialog.h
+++ b/src/gui/buydialog.h
@@ -28,6 +28,7 @@
#include <guichan/actionlistener.hpp>
#include <guichan/selectionlistener.hpp>
+class Button;
class ShopItems;
class ShopListBox;
class IntTextField;
@@ -36,7 +37,6 @@ class ListBox;
namespace gcn
{
- class Button;
class ScrollArea;
class Slider;
}
@@ -129,11 +129,11 @@ class BuyDialog final : public Window, public gcn::ActionListener,
int mNpcId;
- gcn::Button *mBuyButton;
- gcn::Button *mQuitButton;
- gcn::Button *mAddMaxButton;
- gcn::Button *mIncreaseButton;
- gcn::Button *mDecreaseButton;
+ Button *mBuyButton;
+ Button *mQuitButton;
+ Button *mAddMaxButton;
+ Button *mIncreaseButton;
+ Button *mDecreaseButton;
ShopListBox *mShopItemList;
gcn::ScrollArea *mScrollArea;
Label *mMoneyLabel;
diff --git a/src/gui/buyselldialog.h b/src/gui/buyselldialog.h
index 1eb6d34f4..08a948145 100644
--- a/src/gui/buyselldialog.h
+++ b/src/gui/buyselldialog.h
@@ -27,10 +27,7 @@
#include <guichan/actionlistener.hpp>
-namespace gcn
-{
- class Button;
-}
+class Button;
/**
* A dialog to choose between buying or selling at a shop.
@@ -80,7 +77,7 @@ class BuySellDialog final : public Window, public gcn::ActionListener
int mNpcId;
std::string mNick;
- gcn::Button *mBuyButton;
+ Button *mBuyButton;
};
#endif
diff --git a/src/gui/changeemaildialog.h b/src/gui/changeemaildialog.h
index c8e99a2c5..bef7a9d71 100644
--- a/src/gui/changeemaildialog.h
+++ b/src/gui/changeemaildialog.h
@@ -27,13 +27,13 @@
#include <guichan/actionlistener.hpp>
+class Button;
class LoginData;
class OkDialog;
class WrongDataNoticeListener;
namespace gcn
{
- class Button;
class TextField;
}
@@ -74,8 +74,8 @@ class ChangeEmailDialog final : public Window, public gcn::ActionListener
gcn::TextField *mFirstEmailField;
gcn::TextField *mSecondEmailField;
- gcn::Button *mChangeEmailButton;
- gcn::Button *mCancelButton;
+ Button *mChangeEmailButton;
+ Button *mCancelButton;
WrongDataNoticeListener *mWrongDataNoticeListener;
diff --git a/src/gui/changepassworddialog.h b/src/gui/changepassworddialog.h
index 6dd987a32..00631e105 100644
--- a/src/gui/changepassworddialog.h
+++ b/src/gui/changepassworddialog.h
@@ -27,13 +27,13 @@
#include <guichan/actionlistener.hpp>
+class Button;
class LoginData;
class OkDialog;
class WrongDataNoticeListener;
namespace gcn
{
- class Button;
class TextField;
}
@@ -69,8 +69,8 @@ class ChangePasswordDialog final : public Window, public gcn::ActionListener
gcn::TextField *mFirstPassField;
gcn::TextField *mSecondPassField;
- gcn::Button *mChangePassButton;
- gcn::Button *mCancelButton;
+ Button *mChangePassButton;
+ Button *mCancelButton;
WrongDataNoticeListener *mWrongDataNoticeListener;
diff --git a/src/gui/charcreatedialog.h b/src/gui/charcreatedialog.h
index b7257dd44..a6a82f94a 100644
--- a/src/gui/charcreatedialog.h
+++ b/src/gui/charcreatedialog.h
@@ -106,21 +106,21 @@ class CharCreateDialog final : public Window,
TextField *mNameField;
Label *mNameLabel;
- gcn::Button *mNextHairColorButton;
- gcn::Button *mPrevHairColorButton;
+ Button *mNextHairColorButton;
+ Button *mPrevHairColorButton;
Label *mHairColorLabel;
Label *mHairColorNameLabel;
- gcn::Button *mNextHairStyleButton;
- gcn::Button *mPrevHairStyleButton;
+ Button *mNextHairStyleButton;
+ Button *mPrevHairStyleButton;
Label *mHairStyleLabel;
Label *mHairStyleNameLabel;
- gcn::Button *mNextRaceButton;
- gcn::Button *mPrevRaceButton;
+ Button *mNextRaceButton;
+ Button *mPrevRaceButton;
Label *mRaceLabel;
Label *mRaceNameLabel;
- gcn::Button *mActionButton;
- gcn::Button *mRotateButton;
+ Button *mActionButton;
+ Button *mRotateButton;
gcn::RadioButton *mMale;
gcn::RadioButton *mFemale;
@@ -134,8 +134,8 @@ class CharCreateDialog final : public Window,
int mMaxPoints;
int mUsedPoints;
- gcn::Button *mCreateButton;
- gcn::Button *mCancelButton;
+ Button *mCreateButton;
+ Button *mCancelButton;
int mRace;
diff --git a/src/gui/charselectdialog.h b/src/gui/charselectdialog.h
index f12084dc5..1bf0ab88a 100644
--- a/src/gui/charselectdialog.h
+++ b/src/gui/charselectdialog.h
@@ -33,6 +33,7 @@
#include <guichan/actionlistener.hpp>
#include <guichan/keylistener.hpp>
+class Button;
class CharacterDisplay;
class Label;
class LocalPlayer;
@@ -40,11 +41,6 @@ class LoginData;
class PlayerBox;
class TextDialog;
-namespace gcn
-{
- class Button;
-}
-
namespace Net
{
class CharHandler;
@@ -117,10 +113,10 @@ class CharSelectDialog final : public Window,
Label *mAccountNameLabel;
Label *mLastLoginLabel;
- gcn::Button *mSwitchLoginButton;
- gcn::Button *mChangePasswordButton;
- gcn::Button *mUnregisterButton;
- gcn::Button *mChangeEmailButton;
+ Button *mSwitchLoginButton;
+ Button *mChangePasswordButton;
+ Button *mUnregisterButton;
+ Button *mChangeEmailButton;
/** The player boxes */
std::vector<CharacterDisplay*> mCharacterEntries;
diff --git a/src/gui/confirmdialog.cpp b/src/gui/confirmdialog.cpp
index b3ced2cde..66b32a6da 100644
--- a/src/gui/confirmdialog.cpp
+++ b/src/gui/confirmdialog.cpp
@@ -46,9 +46,9 @@ ConfirmDialog::ConfirmDialog(const std::string &title, const std::string &msg,
mTextBox->setOpaque(false);
mTextBox->setTextWrapped(msg, 260);
- gcn::Button *const yesButton = new Button(_("Yes"), "yes", this);
- gcn::Button *const noButton = new Button(_("No"), "no", this);
- gcn::Button *ignoreButton = nullptr;
+ Button *const yesButton = new Button(_("Yes"), "yes", this);
+ Button *const noButton = new Button(_("No"), "no", this);
+ Button *ignoreButton = nullptr;
if (ignore)
ignoreButton = new Button(_("Ignore"), "ignore", this);
diff --git a/src/gui/editdialog.cpp b/src/gui/editdialog.cpp
index cb96adca3..776254463 100644
--- a/src/gui/editdialog.cpp
+++ b/src/gui/editdialog.cpp
@@ -42,7 +42,7 @@ EditDialog::EditDialog(const std::string &title, const std::string &msg,
mTextField->setText(msg);
mEventOk = eventOk;
- gcn::Button *const okButton = new Button(_("OK"), mEventOk, this);
+ Button *const okButton = new Button(_("OK"), mEventOk, this);
const int numRows = 1;
const int fontHeight = getFont()->getHeight();
diff --git a/src/gui/equipmentwindow.h b/src/gui/equipmentwindow.h
index 4d20a8447..df086f962 100644
--- a/src/gui/equipmentwindow.h
+++ b/src/gui/equipmentwindow.h
@@ -37,6 +37,7 @@
#include <vector>
class Being;
+class Button;
class Inventory;
class Image;
class ImageSet;
@@ -44,11 +45,6 @@ class Item;
class ItemPopup;
class PlayerBox;
-namespace gcn
-{
- class Button;
-}
-
struct EquipmentBox final
{
EquipmentBox(const int x0, const int y0, Image *const img) :
@@ -130,7 +126,7 @@ class EquipmentWindow final : public Window, public gcn::ActionListener
ItemPopup *mItemPopup;
PlayerBox *mPlayerBox;
- gcn::Button *mUnequip;
+ Button *mUnequip;
int mSelected; /**< Index of selected item. */
bool mForing;
diff --git a/src/gui/inventorywindow.h b/src/gui/inventorywindow.h
index 39969364d..3951958b5 100644
--- a/src/gui/inventorywindow.h
+++ b/src/gui/inventorywindow.h
@@ -35,6 +35,7 @@
#include <guichan/keylistener.hpp>
#include <guichan/selectionlistener.hpp>
+class Button;
class DropDown;
class Item;
class ItemContainer;
@@ -46,7 +47,6 @@ class TextField;
namespace gcn
{
- class Button;
class Label;
}
@@ -165,15 +165,15 @@ class InventoryWindow final : public Window,
std::string mWeight, mSlots;
- gcn::Button *mUseButton;
- gcn::Button *mDropButton;
- gcn::Button *mSplitButton;
- gcn::Button *mOutfitButton;
- gcn::Button *mShopButton;
- gcn::Button *mEquipmentButton;
- gcn::Button *mStoreButton;
- gcn::Button *mRetrieveButton;
- gcn::Button *mCloseButton;
+ Button *mUseButton;
+ Button *mDropButton;
+ Button *mSplitButton;
+ Button *mOutfitButton;
+ Button *mShopButton;
+ Button *mEquipmentButton;
+ Button *mStoreButton;
+ Button *mRetrieveButton;
+ Button *mCloseButton;
ProgressBar *mWeightBar;
ProgressBar *mSlotsBar;
diff --git a/src/gui/logindialog.h b/src/gui/logindialog.h
index 190a50f65..d8df0d805 100644
--- a/src/gui/logindialog.h
+++ b/src/gui/logindialog.h
@@ -32,6 +32,7 @@
#include <string>
#include <vector>
+class Button;
class DropDown;
class Label;
class LoginData;
@@ -40,7 +41,6 @@ class UpdateTypeModel;
namespace gcn
{
- class Button;
class CheckBox;
class TextField;
}
@@ -95,9 +95,9 @@ class LoginDialog final : public Window, public gcn::ActionListener,
Label *mUpdateHostLabel;
UpdateTypeModel *mUpdateTypeModel;
DropDown *mUpdateTypeDropDown;
- gcn::Button *mServerButton;
- gcn::Button *mLoginButton;
- gcn::Button *mRegisterButton;
+ Button *mServerButton;
+ Button *mLoginButton;
+ Button *mRegisterButton;
gcn::CheckBox *mCustomUpdateHost;
gcn::TextField *mUpdateHostText;
UpdateListModel *mUpdateListModel;
diff --git a/src/gui/okdialog.cpp b/src/gui/okdialog.cpp
index 38174c9bd..22ae9d41a 100644
--- a/src/gui/okdialog.cpp
+++ b/src/gui/okdialog.cpp
@@ -46,7 +46,7 @@ OkDialog::OkDialog(const std::string &title, const std::string &msg,
mTextBox->setOpaque(false);
mTextBox->setTextWrapped(msg, 260);
- gcn::Button *const okButton = new Button(_("OK"), "ok", this);
+ Button *const okButton = new Button(_("OK"), "ok", this);
const int numRows = mTextBox->getNumberOfRows();
const int fontHeight = getFont()->getHeight();
diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp
index 379844983..be03f2ef1 100644
--- a/src/gui/popupmenu.cpp
+++ b/src/gui/popupmenu.cpp
@@ -1873,8 +1873,8 @@ void PopupMenu::showPopup(const int x, const int y, Button *const button)
mY = y;
mBrowserBox->clearRows();
- std::vector <gcn::Button*> names = windowMenu->getButtons();
- for (std::vector <gcn::Button*>::const_iterator it = names.begin(),
+ std::vector <Button*> names = windowMenu->getButtons();
+ for (std::vector <Button*>::const_iterator it = names.begin(),
it_end = names.end(); it != it_end; ++ it)
{
const Button *const btn = dynamic_cast<Button*>(*it);
diff --git a/src/gui/quitdialog.h b/src/gui/quitdialog.h
index 38bea4772..05f6e0139 100644
--- a/src/gui/quitdialog.h
+++ b/src/gui/quitdialog.h
@@ -30,9 +30,10 @@
#include <vector>
+class Button;
+
namespace gcn
{
- class Button;
class RadioButton;
}
@@ -75,8 +76,8 @@ class QuitDialog final : public Window, public gcn::ActionListener,
gcn::RadioButton *mForceQuit;
gcn::RadioButton *mSwitchAccountServer;
gcn::RadioButton *mSwitchCharacter;
- gcn::Button *mOkButton;
- gcn::Button *mCancelButton;
+ Button *mOkButton;
+ Button *mCancelButton;
QuitDialog **mMyPointer;
};
diff --git a/src/gui/registerdialog.h b/src/gui/registerdialog.h
index 074fbd6fe..4c9edd926 100644
--- a/src/gui/registerdialog.h
+++ b/src/gui/registerdialog.h
@@ -30,12 +30,12 @@
#include <string>
+class Button;
class LoginData;
class OkDialog;
namespace gcn
{
- class Button;
class RadioButton;
class TextField;
}
@@ -106,8 +106,8 @@ class RegisterDialog final : public Window, public gcn::ActionListener,
gcn::TextField *mPasswordField;
gcn::TextField *mConfirmField;
gcn::TextField *mEmailField;
- gcn::Button *mRegisterButton;
- gcn::Button *mCancelButton;
+ Button *mRegisterButton;
+ Button *mCancelButton;
gcn::RadioButton *mMaleButton;
gcn::RadioButton *mFemaleButton;
gcn::RadioButton *mOtherButton;
diff --git a/src/gui/selldialog.h b/src/gui/selldialog.h
index d77ad689c..ec30c2d64 100644
--- a/src/gui/selldialog.h
+++ b/src/gui/selldialog.h
@@ -30,6 +30,7 @@
#include <SDL_types.h>
+class Button;
class Item;
class Label;
class ShopItems;
@@ -37,7 +38,6 @@ class ShopListBox;
namespace gcn
{
- class Button;
class ScrollArea;
class Slider;
}
@@ -130,11 +130,11 @@ class SellDialog final : public Window,
int mNpcId;
- gcn::Button *mSellButton;
- gcn::Button *mQuitButton;
- gcn::Button *mAddMaxButton;
- gcn::Button *mIncreaseButton;
- gcn::Button *mDecreaseButton;
+ Button *mSellButton;
+ Button *mQuitButton;
+ Button *mAddMaxButton;
+ Button *mIncreaseButton;
+ Button *mDecreaseButton;
ShopListBox *mShopItemList;
gcn::ScrollArea *mScrollArea;
Label *mMoneyLabel;
diff --git a/src/gui/setup.h b/src/gui/setup.h
index 3b22ed00b..45f9d202a 100644
--- a/src/gui/setup.h
+++ b/src/gui/setup.h
@@ -79,7 +79,7 @@ class Setup final : public Window, public gcn::ActionListener
private:
std::list<SetupTab*> mTabs;
std::list<Window*> mWindowsToReset;
- gcn::Button *mResetWindows;
+ Button *mResetWindows;
TabbedArea *mPanel;
};
diff --git a/src/gui/setup_input.h b/src/gui/setup_input.h
index 9ce2a6cb3..87b09c62b 100644
--- a/src/gui/setup_input.h
+++ b/src/gui/setup_input.h
@@ -28,12 +28,13 @@
#include <guichan/actionlistener.hpp>
-#include <guichan/widgets/button.hpp>
#include <guichan/widgets/listbox.hpp>
#include <string>
+class Button;
class TabStrip;
+
struct SetupActionData;
class Setup_Input final : public SetupTab
@@ -91,10 +92,10 @@ class Setup_Input final : public SetupTab
class KeyListModel *mKeyListModel;
gcn::ListBox *mKeyList;
- gcn::Button *mAssignKeyButton;
- gcn::Button *mUnassignKeyButton;
- gcn::Button *mDefaultButton;
- gcn::Button *mResetKeysButton;
+ Button *mAssignKeyButton;
+ Button *mUnassignKeyButton;
+ Button *mDefaultButton;
+ Button *mResetKeysButton;
TabStrip *mTabs;
bool mKeySetting; /**< flag to check if key being set. */
diff --git a/src/gui/setup_joystick.h b/src/gui/setup_joystick.h
index cd80d51a0..cab6039fc 100644
--- a/src/gui/setup_joystick.h
+++ b/src/gui/setup_joystick.h
@@ -27,13 +27,13 @@
#include <guichan/actionlistener.hpp>
+class Button;
class DropDown;
class Label;
class NamesModel;
namespace gcn
{
- class Button;
class CheckBox;
}
@@ -56,7 +56,7 @@ class Setup_Joystick final : public SetupTab
private:
Label *mCalibrateLabel;
- gcn::Button *mCalibrateButton;
+ Button *mCalibrateButton;
bool mOriginalJoystickEnabled;
gcn::CheckBox *mJoystickEnabled;
NamesModel *mNamesModel;
diff --git a/src/gui/setup_relations.h b/src/gui/setup_relations.h
index 423eaef01..61bd541b9 100644
--- a/src/gui/setup_relations.h
+++ b/src/gui/setup_relations.h
@@ -29,6 +29,7 @@
#include <guichan/actionlistener.hpp>
+class Button;
class EditDialog;
class GuiTable;
class PlayerTableModel;
@@ -36,7 +37,6 @@ class StaticTableModel;
namespace gcn
{
- class Button;
class CheckBox;
class DropDown;
class ListModel;
@@ -77,7 +77,7 @@ private:
gcn::CheckBox *mDefaultTrading;
gcn::CheckBox *mDefaultWhisper;
- gcn::Button *mDeleteButton;
+ Button *mDeleteButton;
gcn::ListModel *mIgnoreActionChoicesModel;
gcn::DropDown *mIgnoreActionChoicesBox;
diff --git a/src/gui/setup_video.h b/src/gui/setup_video.h
index 99c8a2269..9b0fec0e4 100644
--- a/src/gui/setup_video.h
+++ b/src/gui/setup_video.h
@@ -30,6 +30,7 @@
#include <guichan/actionlistener.hpp>
#include <guichan/keylistener.hpp>
+class Button;
class Label;
class ModeListModel;
class OpenGLListModel;
@@ -37,7 +38,6 @@ class TextDialog;
namespace gcn
{
- class Button;
class CheckBox;
class DropDown;
class ListBox;
@@ -91,7 +91,7 @@ class Setup_Video final : public SetupTab, public gcn::KeyListener
gcn::Slider *mAltFpsSlider;
Label *mAltFpsLabel;
- gcn::Button *mDetectButton;
+ Button *mDetectButton;
TextDialog *mDialog;
};
diff --git a/src/gui/shopwindow.h b/src/gui/shopwindow.h
index 7474a1be2..123c8655a 100644
--- a/src/gui/shopwindow.h
+++ b/src/gui/shopwindow.h
@@ -28,6 +28,7 @@
#include <guichan/actionlistener.hpp>
#include <guichan/selectionlistener.hpp>
+class Button;
class CheckBox;
class Item;
class Label;
@@ -38,7 +39,6 @@ class ShopListBox;
namespace gcn
{
- class Button;
class CheckBox;
class ScrollArea;
}
@@ -145,7 +145,7 @@ class ShopWindow final : public Window, public gcn::ActionListener,
typedef std::list<ShopWindow*> DialogList;
static DialogList instances;
- gcn::Button *mCloseButton;
+ Button *mCloseButton;
ShopItems *mBuyShopItems;
ShopItems *mSellShopItems;
@@ -156,14 +156,14 @@ class ShopWindow final : public Window, public gcn::ActionListener,
gcn::ScrollArea *mSellScrollArea;
Label *mBuyLabel;
Label *mSellLabel;
- gcn::Button *mBuyAddButton;
- gcn::Button *mBuyDeleteButton;
- gcn::Button *mBuyAnnounceButton;
- gcn::Button *mBuyAuctionButton;
- gcn::Button *mSellAddButton;
- gcn::Button *mSellDeleteButton;
- gcn::Button *mSellAnnounceButton;
- gcn::Button *mSellAuctionButton;
+ Button *mBuyAddButton;
+ Button *mBuyDeleteButton;
+ Button *mBuyAnnounceButton;
+ Button *mBuyAuctionButton;
+ Button *mSellAddButton;
+ Button *mSellDeleteButton;
+ Button *mSellAnnounceButton;
+ Button *mSellAuctionButton;
gcn::CheckBox *mAnnounceLinks;
int mSelectedItem;
diff --git a/src/gui/statuswindow.h b/src/gui/statuswindow.h
index 8f74951eb..7c3c2d564 100644
--- a/src/gui/statuswindow.h
+++ b/src/gui/statuswindow.h
@@ -32,16 +32,12 @@
#include <map>
class AttrDisplay;
+class Button;
class Label;
class ProgressBar;
class ScrollArea;
class VertContainer;
-namespace gcn
-{
- class Button;
-}
-
/**
* The player status dialog.
*
@@ -118,7 +114,7 @@ class StatusWindow final : public Window,
Label *mCharacterPointsLabel;
Label *mCorrectionPointsLabel;
- gcn::Button *mCopyButton;
+ Button *mCopyButton;
typedef std::map<int, AttrDisplay*> Attrs;
Attrs mAttrs;
diff --git a/src/gui/textdialog.cpp b/src/gui/textdialog.cpp
index 7d5b35c85..879505f64 100644
--- a/src/gui/textdialog.cpp
+++ b/src/gui/textdialog.cpp
@@ -48,7 +48,7 @@ TextDialog::TextDialog(const std::string &title, const std::string &msg,
keyboard.setEnabled(false);
Label *const textLabel = new Label(msg);
- gcn::Button *const cancelButton = new Button(_("Cancel"), "CANCEL", this);
+ Button *const cancelButton = new Button(_("Cancel"), "CANCEL", this);
place(0, 0, textLabel, 4);
if (isPassword)
diff --git a/src/gui/textdialog.h b/src/gui/textdialog.h
index 33c9a5bd1..2cd95d1e8 100644
--- a/src/gui/textdialog.h
+++ b/src/gui/textdialog.h
@@ -27,14 +27,10 @@
#include <guichan/actionlistener.hpp>
+class Button;
class PasswordField;
class TextField;
-namespace gcn
-{
- class Button;
-}
-
/**
* An option dialog.
*
@@ -77,7 +73,7 @@ private:
TextField *mTextField;
PasswordField *mPasswordField;
- gcn::Button *mOkButton;
+ Button *mOkButton;
bool mEnabledKeyboard;
};
diff --git a/src/gui/tradewindow.h b/src/gui/tradewindow.h
index c53afd21e..8b4854b6d 100644
--- a/src/gui/tradewindow.h
+++ b/src/gui/tradewindow.h
@@ -30,6 +30,7 @@
#include <memory>
+class Button;
class Inventory;
class Item;
class ItemContainer;
@@ -38,7 +39,6 @@ class ScrollArea;
namespace gcn
{
- class Button;
class TextField;
}
@@ -170,9 +170,9 @@ class TradeWindow final : public Window,
ItemContainer *mPartnerItemContainer;
Label *mMoneyLabel;
- gcn::Button *mAddButton;
- gcn::Button *mOkButton;
- gcn::Button *mMoneyChangeButton;
+ Button *mAddButton;
+ Button *mOkButton;
+ Button *mMoneyChangeButton;
gcn::TextField *mMoneyField;
Status mStatus;
diff --git a/src/gui/unregisterdialog.h b/src/gui/unregisterdialog.h
index fc16909b7..5d583a07b 100644
--- a/src/gui/unregisterdialog.h
+++ b/src/gui/unregisterdialog.h
@@ -27,13 +27,13 @@
#include <guichan/actionlistener.hpp>
+class Button;
class LoginData;
class OkDialog;
class WrongDataNoticeListener;
namespace gcn
{
- class Button;
class TextField;
}
@@ -66,8 +66,8 @@ class UnRegisterDialog final : public Window, public gcn::ActionListener
gcn::TextField *mPasswordField;
- gcn::Button *mUnRegisterButton;
- gcn::Button *mCancelButton;
+ Button *mUnRegisterButton;
+ Button *mCancelButton;
WrongDataNoticeListener *mWrongDataNoticeListener;
};
diff --git a/src/gui/whoisonline.h b/src/gui/whoisonline.h
index 6993a77e6..d6be4d14e 100644
--- a/src/gui/whoisonline.h
+++ b/src/gui/whoisonline.h
@@ -37,15 +37,11 @@
#include <guichan/actionlistener.hpp>
class BrowserBox;
+class Button;
class ScrollArea;
struct SDL_Thread;
-namespace gcn
-{
- class Button;
-}
-
class OnlinePlayer final
{
public:
@@ -214,7 +210,7 @@ private:
std::set<OnlinePlayer*> mOnlinePlayers;
std::set<std::string> mOnlineNicks;
- gcn::Button *mUpdateButton;
+ Button *mUpdateButton;
bool mAllowUpdate;
bool mShowLevel;
bool mUpdateOnlineList;
diff --git a/src/gui/widgets/tabbedarea.h b/src/gui/widgets/tabbedarea.h
index b7e5f8154..bb354b7f8 100644
--- a/src/gui/widgets/tabbedarea.h
+++ b/src/gui/widgets/tabbedarea.h
@@ -185,7 +185,7 @@ class TabbedArea final : public gcn::ActionListener,
typedef std::vector <std::pair<Tab*, gcn::Widget*> > TabContainer;
/** The tab arrows */
- gcn::Button *mArrowButton[2];
+ Button *mArrowButton[2];
/** Check whether the arrow should be clickable */
void updateArrowEnableState();
@@ -196,8 +196,6 @@ class TabbedArea final : public gcn::ActionListener,
*/
void updateTabsWidth();
-
-
Tab* mSelectedTab;
gcn::Container* mTabContainer;
@@ -210,10 +208,6 @@ class TabbedArea final : public gcn::ActionListener,
bool mOpaque;
-
-
-
-
/**
* The overall width of all tab.
*/
@@ -230,8 +224,6 @@ class TabbedArea final : public gcn::ActionListener,
*/
int mVisibleTabsWidth;
-
-
/**
* The tab scroll index. When scrolling with the arrows, the tabs
* must be displayed according to the current index.
diff --git a/src/gui/windowmenu.cpp b/src/gui/windowmenu.cpp
index ad4c6970a..40e004fdb 100644
--- a/src/gui/windowmenu.cpp
+++ b/src/gui/windowmenu.cpp
@@ -133,7 +133,7 @@ WindowMenu::~WindowMenu()
delete mTextPopup;
mTextPopup = nullptr;
mButtonNames.clear();
- for (std::vector <gcn::Button*>::iterator it = mButtons.begin(),
+ for (std::vector <Button*>::iterator it = mButtons.begin(),
it_end = mButtons.end(); it != it_end; ++it)
{
Button *btn = dynamic_cast<Button*>(*it);
@@ -330,7 +330,7 @@ void WindowMenu::showButton(const std::string &name, const bool visible)
void WindowMenu::updateButtons()
{
int x = 0, h = 0;
- std::vector <gcn::Button*>::const_iterator it, it_end;
+ std::vector <Button*>::const_iterator it, it_end;
for (it = mButtons.begin(), it_end = mButtons.end(); it != it_end; ++it)
safeRemove(*it);
for (it = mButtons.begin(), it_end = mButtons.end(); it != it_end; ++it)
@@ -374,7 +374,7 @@ void WindowMenu::loadButtons()
void WindowMenu::saveButtons()
{
int i = 0;
- for (std::vector <gcn::Button*>::iterator it = mButtons.begin(),
+ for (std::vector <Button*>::iterator it = mButtons.begin(),
it_end = mButtons.end();
it != it_end; ++it)
{
diff --git a/src/gui/windowmenu.h b/src/gui/windowmenu.h
index 7ce1d0830..a6d55de68 100644
--- a/src/gui/windowmenu.h
+++ b/src/gui/windowmenu.h
@@ -65,10 +65,10 @@ class WindowMenu final : public Container,
void mouseExited(gcn::MouseEvent& mouseEvent A_UNUSED) override;
- std::map <std::string, gcn::Button*> &getButtonNames()
+ std::map <std::string, Button*> &getButtonNames()
{ return mButtonNames; }
- std::vector <gcn::Button*> &getButtons()
+ std::vector <Button*> &getButtons()
{ return mButtons; }
void showButton(const std::string &name, const bool visible);
@@ -91,8 +91,8 @@ class WindowMenu final : public Container,
void updateButtons();
TextPopup *mTextPopup;
- std::vector <gcn::Button*> mButtons;
- std::map <std::string, gcn::Button*> mButtonNames;
+ std::vector <Button*> mButtons;
+ std::map <std::string, Button*> mButtonNames;
bool mHaveMouse;
int mAutoHide;
};
diff --git a/src/gui/worldselectdialog.h b/src/gui/worldselectdialog.h
index f2badfaf1..fb405616f 100644
--- a/src/gui/worldselectdialog.h
+++ b/src/gui/worldselectdialog.h
@@ -33,12 +33,12 @@
#include <vector>
+class Button;
class LoginData;
class WorldListModel;
namespace gcn
{
- class Button;
class ListBox;
}
@@ -75,8 +75,8 @@ class WorldSelectDialog final : public Window, public gcn::ActionListener,
private:
WorldListModel *mWorldListModel;
gcn::ListBox *mWorldList;
- gcn::Button *mChangeLoginButton;
- gcn::Button *mChooseWorld;
+ Button *mChangeLoginButton;
+ Button *mChooseWorld;
};
#endif // WORLD_SELECT_DIALOG_H