diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-02-16 01:05:05 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-02-16 01:05:05 +0300 |
commit | c57791d0fc6833d2ec72a40400d9039030f7cc96 (patch) | |
tree | 4388032afb45573614239bd420a238c322421abd /src/gui/widgets | |
parent | 9bca06b1c7c121f410766ad99b91075902ce24c7 (diff) | |
download | manaverse-c57791d0fc6833d2ec72a40400d9039030f7cc96.tar.gz manaverse-c57791d0fc6833d2ec72a40400d9039030f7cc96.tar.bz2 manaverse-c57791d0fc6833d2ec72a40400d9039030f7cc96.tar.xz manaverse-c57791d0fc6833d2ec72a40400d9039030f7cc96.zip |
move widgetlistener from base into listeners.
Diffstat (limited to 'src/gui/widgets')
36 files changed, 64 insertions, 59 deletions
diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp index 7cbdff44d..ee984a18a 100644 --- a/src/gui/widgets/button.cpp +++ b/src/gui/widgets/button.cpp @@ -50,7 +50,7 @@ Skin *Button::button[BUTTON_COUNT]; Button::Button(const Widget2 *const widget) : gcn::Button(), Widget2(widget), - gcn::WidgetListener(), + WidgetListener(), mDescription(), mVertexes2(new ImageCollection), mEnabledColor(getThemeColor(Theme::BUTTON)), @@ -84,7 +84,7 @@ Button::Button(const Widget2 *const widget, ActionListener *const listener) : gcn::Button(caption), Widget2(widget), - gcn::WidgetListener(), + WidgetListener(), mDescription(), mVertexes2(new ImageCollection), mEnabledColor(getThemeColor(Theme::BUTTON)), @@ -124,7 +124,7 @@ Button::Button(const Widget2 *const widget, ActionListener *const listener) : gcn::Button(caption), Widget2(widget), - gcn::WidgetListener(), + WidgetListener(), mDescription(), mVertexes2(new ImageCollection), mEnabledColor(getThemeColor(Theme::BUTTON)), @@ -164,7 +164,7 @@ Button::Button(const Widget2 *const widget, ActionListener *const listener) : gcn::Button(), Widget2(widget), - gcn::WidgetListener(), + WidgetListener(), mDescription(), mVertexes2(new ImageCollection), mEnabledColor(getThemeColor(Theme::BUTTON)), @@ -204,7 +204,7 @@ Button::Button(const Widget2 *const widget, ActionListener *const listener) : gcn::Button(caption), Widget2(widget), - gcn::WidgetListener(), + WidgetListener(), mDescription(), mVertexes2(new ImageCollection), mEnabledColor(getThemeColor(Theme::BUTTON)), diff --git a/src/gui/widgets/button.h b/src/gui/widgets/button.h index e80593f7f..8f79755a8 100644 --- a/src/gui/widgets/button.h +++ b/src/gui/widgets/button.h @@ -26,7 +26,7 @@ #include "gui/widgets/widget2.h" #include "gui/base/widgets/button.hpp" -#include "gui/base/widgetlistener.hpp" +#include "listeners/widgetlistener.h" #include "localconsts.h" @@ -44,7 +44,7 @@ const std::string BUTTON_PLAY = "buttonplay.png"; */ class Button final : public gcn::Button, public Widget2, - public gcn::WidgetListener + public WidgetListener { public: /** diff --git a/src/gui/widgets/characterdisplay.cpp b/src/gui/widgets/characterdisplay.cpp index 54cb3b28d..21de10412 100644 --- a/src/gui/widgets/characterdisplay.cpp +++ b/src/gui/widgets/characterdisplay.cpp @@ -41,7 +41,7 @@ CharacterDisplay::CharacterDisplay(const Widget2 *const widget, CharSelectDialog *const charSelectDialog) : Container(widget), MouseListener(), - gcn::WidgetListener(), + WidgetListener(), mCharacter(nullptr), mPlayerBox(new PlayerBox(nullptr)), mName(new Label(this, "wwwwwwwwwwwwwwwwwwwwwwww")), diff --git a/src/gui/widgets/characterdisplay.h b/src/gui/widgets/characterdisplay.h index 0352a91a0..940dbe5c6 100644 --- a/src/gui/widgets/characterdisplay.h +++ b/src/gui/widgets/characterdisplay.h @@ -29,7 +29,7 @@ #include "net/charserverhandler.h" #include "net/net.h" -#include "gui/base/widgetlistener.hpp" +#include "listeners/widgetlistener.h" #include "localconsts.h" @@ -39,7 +39,7 @@ class TextPopup; class CharacterDisplay final : public Container, public MouseListener, - public gcn::WidgetListener + public WidgetListener { public: CharacterDisplay(const Widget2 *const widget, diff --git a/src/gui/widgets/desktop.cpp b/src/gui/widgets/desktop.cpp index b46fe3289..5874ee441 100644 --- a/src/gui/widgets/desktop.cpp +++ b/src/gui/widgets/desktop.cpp @@ -35,7 +35,7 @@ Desktop::Desktop(const Widget2 *const widget) : Container(widget), - gcn::WidgetListener(), + WidgetListener(), mWallpaper(nullptr), mVersionLabel(nullptr), mSkin(nullptr), diff --git a/src/gui/widgets/desktop.h b/src/gui/widgets/desktop.h index 6982ce525..9e49ceb59 100644 --- a/src/gui/widgets/desktop.h +++ b/src/gui/widgets/desktop.h @@ -24,7 +24,7 @@ #include "gui/widgets/container.h" -#include "gui/base/widgetlistener.hpp" +#include "listeners/widgetlistener.h" #include "localconsts.h" @@ -45,7 +45,8 @@ class Skin; * * \ingroup GUI */ -class Desktop final : public Container, private gcn::WidgetListener +class Desktop final : public Container, + private WidgetListener { public: explicit Desktop(const Widget2 *const widget); diff --git a/src/gui/widgets/emotepage.cpp b/src/gui/widgets/emotepage.cpp index c086cd463..091d699a7 100644 --- a/src/gui/widgets/emotepage.cpp +++ b/src/gui/widgets/emotepage.cpp @@ -37,7 +37,7 @@ EmotePage::EmotePage(const Widget2 *const widget) : gcn::Widget(), Widget2(widget), MouseListener(), - gcn::WidgetListener(), + WidgetListener(), mEmotes(ResourceManager::getInstance()->getImageSet( "graphics/sprites/chatemotes.png", emoteWidth, emoteHeight)), mVertexes(new ImageCollection), diff --git a/src/gui/widgets/emotepage.h b/src/gui/widgets/emotepage.h index c773d9a66..afc950f79 100644 --- a/src/gui/widgets/emotepage.h +++ b/src/gui/widgets/emotepage.h @@ -24,7 +24,7 @@ #include "gui/widgets/widget2.h" #include "listeners/mouselistener.h" -#include "gui/base/widgetlistener.hpp" +#include "listeners/widgetlistener.h" #include "gui/base/widget.hpp" @@ -33,7 +33,7 @@ class EmotePage final : public gcn::Widget, public Widget2, public MouseListener, - public gcn::WidgetListener + public WidgetListener { public: explicit EmotePage(const Widget2 *const widget); diff --git a/src/gui/widgets/flowcontainer.cpp b/src/gui/widgets/flowcontainer.cpp index d39a7124a..bfcd704d3 100644 --- a/src/gui/widgets/flowcontainer.cpp +++ b/src/gui/widgets/flowcontainer.cpp @@ -26,7 +26,7 @@ FlowContainer::FlowContainer(const Widget2 *const widget, const int boxWidth, const int boxHeight) : Container(widget), - gcn::WidgetListener(), + WidgetListener(), mBoxWidth(boxWidth), mBoxHeight(boxHeight), mGridWidth(1), diff --git a/src/gui/widgets/flowcontainer.h b/src/gui/widgets/flowcontainer.h index 1967258dd..e2773d34c 100644 --- a/src/gui/widgets/flowcontainer.h +++ b/src/gui/widgets/flowcontainer.h @@ -24,7 +24,7 @@ #include "gui/widgets/container.h" -#include "gui/base/widgetlistener.hpp" +#include "listeners/widgetlistener.h" #include "localconsts.h" @@ -34,7 +34,7 @@ * \ingroup GUI */ class FlowContainer final : public Container, - public gcn::WidgetListener + public WidgetListener { public: /** diff --git a/src/gui/widgets/horizontcontainer.cpp b/src/gui/widgets/horizontcontainer.cpp index a4c95169a..77dff3232 100644 --- a/src/gui/widgets/horizontcontainer.cpp +++ b/src/gui/widgets/horizontcontainer.cpp @@ -26,7 +26,7 @@ HorizontContainer::HorizontContainer(const Widget2 *const widget, const int height, const int spacing) : Container(widget), - gcn::WidgetListener(), + WidgetListener(), mSpacing(spacing), mCount(0), mLastX(spacing) diff --git a/src/gui/widgets/horizontcontainer.h b/src/gui/widgets/horizontcontainer.h index 517cb6fd9..eb1f8c5aa 100644 --- a/src/gui/widgets/horizontcontainer.h +++ b/src/gui/widgets/horizontcontainer.h @@ -24,7 +24,7 @@ #include "gui/widgets/container.h" -#include "gui/base/widgetlistener.hpp" +#include "listeners/widgetlistener.h" #include "localconsts.h" @@ -33,7 +33,8 @@ * * This container places it's contents veritcally. */ -class HorizontContainer final : public Container, public gcn::WidgetListener +class HorizontContainer final : public Container, + public WidgetListener { public: HorizontContainer(const Widget2 *const widget, diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp index 036cb6c1b..84934911c 100644 --- a/src/gui/widgets/itemcontainer.cpp +++ b/src/gui/widgets/itemcontainer.cpp @@ -162,7 +162,7 @@ ItemContainer::ItemContainer(const Widget2 *const widget, Widget2(widget), KeyListener(), MouseListener(), - gcn::WidgetListener(), + WidgetListener(), mInventory(inventory), mSelImg(Theme::getImageFromThemeXml("item_selection.xml", "")), mProtectedImg(Theme::getImageFromTheme("lock.png")), diff --git a/src/gui/widgets/itemcontainer.h b/src/gui/widgets/itemcontainer.h index 74ae72a23..3d98d425b 100644 --- a/src/gui/widgets/itemcontainer.h +++ b/src/gui/widgets/itemcontainer.h @@ -27,7 +27,7 @@ #include "listeners/keylistener.h" #include "listeners/mouselistener.h" -#include "gui/base/widgetlistener.hpp" +#include "listeners/widgetlistener.h" #include "gui/base/widget.hpp" @@ -50,7 +50,7 @@ class ItemContainer final : public gcn::Widget, public Widget2, public KeyListener, public MouseListener, - public gcn::WidgetListener + public WidgetListener { public: /** diff --git a/src/gui/widgets/layouthelper.cpp b/src/gui/widgets/layouthelper.cpp index b0fb75adc..460810adf 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) : - gcn::WidgetListener(), + WidgetListener(), mLayout(), mContainer(container) { diff --git a/src/gui/widgets/layouthelper.h b/src/gui/widgets/layouthelper.h index 1a3a3a69f..bdd923560 100644 --- a/src/gui/widgets/layouthelper.h +++ b/src/gui/widgets/layouthelper.h @@ -25,14 +25,14 @@ #include "gui/widgets/layout.h" -#include "gui/base/widgetlistener.hpp" +#include "listeners/widgetlistener.h" /** * A helper class for adding a layout to a Guichan container widget. The layout * will register itself as a widget listener and relayout the widgets in the * container dynamically on resize. */ -class LayoutHelper final : public gcn::WidgetListener +class LayoutHelper final : public WidgetListener { public: /** diff --git a/src/gui/widgets/popup.cpp b/src/gui/widgets/popup.cpp index a4908c23b..9d34beaa7 100644 --- a/src/gui/widgets/popup.cpp +++ b/src/gui/widgets/popup.cpp @@ -35,7 +35,7 @@ Popup::Popup(const std::string &name, std::string skin) : Container(nullptr), MouseListener(), - gcn::WidgetListener(), + WidgetListener(), mPadding(3), mSkin(nullptr), mPopupName(name), diff --git a/src/gui/widgets/popup.h b/src/gui/widgets/popup.h index d09331136..25998e21d 100644 --- a/src/gui/widgets/popup.h +++ b/src/gui/widgets/popup.h @@ -27,7 +27,7 @@ #include "gui/widgets/container.h" #include "listeners/mouselistener.h" -#include "gui/base/widgetlistener.hpp" +#include "listeners/widgetlistener.h" class ImageCollection; class Skin; @@ -47,7 +47,7 @@ class WindowContainer; */ class Popup : public Container, public MouseListener, - public gcn::WidgetListener + public WidgetListener { public: /** diff --git a/src/gui/widgets/progressbar.cpp b/src/gui/widgets/progressbar.cpp index 242b6ba6e..415962310 100644 --- a/src/gui/widgets/progressbar.cpp +++ b/src/gui/widgets/progressbar.cpp @@ -41,7 +41,7 @@ ProgressBar::ProgressBar(const Widget2 *const widget, float progress, const std::string &skin, const std::string &skinFill): gcn::Widget(), Widget2(widget), - gcn::WidgetListener(), + WidgetListener(), mFillRect(), mSkin(nullptr), mProgress(progress), diff --git a/src/gui/widgets/progressbar.h b/src/gui/widgets/progressbar.h index 022d86ab3..2835a7ffc 100644 --- a/src/gui/widgets/progressbar.h +++ b/src/gui/widgets/progressbar.h @@ -26,7 +26,8 @@ #include "gui/widgets/widget2.h" #include "gui/base/widget.hpp" -#include "gui/base/widgetlistener.hpp" + +#include "listeners/widgetlistener.h" #include <string> @@ -42,7 +43,7 @@ class Skin; */ class ProgressBar final : public gcn::Widget, public Widget2, - public gcn::WidgetListener + public WidgetListener { public: /** diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp index 26add84c1..e9e850b1c 100644 --- a/src/gui/widgets/scrollarea.cpp +++ b/src/gui/widgets/scrollarea.cpp @@ -47,7 +47,7 @@ static std::string const buttonFiles[2] = ScrollArea::ScrollArea(const bool opaque, const std::string &skin) : gcn::ScrollArea(), - gcn::WidgetListener(), + WidgetListener(), mX(0), mY(0), mClickX(0), @@ -69,7 +69,7 @@ ScrollArea::ScrollArea(const bool opaque, const std::string &skin) : ScrollArea::ScrollArea(gcn::Widget *const widget, const bool opaque, const std::string &skin) : gcn::ScrollArea(widget), - gcn::WidgetListener(), + WidgetListener(), mX(0), mY(0), mClickX(0), diff --git a/src/gui/widgets/scrollarea.h b/src/gui/widgets/scrollarea.h index fe60399df..69f567b02 100644 --- a/src/gui/widgets/scrollarea.h +++ b/src/gui/widgets/scrollarea.h @@ -26,7 +26,8 @@ #include "gui/widgets/widget2.h" #include "gui/base/widgets/scrollarea.hpp" -#include "gui/base/widgetlistener.hpp" + +#include "listeners/widgetlistener.h" #include "localconsts.h" @@ -44,7 +45,7 @@ class ImageCollection; */ class ScrollArea final : public gcn::ScrollArea, public Widget2, - public gcn::WidgetListener + public WidgetListener { public: /** diff --git a/src/gui/widgets/shortcutcontainer.cpp b/src/gui/widgets/shortcutcontainer.cpp index dcb7d1138..8b3507b8e 100644 --- a/src/gui/widgets/shortcutcontainer.cpp +++ b/src/gui/widgets/shortcutcontainer.cpp @@ -31,7 +31,7 @@ float ShortcutContainer::mAlpha = 1.0; ShortcutContainer::ShortcutContainer() : gcn::Widget(), Widget2(), - gcn::WidgetListener(), + WidgetListener(), MouseListener(), mBackgroundImg(nullptr), mMaxItems(0), diff --git a/src/gui/widgets/shortcutcontainer.h b/src/gui/widgets/shortcutcontainer.h index 1d734de6a..1db3e0482 100644 --- a/src/gui/widgets/shortcutcontainer.h +++ b/src/gui/widgets/shortcutcontainer.h @@ -27,7 +27,7 @@ #include "listeners/mouselistener.h" #include "gui/base/widget.hpp" -#include "gui/base/widgetlistener.hpp" +#include "listeners/widgetlistener.h" class Image; class ImageCollection; @@ -39,7 +39,7 @@ class ImageCollection; */ class ShortcutContainer : public gcn::Widget, public Widget2, - public gcn::WidgetListener, + public WidgetListener, public MouseListener { public: diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp index 2c431c452..0bf6b8d11 100644 --- a/src/gui/widgets/tabbedarea.cpp +++ b/src/gui/widgets/tabbedarea.cpp @@ -39,7 +39,7 @@ TabbedArea::TabbedArea(const Widget2 *const widget) : gcn::BasicContainer(), KeyListener(), MouseListener(), - gcn::WidgetListener(), + WidgetListener(), mSelectedTab(nullptr), mTabContainer(new gcn::Container()), mWidgetContainer(new gcn::Container()), diff --git a/src/gui/widgets/tabbedarea.h b/src/gui/widgets/tabbedarea.h index b8b075ade..27ed05b5e 100644 --- a/src/gui/widgets/tabbedarea.h +++ b/src/gui/widgets/tabbedarea.h @@ -27,7 +27,7 @@ #include "listeners/keylistener.h" #include "listeners/mouselistener.h" -#include "gui/base/widgetlistener.hpp" +#include "listeners/widgetlistener.h" #include "gui/base/widgets/container.hpp" @@ -45,7 +45,7 @@ class TabbedArea final : public Widget2, public gcn::BasicContainer, public KeyListener, public MouseListener, - public gcn::WidgetListener + public WidgetListener { public: /** diff --git a/src/gui/widgets/tabs/setuptab.cpp b/src/gui/widgets/tabs/setuptab.cpp index efead5a3c..6de77d7a0 100644 --- a/src/gui/widgets/tabs/setuptab.cpp +++ b/src/gui/widgets/tabs/setuptab.cpp @@ -27,7 +27,7 @@ SetupTab::SetupTab(const Widget2 *const widget) : Container(widget), ActionListener(), - gcn::WidgetListener(), + WidgetListener(), mName() { setOpaque(false); diff --git a/src/gui/widgets/tabs/setuptab.h b/src/gui/widgets/tabs/setuptab.h index 1621b0713..4d6049b6a 100644 --- a/src/gui/widgets/tabs/setuptab.h +++ b/src/gui/widgets/tabs/setuptab.h @@ -26,7 +26,7 @@ #include "gui/widgets/container.h" #include "listeners/actionlistener.h" -#include "gui/base/widgetlistener.hpp" +#include "listeners/widgetlistener.h" #include <string> @@ -37,7 +37,7 @@ */ class SetupTab : public Container, public ActionListener, - public gcn::WidgetListener + public WidgetListener { public: A_DELETE_COPY(SetupTab) diff --git a/src/gui/widgets/tabs/tab.cpp b/src/gui/widgets/tabs/tab.cpp index 877329cf8..398802eb0 100644 --- a/src/gui/widgets/tabs/tab.cpp +++ b/src/gui/widgets/tabs/tab.cpp @@ -47,7 +47,7 @@ Tab::Tab(const Widget2 *const widget) : gcn::BasicContainer(), Widget2(widget), MouseListener(), - gcn::WidgetListener(), + WidgetListener(), mLabel(new Label(this)), mTabbedArea(nullptr), mTabColor(&getThemeColor(Theme::TAB)), diff --git a/src/gui/widgets/tabs/tab.h b/src/gui/widgets/tabs/tab.h index a67025842..ac10b7dc7 100644 --- a/src/gui/widgets/tabs/tab.h +++ b/src/gui/widgets/tabs/tab.h @@ -28,7 +28,7 @@ #include "gui/base/basiccontainer.hpp" #include "listeners/mouselistener.h" -#include "gui/base/widgetlistener.hpp" +#include "listeners/widgetlistener.h" #include "localconsts.h" @@ -43,7 +43,7 @@ class TabbedArea; class Tab : public gcn::BasicContainer, public Widget2, public MouseListener, - public gcn::WidgetListener + public WidgetListener { public: explicit Tab(const Widget2 *const widget); diff --git a/src/gui/widgets/vertcontainer.cpp b/src/gui/widgets/vertcontainer.cpp index a91f20657..ed3d00219 100644 --- a/src/gui/widgets/vertcontainer.cpp +++ b/src/gui/widgets/vertcontainer.cpp @@ -27,7 +27,7 @@ VertContainer::VertContainer(const Widget2 *const widget, const int verticalItemSize, const bool resizable, const int leftSpacing) : Container(widget), - gcn::WidgetListener(), + WidgetListener(), mResizableWidgets(), mVerticalItemSize(verticalItemSize), mCount(0), diff --git a/src/gui/widgets/vertcontainer.h b/src/gui/widgets/vertcontainer.h index d194a00c3..34fcf3d45 100644 --- a/src/gui/widgets/vertcontainer.h +++ b/src/gui/widgets/vertcontainer.h @@ -24,7 +24,7 @@ #include "gui/widgets/container.h" -#include "gui/base/widgetlistener.hpp" +#include "listeners/widgetlistener.h" #include <vector> @@ -35,7 +35,8 @@ * * This container places it's contents veritcally. */ -class VertContainer final : public Container, public gcn::WidgetListener +class VertContainer final : public Container, + public WidgetListener { public: VertContainer(const Widget2 *const widget, diff --git a/src/gui/widgets/widgetgroup.cpp b/src/gui/widgets/widgetgroup.cpp index ee8d6f719..17383780f 100644 --- a/src/gui/widgets/widgetgroup.cpp +++ b/src/gui/widgets/widgetgroup.cpp @@ -26,7 +26,7 @@ WidgetGroup::WidgetGroup(const Widget2 *const widget, const std::string &group, const int height, const int spacing) : Container(widget), - gcn::WidgetListener(), + WidgetListener(), ActionListener(), mSpacing(spacing), mCount(0), diff --git a/src/gui/widgets/widgetgroup.h b/src/gui/widgets/widgetgroup.h index e648a17e5..60ee2672f 100644 --- a/src/gui/widgets/widgetgroup.h +++ b/src/gui/widgets/widgetgroup.h @@ -24,12 +24,12 @@ #include "gui/widgets/container.h" #include "listeners/actionlistener.h" -#include "gui/base/widgetlistener.hpp" +#include "listeners/widgetlistener.h" #include "localconsts.h" class WidgetGroup : public Container, - public gcn::WidgetListener, + public WidgetListener, public ActionListener { public: diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp index 54ec3c859..1fc439abf 100644 --- a/src/gui/widgets/window.cpp +++ b/src/gui/widgets/window.cpp @@ -52,7 +52,7 @@ Window::Window(const std::string &caption, const bool modal, Window *const parent, std::string skin) : gcn::Window(caption), Widget2(), - gcn::WidgetListener(), + WidgetListener(), mSkin(nullptr), mDefaultX(0), mDefaultY(0), diff --git a/src/gui/widgets/window.h b/src/gui/widgets/window.h index 68ce1a293..5ff5abe2b 100644 --- a/src/gui/widgets/window.h +++ b/src/gui/widgets/window.h @@ -27,7 +27,7 @@ #include "gui/widgets/widget2.h" -#include "gui/base/widgetlistener.hpp" +#include "listeners/widgetlistener.h" #include "gui/base/widgets/window.hpp" @@ -48,7 +48,7 @@ class WindowContainer; */ class Window : public gcn::Window, public Widget2, - private gcn::WidgetListener + private WidgetListener { public: /** |