summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-02-20 22:36:48 +0300
committerAndrei Karas <akaras@inbox.ru>2014-02-20 22:36:48 +0300
commitd83c6dd523827087681f019ebfca8798380dc968 (patch)
tree65515ef8405399007fef057bc37dc39ab1911000 /src/gui
parent26f9aad24bc50d4e9fd161d185df049c9e7a62cf (diff)
downloadmanaplus-d83c6dd523827087681f019ebfca8798380dc968.tar.gz
manaplus-d83c6dd523827087681f019ebfca8798380dc968.tar.bz2
manaplus-d83c6dd523827087681f019ebfca8798380dc968.tar.xz
manaplus-d83c6dd523827087681f019ebfca8798380dc968.zip
fix code style.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/base/basiccontainer.cpp2
-rw-r--r--src/gui/base/gui.hpp7
-rw-r--r--src/gui/base/widget.hpp2
-rw-r--r--src/gui/base/widgets/listbox.cpp2
-rw-r--r--src/gui/base/widgets/listbox.hpp3
-rw-r--r--src/gui/focushandler.h4
-rw-r--r--src/gui/popups/popupmenu.h10
-rw-r--r--src/gui/popups/spellpopup.cpp3
-rw-r--r--src/gui/popups/spellpopup.h3
-rw-r--r--src/gui/widgets/avatarlistbox.h2
-rw-r--r--src/gui/widgets/colormodel.h6
-rw-r--r--src/gui/widgets/dropdown.h6
-rw-r--r--src/gui/widgets/guitable.h1
-rw-r--r--src/gui/widgets/itemlinkhandler.cpp2
-rw-r--r--src/gui/widgets/label.h2
-rw-r--r--src/gui/widgets/listbox.h11
-rw-r--r--src/gui/widgets/playerbox.h2
-rw-r--r--src/gui/widgets/popuplist.h7
-rw-r--r--src/gui/widgets/setupitem.h3
-rw-r--r--src/gui/widgets/setuptouchitem.cpp2
-rw-r--r--src/gui/widgets/textfield.h2
-rw-r--r--src/gui/windows/botcheckerwindow.cpp10
-rw-r--r--src/gui/windows/botcheckerwindow.h2
-rw-r--r--src/gui/windows/socialwindow.cpp10
-rw-r--r--src/gui/windows/worldselectdialog.cpp2
25 files changed, 58 insertions, 48 deletions
diff --git a/src/gui/base/basiccontainer.cpp b/src/gui/base/basiccontainer.cpp
index edc465726..9f2806016 100644
--- a/src/gui/base/basiccontainer.cpp
+++ b/src/gui/base/basiccontainer.cpp
@@ -69,8 +69,6 @@
#include <algorithm>
-#include "gui/focushandler.h"
-
#include "render/graphics.h"
#include "debug.h"
diff --git a/src/gui/base/gui.hpp b/src/gui/base/gui.hpp
index 391a0520e..8c4ac4db0 100644
--- a/src/gui/base/gui.hpp
+++ b/src/gui/base/gui.hpp
@@ -67,13 +67,14 @@
#include <list>
#include <deque>
-#include "events/keyevent.h"
-
-#include "input/mouseinput.h"
+#include "localconsts.h"
+class Event;
class FocusHandler;
class Graphics;
+class KeyEvent;
class KeyListener;
+class MouseInput;
class SDLInput;
namespace gcn
diff --git a/src/gui/base/widget.hpp b/src/gui/base/widget.hpp
index 6245d3c98..dd872d9a1 100644
--- a/src/gui/base/widget.hpp
+++ b/src/gui/base/widget.hpp
@@ -81,9 +81,7 @@ class FocusHandler;
class FocusListener;
class Font;
class Graphics;
-class KeyInput;
class KeyListener;
-class MouseInput;
class MouseListener;
class WidgetListener;
diff --git a/src/gui/base/widgets/listbox.cpp b/src/gui/base/widgets/listbox.cpp
index 02d94626c..765878834 100644
--- a/src/gui/base/widgets/listbox.cpp
+++ b/src/gui/base/widgets/listbox.cpp
@@ -69,6 +69,8 @@
#include "gui/font.h"
+#include "gui/base/listmodel.hpp"
+
#include "listeners/selectionlistener.h"
#include "debug.h"
diff --git a/src/gui/base/widgets/listbox.hpp b/src/gui/base/widgets/listbox.hpp
index ff2df395c..c46aca6ae 100644
--- a/src/gui/base/widgets/listbox.hpp
+++ b/src/gui/base/widgets/listbox.hpp
@@ -66,7 +66,6 @@
#include <list>
-#include "gui/base/listmodel.hpp"
#include "gui/base/widget.hpp"
#include "listeners/keylistener.h"
@@ -76,6 +75,8 @@ class SelectionListener;
namespace gcn
{
+ class ListModel;
+
/**
* An implementation of a list box where an item can be selected.
*
diff --git a/src/gui/focushandler.h b/src/gui/focushandler.h
index 0131a4c29..c8885ef2c 100644
--- a/src/gui/focushandler.h
+++ b/src/gui/focushandler.h
@@ -68,13 +68,13 @@
#include "gui/focushandler.h"
-#include "events/event.h"
-
#include <list>
#include <vector>
#include "localconsts.h"
+class Event;
+
namespace gcn
{
class Widget;
diff --git a/src/gui/popups/popupmenu.h b/src/gui/popups/popupmenu.h
index 70f8b7885..1ce274122 100644
--- a/src/gui/popups/popupmenu.h
+++ b/src/gui/popups/popupmenu.h
@@ -26,14 +26,11 @@
#include "gui/widgets/linkhandler.h"
#include "gui/widgets/popup.h"
-#include "being/actorsprite.h"
-
#include "listeners/actionlistener.h"
-#include "gui/base/listmodel.hpp"
-
#include "localconsts.h"
+class ActorSprite;
class Being;
class BrowserBox;
class Button;
@@ -48,6 +45,11 @@ class TextField;
class ProgressBar;
class Window;
+namespace gcn
+{
+ class ListModel;
+}
+
class RenameListener final : public ActionListener
{
public:
diff --git a/src/gui/popups/spellpopup.cpp b/src/gui/popups/spellpopup.cpp
index 8849a53cb..07bcc2330 100644
--- a/src/gui/popups/spellpopup.cpp
+++ b/src/gui/popups/spellpopup.cpp
@@ -23,7 +23,8 @@
#include "gui/popups/spellpopup.h"
-#include "gui/font.h"
+#include "textcommand.h"
+
#include "gui/gui.h"
#include "gui/widgets/label.h"
diff --git a/src/gui/popups/spellpopup.h b/src/gui/popups/spellpopup.h
index 152dfb306..cbbd53703 100644
--- a/src/gui/popups/spellpopup.h
+++ b/src/gui/popups/spellpopup.h
@@ -26,9 +26,8 @@
#include "gui/widgets/popup.h"
-#include "textcommand.h"
-
class Label;
+class TextCommand;
/**
* A popup that displays information about an item.
diff --git a/src/gui/widgets/avatarlistbox.h b/src/gui/widgets/avatarlistbox.h
index 005ba7c72..e2ab3bf83 100644
--- a/src/gui/widgets/avatarlistbox.h
+++ b/src/gui/widgets/avatarlistbox.h
@@ -28,6 +28,8 @@
#include "gui/widgets/listbox.h"
+#include "gui/base/listmodel.hpp"
+
#include <string>
class Image;
diff --git a/src/gui/widgets/colormodel.h b/src/gui/widgets/colormodel.h
index 4d29e24d3..c019d9aac 100644
--- a/src/gui/widgets/colormodel.h
+++ b/src/gui/widgets/colormodel.h
@@ -23,13 +23,17 @@
#include "utils/stringvector.h"
-#include "gui/base/color.hpp"
#include "gui/base/listmodel.hpp"
#include "localconsts.h"
class Widget2;
+namespace gcn
+{
+ class Color;
+}
+
struct ColorPair
{
ColorPair(const gcn::Color* c1, const gcn::Color* c2) :
diff --git a/src/gui/widgets/dropdown.h b/src/gui/widgets/dropdown.h
index a1908a3c6..9bb459d45 100644
--- a/src/gui/widgets/dropdown.h
+++ b/src/gui/widgets/dropdown.h
@@ -23,10 +23,7 @@
#ifndef GUI_WIDGETS_DROPDOWN_H
#define GUI_WIDGETS_DROPDOWN_H
-#include "gui/widgets/widget2.h"
-
#include "gui/base/basiccontainer.hpp"
-//#include "gui/base/listmodel.hpp"
#include "listeners/actionlistener.h"
#include "listeners/focuslistener.h"
@@ -37,10 +34,7 @@
#include "localconsts.h"
class Image;
-class ImageRect;
-class ListBox;
class PopupList;
-class ScrollArea;
class Skin;
namespace gcn
diff --git a/src/gui/widgets/guitable.h b/src/gui/widgets/guitable.h
index d68e222ac..96f2a9532 100644
--- a/src/gui/widgets/guitable.h
+++ b/src/gui/widgets/guitable.h
@@ -26,7 +26,6 @@
#include "localconsts.h"
#include "gui/widgets/tablemodel.h"
-#include "gui/widgets/widget2.h"
#include "listeners/keylistener.h"
#include "listeners/mouselistener.h"
diff --git a/src/gui/widgets/itemlinkhandler.cpp b/src/gui/widgets/itemlinkhandler.cpp
index 3e9a99a2a..2cf27ae30 100644
--- a/src/gui/widgets/itemlinkhandler.cpp
+++ b/src/gui/widgets/itemlinkhandler.cpp
@@ -48,6 +48,7 @@ namespace
struct OpenUrlListener : public ActionListener
{
OpenUrlListener() :
+ ActionListener(),
url()
{
}
@@ -65,6 +66,7 @@ namespace
} // namespace
ItemLinkHandler::ItemLinkHandler() :
+ LinkHandler(),
mItemPopup(new ItemPopup)
{
mItemPopup->postInit();
diff --git a/src/gui/widgets/label.h b/src/gui/widgets/label.h
index b6adf9fba..b63c9b10e 100644
--- a/src/gui/widgets/label.h
+++ b/src/gui/widgets/label.h
@@ -22,8 +22,6 @@
#ifndef GUI_WIDGETS_LABEL_H
#define GUI_WIDGETS_LABEL_H
-#include "gui/widgets/widget2.h"
-
#include "gui/base/widgets/label.hpp"
#include "localconsts.h"
diff --git a/src/gui/widgets/listbox.h b/src/gui/widgets/listbox.h
index f1ebee317..625f21085 100644
--- a/src/gui/widgets/listbox.h
+++ b/src/gui/widgets/listbox.h
@@ -23,12 +23,23 @@
#ifndef GUI_WIDGETS_LISTBOX_H
#define GUI_WIDGETS_LISTBOX_H
+#include "gui/base/color.hpp"
+
#include "gui/base/widgets/listbox.hpp"
+#include "render/graphics.h"
+
#include "localconsts.h"
class Skin;
+class KeyEvent;
+class MouseEvent;
+class Widget2;
+namespace gcn
+{
+ class ListModel;
+}
/**
* A list box, meant to be used inside a scroll area. Same as the Guichan list
* box except this one doesn't have a background, instead completely relying
diff --git a/src/gui/widgets/playerbox.h b/src/gui/widgets/playerbox.h
index d3fb4e5e3..7481dc9db 100644
--- a/src/gui/widgets/playerbox.h
+++ b/src/gui/widgets/playerbox.h
@@ -23,8 +23,6 @@
#ifndef GUI_WIDGETS_PLAYERBOX_H
#define GUI_WIDGETS_PLAYERBOX_H
-#include "gui/widgets/widget2.h"
-
#include "gui/base/widgets/scrollarea.hpp"
#include "localconsts.h"
diff --git a/src/gui/widgets/popuplist.h b/src/gui/widgets/popuplist.h
index 45f52d3b3..a495d7c46 100644
--- a/src/gui/widgets/popuplist.h
+++ b/src/gui/widgets/popuplist.h
@@ -25,14 +25,17 @@
#include "listeners/focuslistener.h"
-#include "gui/base/listmodel.hpp"
-
#include "localconsts.h"
class DropDown;
class ListBox;
class ScrollArea;
+namespace gcn
+{
+ class ListModel;
+}
+
class PopupList final : public Popup,
public FocusListener
{
diff --git a/src/gui/widgets/setupitem.h b/src/gui/widgets/setupitem.h
index 87b7c46f9..502d85d21 100644
--- a/src/gui/widgets/setupitem.h
+++ b/src/gui/widgets/setupitem.h
@@ -21,9 +21,6 @@
#ifndef GUI_WIDGETS_SETUPITEM_H
#define GUI_WIDGETS_SETUPITEM_H
-//#include "gui/widgets/button.h"
-//#include "gui/widgets/tabs/setuptabscroll.h"
-
#include "gui/widgets/widget2.h"
#include "listeners/actionlistener.h"
diff --git a/src/gui/widgets/setuptouchitem.cpp b/src/gui/widgets/setuptouchitem.cpp
index f4c213b2f..d50af8ff3 100644
--- a/src/gui/widgets/setuptouchitem.cpp
+++ b/src/gui/widgets/setuptouchitem.cpp
@@ -27,7 +27,7 @@
#include "gui/widgets/label.h"
#include "gui/widgets/vertcontainer.h"
-#include "gui/widgets/tabs/setuptabscroll.h"
+#include "gui/widgets/tabs/setuptabscroll.h"
#include <algorithm>
diff --git a/src/gui/widgets/textfield.h b/src/gui/widgets/textfield.h
index bfa721b7a..b05a498dc 100644
--- a/src/gui/widgets/textfield.h
+++ b/src/gui/widgets/textfield.h
@@ -23,8 +23,6 @@
#ifndef GUI_WIDGETS_TEXTFIELD_H
#define GUI_WIDGETS_TEXTFIELD_H
-#include "gui/widgets/widget2.h"
-
#include "listeners/focuslistener.h"
#include "gui/base/widgets/textfield.hpp"
diff --git a/src/gui/windows/botcheckerwindow.cpp b/src/gui/windows/botcheckerwindow.cpp
index ade95eba5..3bdebff71 100644
--- a/src/gui/windows/botcheckerwindow.cpp
+++ b/src/gui/windows/botcheckerwindow.cpp
@@ -101,7 +101,7 @@ public:
freeWidgets();
mPlayers.clear();
if (actorManager && botCheckerWindow
- && botCheckerWindow->mEnabled)
+ && botCheckerWindow->mBotcheckerEnabled)
{
std::set<ActorSprite*> beings = actorManager->getAll();
FOR_EACH (ActorSprites::iterator, i, beings)
@@ -271,7 +271,7 @@ BotCheckerWindow::BotCheckerWindow():
mIncButton(new Button(this, _("Reset"), "reset", this)),
mLastUpdateTime(0),
mNeedUpdate(false),
- mEnabled(false)
+ mBotcheckerEnabled(false)
{
const int w = 500;
const int h = 250;
@@ -346,7 +346,7 @@ BotCheckerWindow::BotCheckerWindow():
enableVisibleSound(true);
config.addListener("enableBotCheker", this);
- mEnabled = config.getBoolValue("enableBotCheker");
+ mBotcheckerEnabled = config.getBoolValue("enableBotCheker");
}
BotCheckerWindow::~BotCheckerWindow()
@@ -358,7 +358,7 @@ BotCheckerWindow::~BotCheckerWindow()
void BotCheckerWindow::slowLogic()
{
BLOCK_START("BotCheckerWindow::slowLogic")
- if (mEnabled && mTableModel)
+ if (mBotcheckerEnabled && mTableModel)
{
const unsigned int nowTime = cur_time;
if (nowTime - mLastUpdateTime > 5 && mNeedUpdate)
@@ -417,7 +417,7 @@ void BotCheckerWindow::reset()
void BotCheckerWindow::optionChanged(const std::string &name)
{
if (name == "enableBotCheker")
- mEnabled = config.getBoolValue("enableBotCheker");
+ mBotcheckerEnabled = config.getBoolValue("enableBotCheker");
}
#ifdef USE_PROFILER
diff --git a/src/gui/windows/botcheckerwindow.h b/src/gui/windows/botcheckerwindow.h
index 25fd550fb..0c86b13b0 100644
--- a/src/gui/windows/botcheckerwindow.h
+++ b/src/gui/windows/botcheckerwindow.h
@@ -86,7 +86,7 @@ class BotCheckerWindow final : public Window,
Button *mIncButton;
int mLastUpdateTime;
bool mNeedUpdate;
- bool mEnabled;
+ bool mBotcheckerEnabled;
};
extern BotCheckerWindow *botCheckerWindow;
diff --git a/src/gui/windows/socialwindow.cpp b/src/gui/windows/socialwindow.cpp
index 52ddc9439..73098ee08 100644
--- a/src/gui/windows/socialwindow.cpp
+++ b/src/gui/windows/socialwindow.cpp
@@ -115,6 +115,11 @@ public:
virtual void selectIndex(const unsigned num A_UNUSED)
{ }
+ virtual void buildCounter(const int online A_UNUSED = 0,
+ const int total A_UNUSED = 0)
+ {
+ }
+
protected:
friend class SocialWindow;
@@ -157,11 +162,6 @@ protected:
socialWindow->setCounter(this, mCounterString);
}
- virtual void buildCounter(const int online A_UNUSED = 0,
- const int total A_UNUSED = 0)
- {
- }
-
TextDialog *mInviteDialog;
ConfirmDialog *mConfirmDialog;
ScrollArea *mScroll;
diff --git a/src/gui/windows/worldselectdialog.cpp b/src/gui/windows/worldselectdialog.cpp
index 3c7602a70..5acb11f93 100644
--- a/src/gui/windows/worldselectdialog.cpp
+++ b/src/gui/windows/worldselectdialog.cpp
@@ -33,6 +33,8 @@
#include "gui/widgets/listbox.h"
#include "gui/widgets/scrollarea.h"
+#include "gui/base/listmodel.hpp"
+
#include "net/loginhandler.h"
#include "net/net.h"