summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-02-18 01:12:45 +0300
committerAndrei Karas <akaras@inbox.ru>2014-02-18 22:05:06 +0300
commitf24b4360e73d45bc0830d2964c06e295890e5f18 (patch)
tree6ce4f8440b22ec665aa94403643c6cb0df1b47f0 /src/gui/widgets
parent14a0a04b2bb3928f7429fd748dd40e1843fca571 (diff)
downloadmv-f24b4360e73d45bc0830d2964c06e295890e5f18.tar.gz
mv-f24b4360e73d45bc0830d2964c06e295890e5f18.tar.bz2
mv-f24b4360e73d45bc0830d2964c06e295890e5f18.tar.xz
mv-f24b4360e73d45bc0830d2964c06e295890e5f18.zip
derive Widget from Widget2.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/avatarlistbox.h6
-rw-r--r--src/gui/widgets/browserbox.cpp3
-rw-r--r--src/gui/widgets/browserbox.h1
-rw-r--r--src/gui/widgets/button.cpp15
-rw-r--r--src/gui/widgets/button.h1
-rw-r--r--src/gui/widgets/checkbox.cpp6
-rw-r--r--src/gui/widgets/checkbox.h3
-rw-r--r--src/gui/widgets/container.cpp3
-rw-r--r--src/gui/widgets/container.h3
-rw-r--r--src/gui/widgets/dropdown.cpp3
-rw-r--r--src/gui/widgets/dropdown.h3
-rw-r--r--src/gui/widgets/emotepage.cpp3
-rw-r--r--src/gui/widgets/emotepage.h1
-rw-r--r--src/gui/widgets/flowcontainer.cpp3
-rw-r--r--src/gui/widgets/flowcontainer.h3
-rw-r--r--src/gui/widgets/guitable.cpp6
-rw-r--r--src/gui/widgets/guitable.h1
-rw-r--r--src/gui/widgets/horizontcontainer.cpp3
-rw-r--r--src/gui/widgets/horizontcontainer.h3
-rw-r--r--src/gui/widgets/icon.cpp12
-rw-r--r--src/gui/widgets/icon.h9
-rw-r--r--src/gui/widgets/inttextfield.cpp9
-rw-r--r--src/gui/widgets/inttextfield.h9
-rw-r--r--src/gui/widgets/itemcontainer.cpp3
-rw-r--r--src/gui/widgets/itemcontainer.h1
-rw-r--r--src/gui/widgets/label.cpp9
-rw-r--r--src/gui/widgets/label.h5
-rw-r--r--src/gui/widgets/listbox.cpp3
-rw-r--r--src/gui/widgets/listbox.h3
-rw-r--r--src/gui/widgets/playerbox.cpp6
-rw-r--r--src/gui/widgets/playerbox.h3
-rw-r--r--src/gui/widgets/popuplist.cpp2
-rw-r--r--src/gui/widgets/progressbar.cpp12
-rw-r--r--src/gui/widgets/progressbar.h10
-rw-r--r--src/gui/widgets/progressindicator.cpp3
-rw-r--r--src/gui/widgets/progressindicator.h3
-rw-r--r--src/gui/widgets/radiobutton.cpp3
-rw-r--r--src/gui/widgets/radiobutton.h3
-rw-r--r--src/gui/widgets/radiogroup.h3
-rw-r--r--src/gui/widgets/scrollarea.cpp27
-rw-r--r--src/gui/widgets/scrollarea.h17
-rw-r--r--src/gui/widgets/shortcutcontainer.cpp3
-rw-r--r--src/gui/widgets/shortcutcontainer.h1
-rw-r--r--src/gui/widgets/slider.cpp6
-rw-r--r--src/gui/widgets/slider.h3
-rw-r--r--src/gui/widgets/tabbedarea.cpp7
-rw-r--r--src/gui/widgets/tabbedarea.h3
-rw-r--r--src/gui/widgets/tabs/chattab.cpp5
-rw-r--r--src/gui/widgets/tabs/chattab.h3
-rw-r--r--src/gui/widgets/tabs/guildchattab.h3
-rw-r--r--src/gui/widgets/tabs/langtab.cpp3
-rw-r--r--src/gui/widgets/tabs/langtab.h3
-rw-r--r--src/gui/widgets/tabs/setup_colors.cpp5
-rw-r--r--src/gui/widgets/tabs/setup_input.cpp3
-rw-r--r--src/gui/widgets/tabs/setup_relations.cpp2
-rw-r--r--src/gui/widgets/tabs/setup_video.cpp2
-rw-r--r--src/gui/widgets/tabs/setup_video.h3
-rw-r--r--src/gui/widgets/tabs/setuptabscroll.cpp2
-rw-r--r--src/gui/widgets/tabs/tab.cpp3
-rw-r--r--src/gui/widgets/tabs/tab.h1
-rw-r--r--src/gui/widgets/tabs/whispertab.cpp3
-rw-r--r--src/gui/widgets/tabs/whispertab.h3
-rw-r--r--src/gui/widgets/tabstrip.cpp6
-rw-r--r--src/gui/widgets/tabstrip.h6
-rw-r--r--src/gui/widgets/textbox.cpp3
-rw-r--r--src/gui/widgets/textbox.h3
-rw-r--r--src/gui/widgets/textfield.cpp3
-rw-r--r--src/gui/widgets/textfield.h3
-rw-r--r--src/gui/widgets/textpreview.cpp3
-rw-r--r--src/gui/widgets/textpreview.h6
-rw-r--r--src/gui/widgets/vertcontainer.cpp3
-rw-r--r--src/gui/widgets/vertcontainer.h3
-rw-r--r--src/gui/widgets/widgetgroup.cpp3
-rw-r--r--src/gui/widgets/widgetgroup.h3
-rw-r--r--src/gui/widgets/window.cpp3
-rw-r--r--src/gui/widgets/window.h1
76 files changed, 150 insertions, 191 deletions
diff --git a/src/gui/widgets/avatarlistbox.h b/src/gui/widgets/avatarlistbox.h
index d0449231b..005ba7c72 100644
--- a/src/gui/widgets/avatarlistbox.h
+++ b/src/gui/widgets/avatarlistbox.h
@@ -41,10 +41,12 @@ public:
{ return getAvatarAt(i)->getName(); }
};
-class AvatarListBox final : public ListBox, public ConfigListener
+class AvatarListBox final : public ListBox,
+ public ConfigListener
{
public:
- AvatarListBox(const Widget2 *const widget, AvatarListModel *const model);
+ AvatarListBox(const Widget2 *const widget,
+ AvatarListModel *const model);
A_DELETE_COPY(AvatarListBox)
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp
index 60b67dc24..cc83d2b83 100644
--- a/src/gui/widgets/browserbox.cpp
+++ b/src/gui/widgets/browserbox.cpp
@@ -52,8 +52,7 @@ BrowserBox::BrowserBox(const Widget2 *const widget,
const unsigned int mode,
const bool opaque,
const std::string &skin) :
- gcn::Widget(),
- Widget2(widget),
+ gcn::Widget(widget),
MouseListener(),
mTextRows(),
mTextRowLinksCount(),
diff --git a/src/gui/widgets/browserbox.h b/src/gui/widgets/browserbox.h
index f1c1aa1f6..23f221e63 100644
--- a/src/gui/widgets/browserbox.h
+++ b/src/gui/widgets/browserbox.h
@@ -103,7 +103,6 @@ class LinePart final
* parent conteiner.
*/
class BrowserBox final : public gcn::Widget,
- public Widget2,
public MouseListener
{
public:
diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp
index 5d27af68a..a9b621d90 100644
--- a/src/gui/widgets/button.cpp
+++ b/src/gui/widgets/button.cpp
@@ -49,8 +49,7 @@ static std::string const data[Button::BUTTON_COUNT] =
Skin *Button::button[BUTTON_COUNT];
Button::Button(const Widget2 *const widget) :
- gcn::Button(),
- Widget2(widget),
+ gcn::Button(widget),
WidgetListener(),
mDescription(),
mVertexes2(new ImageCollection),
@@ -83,8 +82,7 @@ Button::Button(const Widget2 *const widget,
const std::string &restrict caption,
const std::string &restrict actionEventId,
ActionListener *const listener) :
- gcn::Button(caption),
- Widget2(widget),
+ gcn::Button(widget, caption),
WidgetListener(),
mDescription(),
mVertexes2(new ImageCollection),
@@ -123,8 +121,7 @@ Button::Button(const Widget2 *const widget,
const int imageWidth, const int imageHeight,
const std::string &restrict actionEventId,
ActionListener *const listener) :
- gcn::Button(caption),
- Widget2(widget),
+ gcn::Button(widget, caption),
WidgetListener(),
mDescription(),
mVertexes2(new ImageCollection),
@@ -163,8 +160,7 @@ Button::Button(const Widget2 *const widget,
const int imageWidth, const int imageHeight,
const std::string &restrict actionEventId,
ActionListener *const listener) :
- gcn::Button(),
- Widget2(widget),
+ gcn::Button(widget),
WidgetListener(),
mDescription(),
mVertexes2(new ImageCollection),
@@ -203,8 +199,7 @@ Button::Button(const Widget2 *const widget,
const std::string &restrict imageName,
const std::string &restrict actionEventId,
ActionListener *const listener) :
- gcn::Button(caption),
- Widget2(widget),
+ gcn::Button(widget, caption),
WidgetListener(),
mDescription(),
mVertexes2(new ImageCollection),
diff --git a/src/gui/widgets/button.h b/src/gui/widgets/button.h
index a9722f6a2..73c0d70eb 100644
--- a/src/gui/widgets/button.h
+++ b/src/gui/widgets/button.h
@@ -43,7 +43,6 @@ const std::string BUTTON_PLAY = "buttonplay.png";
* \ingroup GUI
*/
class Button final : public gcn::Button,
- public Widget2,
public WidgetListener
{
public:
diff --git a/src/gui/widgets/checkbox.cpp b/src/gui/widgets/checkbox.cpp
index 0772c0d4f..e500815c0 100644
--- a/src/gui/widgets/checkbox.cpp
+++ b/src/gui/widgets/checkbox.cpp
@@ -39,11 +39,11 @@ Skin *CheckBox::mSkin = nullptr;
float CheckBox::mAlpha = 1.0;
CheckBox::CheckBox(const Widget2 *const widget,
- const std::string &restrict caption, const bool selected,
+ const std::string &restrict caption,
+ const bool selected,
ActionListener *const listener,
const std::string &restrict eventId) :
- gcn::CheckBox(caption, selected),
- Widget2(widget),
+ gcn::CheckBox(widget, caption, selected),
mPadding(0),
mImagePadding(0),
mImageSize(9),
diff --git a/src/gui/widgets/checkbox.h b/src/gui/widgets/checkbox.h
index 3b0830cee..e05ab29d3 100644
--- a/src/gui/widgets/checkbox.h
+++ b/src/gui/widgets/checkbox.h
@@ -36,8 +36,7 @@ class Skin;
*
* \ingroup GUI
*/
-class CheckBox final : public gcn::CheckBox,
- public Widget2
+class CheckBox final : public gcn::CheckBox
{
public:
/**
diff --git a/src/gui/widgets/container.cpp b/src/gui/widgets/container.cpp
index e37bd5103..3c048d630 100644
--- a/src/gui/widgets/container.cpp
+++ b/src/gui/widgets/container.cpp
@@ -25,8 +25,7 @@
#include "debug.h"
Container::Container(const Widget2 *const widget) :
- gcn::Container(),
- Widget2(widget)
+ gcn::Container(widget)
{
setOpaque(false);
}
diff --git a/src/gui/widgets/container.h b/src/gui/widgets/container.h
index a83ec8d48..efddb1566 100644
--- a/src/gui/widgets/container.h
+++ b/src/gui/widgets/container.h
@@ -36,8 +36,7 @@
*
* This container is also non-opaque by default.
*/
-class Container : public gcn::Container,
- public Widget2
+class Container : public gcn::Container
{
public:
explicit Container(const Widget2 *const widget);
diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp
index 42fa89b30..86170036c 100644
--- a/src/gui/widgets/dropdown.cpp
+++ b/src/gui/widgets/dropdown.cpp
@@ -58,12 +58,11 @@ DropDown::DropDown(const Widget2 *const widget,
ActionListener *const listener,
const std::string &eventId):
ActionListener(),
- gcn::BasicContainer(),
+ gcn::BasicContainer(widget),
KeyListener(),
MouseListener(),
FocusListener(),
SelectionListener(),
- Widget2(widget),
mPopup(new PopupList(this, listModel, extended, modal)),
mShadowColor(getThemeColor(Theme::DROPDOWN_SHADOW)),
mHighlightColor(getThemeColor(Theme::HIGHLIGHT)),
diff --git a/src/gui/widgets/dropdown.h b/src/gui/widgets/dropdown.h
index 8f42bfc65..b638a2a05 100644
--- a/src/gui/widgets/dropdown.h
+++ b/src/gui/widgets/dropdown.h
@@ -55,8 +55,7 @@ class DropDown final : public ActionListener,
public KeyListener,
public MouseListener,
public FocusListener,
- public SelectionListener,
- public Widget2
+ public SelectionListener
{
public:
/**
diff --git a/src/gui/widgets/emotepage.cpp b/src/gui/widgets/emotepage.cpp
index 6456913a9..1ebcb4841 100644
--- a/src/gui/widgets/emotepage.cpp
+++ b/src/gui/widgets/emotepage.cpp
@@ -34,8 +34,7 @@ namespace
} // namespace
EmotePage::EmotePage(const Widget2 *const widget) :
- gcn::Widget(),
- Widget2(widget),
+ gcn::Widget(widget),
MouseListener(),
WidgetListener(),
mEmotes(ResourceManager::getInstance()->getImageSet(
diff --git a/src/gui/widgets/emotepage.h b/src/gui/widgets/emotepage.h
index 74f93e8d3..8eb1e5f7b 100644
--- a/src/gui/widgets/emotepage.h
+++ b/src/gui/widgets/emotepage.h
@@ -31,7 +31,6 @@
#include "localconsts.h"
class EmotePage final : public gcn::Widget,
- public Widget2,
public MouseListener,
public WidgetListener
{
diff --git a/src/gui/widgets/flowcontainer.cpp b/src/gui/widgets/flowcontainer.cpp
index 1c5961140..06fb731c4 100644
--- a/src/gui/widgets/flowcontainer.cpp
+++ b/src/gui/widgets/flowcontainer.cpp
@@ -24,7 +24,8 @@
#include "debug.h"
FlowContainer::FlowContainer(const Widget2 *const widget,
- const int boxWidth, const int boxHeight) :
+ const int boxWidth,
+ const int boxHeight) :
Container(widget),
WidgetListener(),
mBoxWidth(boxWidth),
diff --git a/src/gui/widgets/flowcontainer.h b/src/gui/widgets/flowcontainer.h
index a425e8465..8e96204ae 100644
--- a/src/gui/widgets/flowcontainer.h
+++ b/src/gui/widgets/flowcontainer.h
@@ -41,7 +41,8 @@ class FlowContainer final : public Container,
* Constructor. Initializes the shortcut container.
*/
FlowContainer(const Widget2 *const widget,
- const int boxWidth, const int boxHeight);
+ const int boxWidth,
+ const int boxHeight);
A_DELETE_COPY(FlowContainer)
diff --git a/src/gui/widgets/guitable.cpp b/src/gui/widgets/guitable.cpp
index 1b1124cff..84bc19e0e 100644
--- a/src/gui/widgets/guitable.cpp
+++ b/src/gui/widgets/guitable.cpp
@@ -94,9 +94,9 @@ void GuiTableActionListener::action(const ActionEvent &actionEvent A_UNUSED)
GuiTable::GuiTable(const Widget2 *const widget,
- TableModel *const initial_model, const bool opacity) :
- gcn::Widget(),
- Widget2(widget),
+ TableModel *const initial_model,
+ const bool opacity) :
+ gcn::Widget(widget),
MouseListener(),
KeyListener(),
mModel(nullptr),
diff --git a/src/gui/widgets/guitable.h b/src/gui/widgets/guitable.h
index ab7dc1a66..d68e222ac 100644
--- a/src/gui/widgets/guitable.h
+++ b/src/gui/widgets/guitable.h
@@ -47,7 +47,6 @@ class GuiTableActionListener;
* \ingroup GUI
*/
class GuiTable final : public gcn::Widget,
- public Widget2,
public MouseListener,
public KeyListener,
public TableModelListener
diff --git a/src/gui/widgets/horizontcontainer.cpp b/src/gui/widgets/horizontcontainer.cpp
index b2fddfcae..5d0e14903 100644
--- a/src/gui/widgets/horizontcontainer.cpp
+++ b/src/gui/widgets/horizontcontainer.cpp
@@ -24,7 +24,8 @@
#include "debug.h"
HorizontContainer::HorizontContainer(const Widget2 *const widget,
- const int height, const int spacing) :
+ const int height,
+ const int spacing) :
Container(widget),
WidgetListener(),
mSpacing(spacing),
diff --git a/src/gui/widgets/horizontcontainer.h b/src/gui/widgets/horizontcontainer.h
index 4f652df64..9a873272c 100644
--- a/src/gui/widgets/horizontcontainer.h
+++ b/src/gui/widgets/horizontcontainer.h
@@ -38,7 +38,8 @@ class HorizontContainer final : public Container,
{
public:
HorizontContainer(const Widget2 *const widget,
- const int height, const int spacing);
+ const int height,
+ const int spacing);
A_DELETE_COPY(HorizontContainer)
diff --git a/src/gui/widgets/icon.cpp b/src/gui/widgets/icon.cpp
index 66313d397..73607c048 100644
--- a/src/gui/widgets/icon.cpp
+++ b/src/gui/widgets/icon.cpp
@@ -27,9 +27,9 @@
#include "debug.h"
-Icon::Icon(const Widget2 *const widget, const std::string &file) :
- gcn::Widget(),
- Widget2(widget),
+Icon::Icon(const Widget2 *const widget,
+ const std::string &file) :
+ gcn::Widget(widget),
mImage(ResourceManager::getInstance()->getImage(file))
{
if (mImage)
@@ -39,9 +39,9 @@ Icon::Icon(const Widget2 *const widget, const std::string &file) :
}
}
-Icon::Icon(const Widget2 *const widget, Image *const image) :
- gcn::Widget(),
- Widget2(widget),
+Icon::Icon(const Widget2 *const widget,
+ Image *const image) :
+ gcn::Widget(widget),
mImage(image)
{
if (mImage)
diff --git a/src/gui/widgets/icon.h b/src/gui/widgets/icon.h
index a39cec517..9dc4827ac 100644
--- a/src/gui/widgets/icon.h
+++ b/src/gui/widgets/icon.h
@@ -36,19 +36,20 @@ class Image;
*
* \ingroup GUI
*/
-class Icon final : public gcn::Widget,
- public Widget2
+class Icon final : public gcn::Widget
{
public:
/**
* Constructor.
*/
- Icon(const Widget2 *const widget, const std::string &filename);
+ Icon(const Widget2 *const widget,
+ const std::string &filename);
/**
* Constructor, uses an existing Image.
*/
- Icon(const Widget2 *const widget, Image *const image);
+ Icon(const Widget2 *const widget,
+ Image *const image);
A_DELETE_COPY(Icon)
diff --git a/src/gui/widgets/inttextfield.cpp b/src/gui/widgets/inttextfield.cpp
index e693526f0..6d8eed228 100644
--- a/src/gui/widgets/inttextfield.cpp
+++ b/src/gui/widgets/inttextfield.cpp
@@ -33,9 +33,12 @@
#include "utils/stringutils.h"
#include "debug.h"
-IntTextField::IntTextField(const Widget2 *const widget, const int def,
- const int min, const int max,
- const bool enabled, const int width) :
+IntTextField::IntTextField(const Widget2 *const widget,
+ const int def,
+ const int min,
+ const int max,
+ const bool enabled,
+ const int width) :
TextField(widget, toString(def)),
mMin(0),
mMax(0),
diff --git a/src/gui/widgets/inttextfield.h b/src/gui/widgets/inttextfield.h
index 2e4e68083..91b076e30 100644
--- a/src/gui/widgets/inttextfield.h
+++ b/src/gui/widgets/inttextfield.h
@@ -34,9 +34,12 @@ class IntTextField final : public TextField
/**
* Constructor, sets default value.
*/
- explicit IntTextField(const Widget2 *const widget, const int def = 0,
- const int min = 0, const int max = 0,
- const bool enabled = true, const int width = 0);
+ explicit IntTextField(const Widget2 *const widget,
+ const int def = 0,
+ const int min = 0,
+ const int max = 0,
+ const bool enabled = true,
+ const int width = 0);
A_DELETE_COPY(IntTextField)
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index b0f887fa2..85f020af4 100644
--- a/src/gui/widgets/itemcontainer.cpp
+++ b/src/gui/widgets/itemcontainer.cpp
@@ -158,8 +158,7 @@ namespace
ItemContainer::ItemContainer(const Widget2 *const widget,
Inventory *const inventory,
const bool forceQuantity) :
- gcn::Widget(),
- Widget2(widget),
+ gcn::Widget(widget),
KeyListener(),
MouseListener(),
WidgetListener(),
diff --git a/src/gui/widgets/itemcontainer.h b/src/gui/widgets/itemcontainer.h
index 4f530320d..76dd51ef7 100644
--- a/src/gui/widgets/itemcontainer.h
+++ b/src/gui/widgets/itemcontainer.h
@@ -47,7 +47,6 @@ class SelectionListener;
* \ingroup GUI
*/
class ItemContainer final : public gcn::Widget,
- public Widget2,
public KeyListener,
public MouseListener,
public WidgetListener
diff --git a/src/gui/widgets/label.cpp b/src/gui/widgets/label.cpp
index 6cc94cc3d..73e3bca64 100644
--- a/src/gui/widgets/label.cpp
+++ b/src/gui/widgets/label.cpp
@@ -29,16 +29,15 @@ Skin *Label::mSkin = nullptr;
int Label::mInstances = 0;
Label::Label(const Widget2 *const widget) :
- gcn::Label(),
- Widget2(widget),
+ gcn::Label(widget),
mPadding(0)
{
init();
}
-Label::Label(const Widget2 *const widget, const std::string &caption) :
- gcn::Label(caption),
- Widget2(widget),
+Label::Label(const Widget2 *const widget,
+ const std::string &caption) :
+ gcn::Label(widget, caption),
mPadding(0)
{
init();
diff --git a/src/gui/widgets/label.h b/src/gui/widgets/label.h
index 0b96b87e4..b6adf9fba 100644
--- a/src/gui/widgets/label.h
+++ b/src/gui/widgets/label.h
@@ -36,7 +36,7 @@ class Skin;
*
* \ingroup GUI
*/
-class Label final : public gcn::Label, public Widget2
+class Label final : public gcn::Label
{
public:
/**
@@ -48,7 +48,8 @@ class Label final : public gcn::Label, public Widget2
* Constructor. This version of the constructor sets the label with an
* inintialization string.
*/
- Label(const Widget2 *const widget, const std::string &caption);
+ Label(const Widget2 *const widget,
+ const std::string &caption);
A_DELETE_COPY(Label)
diff --git a/src/gui/widgets/listbox.cpp b/src/gui/widgets/listbox.cpp
index c2fa1a686..a57dc07cd 100644
--- a/src/gui/widgets/listbox.cpp
+++ b/src/gui/widgets/listbox.cpp
@@ -43,8 +43,7 @@ float ListBox::mAlpha = 1.0;
ListBox::ListBox(const Widget2 *const widget,
gcn::ListModel *const listModel,
const std::string &skin) :
- gcn::ListBox(listModel),
- Widget2(widget),
+ gcn::ListBox(widget, listModel),
mHighlightColor(getThemeColor(Theme::HIGHLIGHT)),
mForegroundSelectedColor(getThemeColor(Theme::LISTBOX_SELECTED)),
mForegroundSelectedColor2(getThemeColor(Theme::LISTBOX_SELECTED_OUTLINE)),
diff --git a/src/gui/widgets/listbox.h b/src/gui/widgets/listbox.h
index adf266f7e..cd20ea50a 100644
--- a/src/gui/widgets/listbox.h
+++ b/src/gui/widgets/listbox.h
@@ -38,8 +38,7 @@ class Skin;
*
* \ingroup GUI
*/
-class ListBox : public gcn::ListBox,
- public Widget2
+class ListBox : public gcn::ListBox
{
public:
/**
diff --git a/src/gui/widgets/playerbox.cpp b/src/gui/widgets/playerbox.cpp
index 97fd4a713..976a1c8f9 100644
--- a/src/gui/widgets/playerbox.cpp
+++ b/src/gui/widgets/playerbox.cpp
@@ -34,8 +34,7 @@ PlayerBox::PlayerBox(Widget2 *const widget,
Being *const being,
const std::string &skin,
const std::string &selectedSkin) :
- Widget2(widget),
- ScrollArea(),
+ ScrollArea(widget),
mBeing(being),
mAlpha(1.0),
mBackground(),
@@ -53,8 +52,7 @@ PlayerBox::PlayerBox(Widget2 *const widget,
PlayerBox::PlayerBox(Widget2 *const widget,
const std::string &skin,
const std::string &selectedSkin) :
- Widget2(widget),
- ScrollArea(),
+ ScrollArea(widget),
mBeing(nullptr),
mAlpha(1.0),
mBackground(),
diff --git a/src/gui/widgets/playerbox.h b/src/gui/widgets/playerbox.h
index 3669a23a9..d3fb4e5e3 100644
--- a/src/gui/widgets/playerbox.h
+++ b/src/gui/widgets/playerbox.h
@@ -37,8 +37,7 @@ class Skin;
*
* \ingroup GUI
*/
-class PlayerBox final : public Widget2,
- public gcn::ScrollArea
+class PlayerBox final : public gcn::ScrollArea
{
public:
/**
diff --git a/src/gui/widgets/popuplist.cpp b/src/gui/widgets/popuplist.cpp
index 62bc2f448..133cbd2ca 100644
--- a/src/gui/widgets/popuplist.cpp
+++ b/src/gui/widgets/popuplist.cpp
@@ -37,7 +37,7 @@ PopupList::PopupList(DropDown *const widget,
mListBox(extended ? new ExtendedListBox(
widget, listModel, "extendedlistbox.xml", 0) :
new ListBox(widget, listModel, "popuplistbox.xml")),
- mScrollArea(new ScrollArea(mListBox, false)),
+ mScrollArea(new ScrollArea(this, mListBox, false)),
mDropDown(widget),
mPressedIndex(-2),
mModal(modal)
diff --git a/src/gui/widgets/progressbar.cpp b/src/gui/widgets/progressbar.cpp
index a1f597da8..b44b6a1a0 100644
--- a/src/gui/widgets/progressbar.cpp
+++ b/src/gui/widgets/progressbar.cpp
@@ -33,12 +33,14 @@
int ProgressBar::mInstances = 0;
float ProgressBar::mAlpha = 1.0;
-ProgressBar::ProgressBar(const Widget2 *const widget, float progress,
- const int width, const int height,
+ProgressBar::ProgressBar(const Widget2 *const widget,
+ float progress,
+ const int width,
+ const int height,
const int backColor,
- const std::string &skin, const std::string &skinFill):
- gcn::Widget(),
- Widget2(widget),
+ const std::string &skin,
+ const std::string &skinFill):
+ gcn::Widget(widget),
WidgetListener(),
mFillRect(),
mSkin(nullptr),
diff --git a/src/gui/widgets/progressbar.h b/src/gui/widgets/progressbar.h
index 86e314e16..1d4d83687 100644
--- a/src/gui/widgets/progressbar.h
+++ b/src/gui/widgets/progressbar.h
@@ -42,17 +42,19 @@ class Skin;
* \ingroup GUI
*/
class ProgressBar final : public gcn::Widget,
- public Widget2,
public WidgetListener
{
public:
/**
* Constructor, initializes the progress with the given value.
*/
- ProgressBar(const Widget2 *const widget, float progress,
- const int width, const int height,
+ ProgressBar(const Widget2 *const widget,
+ float progress,
+ const int width,
+ const int height,
const int backColor,
- const std::string &skin, const std::string &skinFill);
+ const std::string &skin,
+ const std::string &skinFill);
A_DELETE_COPY(ProgressBar)
diff --git a/src/gui/widgets/progressindicator.cpp b/src/gui/widgets/progressindicator.cpp
index 198094b6d..8d4cdd67c 100644
--- a/src/gui/widgets/progressindicator.cpp
+++ b/src/gui/widgets/progressindicator.cpp
@@ -29,8 +29,7 @@
#include "debug.h"
ProgressIndicator::ProgressIndicator(Widget2 *const widget) :
- gcn::Widget(),
- Widget2(widget),
+ gcn::Widget(widget),
mIndicator(nullptr)
{
ImageSet *const images = Theme::getImageSetFromTheme(
diff --git a/src/gui/widgets/progressindicator.h b/src/gui/widgets/progressindicator.h
index 7357931e9..08526c7c2 100644
--- a/src/gui/widgets/progressindicator.h
+++ b/src/gui/widgets/progressindicator.h
@@ -34,8 +34,7 @@ class SimpleAnimation;
* A widget that indicates progress. Suitable to use instead of a progress bar
* in cases where it is unknown how long something is going to take.
*/
-class ProgressIndicator final : public gcn::Widget,
- public Widget2
+class ProgressIndicator final : public gcn::Widget
{
public:
ProgressIndicator(Widget2 *const widget);
diff --git a/src/gui/widgets/radiobutton.cpp b/src/gui/widgets/radiobutton.cpp
index 984d84d76..d52295b57 100644
--- a/src/gui/widgets/radiobutton.cpp
+++ b/src/gui/widgets/radiobutton.cpp
@@ -42,8 +42,7 @@ RadioButton::RadioButton(const Widget2 *const widget,
const std::string &restrict caption,
const std::string &restrict group,
const bool marked):
- gcn::RadioButton(caption, group, marked),
- Widget2(widget),
+ gcn::RadioButton(widget, caption, group, marked),
mPadding(0),
mImagePadding(0),
mImageSize(9),
diff --git a/src/gui/widgets/radiobutton.h b/src/gui/widgets/radiobutton.h
index 6c33447c4..faff6bc0e 100644
--- a/src/gui/widgets/radiobutton.h
+++ b/src/gui/widgets/radiobutton.h
@@ -34,8 +34,7 @@ class Skin;
/**
* Guichan based RadioButton with custom look
*/
-class RadioButton final : public gcn::RadioButton,
- public Widget2
+class RadioButton final : public gcn::RadioButton
{
public:
/**
diff --git a/src/gui/widgets/radiogroup.h b/src/gui/widgets/radiogroup.h
index 0fd1f2605..d0bf18532 100644
--- a/src/gui/widgets/radiogroup.h
+++ b/src/gui/widgets/radiogroup.h
@@ -29,7 +29,8 @@ class RadioGroup final : public WidgetGroup
{
public:
RadioGroup(const Widget2 *const widget,
- const std::string &group, const int height,
+ const std::string &group,
+ const int height,
const int spacing);
A_DELETE_COPY(RadioGroup)
diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp
index 708949f9c..6dd2be526 100644
--- a/src/gui/widgets/scrollarea.cpp
+++ b/src/gui/widgets/scrollarea.cpp
@@ -45,36 +45,11 @@ static std::string const buttonFiles[2] =
"scrollbuttons_pressed.xml"
};
-ScrollArea::ScrollArea(Widget2 *const widget,
- const bool opaque,
- const std::string &skin) :
- gcn::ScrollArea(),
- Widget2(widget),
- WidgetListener(),
- mX(0),
- mY(0),
- mClickX(0),
- mClickY(0),
- mVertexes(new ImageCollection),
- mVertexes2(new ImageCollection),
- mXOffset(0),
- mYOffset(0),
- mDrawWidth(0),
- mDrawHeight(0),
- mHasMouse(false),
- mRedraw(true)
-{
- mOpaque = opaque;
- addWidgetListener(this);
- init(skin);
-}
-
ScrollArea::ScrollArea(Widget2 *const widget2,
gcn::Widget *const widget,
const bool opaque,
const std::string &skin) :
- gcn::ScrollArea(widget),
- Widget2(widget2),
+ gcn::ScrollArea(widget2, widget),
WidgetListener(),
mX(0),
mY(0),
diff --git a/src/gui/widgets/scrollarea.h b/src/gui/widgets/scrollarea.h
index bc25baa27..bc652e296 100644
--- a/src/gui/widgets/scrollarea.h
+++ b/src/gui/widgets/scrollarea.h
@@ -44,27 +44,18 @@ class ImageCollection;
* \ingroup GUI
*/
class ScrollArea final : public gcn::ScrollArea,
- public Widget2,
public WidgetListener
{
public:
/**
- * Constructor that takes no content. Needed for use with the DropDown
- * class.
- */
- explicit ScrollArea(Widget2 *const widget,
- const bool opaque = true,
- const std::string &skin = "");
-
- /**
* Constructor.
*
* @param content the initial content to show in the scroll area
*/
- explicit ScrollArea(Widget2 *const widget2,
- gcn::Widget *const widget,
- const bool opaque = true,
- const std::string &skin = "");
+ ScrollArea(Widget2 *const widget2,
+ gcn::Widget *const widget,
+ const bool opaque = true,
+ const std::string &skin = "");
A_DELETE_COPY(ScrollArea)
diff --git a/src/gui/widgets/shortcutcontainer.cpp b/src/gui/widgets/shortcutcontainer.cpp
index 866dde6f1..5df0eafb0 100644
--- a/src/gui/widgets/shortcutcontainer.cpp
+++ b/src/gui/widgets/shortcutcontainer.cpp
@@ -29,8 +29,7 @@
float ShortcutContainer::mAlpha = 1.0;
ShortcutContainer::ShortcutContainer(Widget2 *const widget) :
- gcn::Widget(),
- Widget2(widget),
+ gcn::Widget(widget),
WidgetListener(),
MouseListener(),
mBackgroundImg(nullptr),
diff --git a/src/gui/widgets/shortcutcontainer.h b/src/gui/widgets/shortcutcontainer.h
index 8df401775..610cfef1f 100644
--- a/src/gui/widgets/shortcutcontainer.h
+++ b/src/gui/widgets/shortcutcontainer.h
@@ -38,7 +38,6 @@ class ImageCollection;
* \ingroup GUI
*/
class ShortcutContainer : public gcn::Widget,
- public Widget2,
public WidgetListener,
public MouseListener
{
diff --git a/src/gui/widgets/slider.cpp b/src/gui/widgets/slider.cpp
index c5988ff54..0c9b74202 100644
--- a/src/gui/widgets/slider.cpp
+++ b/src/gui/widgets/slider.cpp
@@ -45,8 +45,7 @@ static std::string const data[2] =
Slider::Slider(Widget2 *const widget,
const double scaleEnd) :
- gcn::Slider(scaleEnd),
- Widget2(widget),
+ gcn::Slider(widget, scaleEnd),
mVertexes(new ImageCollection),
mHasMouse(false),
mRedraw(true)
@@ -57,8 +56,7 @@ Slider::Slider(Widget2 *const widget,
Slider::Slider(Widget2 *const widget,
const double scaleStart,
const double scaleEnd) :
- gcn::Slider(scaleStart, scaleEnd),
- Widget2(widget),
+ gcn::Slider(widget, scaleStart, scaleEnd),
mVertexes(new ImageCollection),
mHasMouse(false),
mRedraw(true)
diff --git a/src/gui/widgets/slider.h b/src/gui/widgets/slider.h
index 27b03976d..d03799cae 100644
--- a/src/gui/widgets/slider.h
+++ b/src/gui/widgets/slider.h
@@ -36,8 +36,7 @@ class ImageCollection;
*
* \ingroup GUI
*/
-class Slider final : public gcn::Slider,
- public Widget2
+class Slider final : public gcn::Slider
{
public:
/**
diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp
index 0527486ad..af5892845 100644
--- a/src/gui/widgets/tabbedarea.cpp
+++ b/src/gui/widgets/tabbedarea.cpp
@@ -78,15 +78,14 @@
#include "debug.h"
TabbedArea::TabbedArea(const Widget2 *const widget) :
- Widget2(widget),
ActionListener(),
- gcn::BasicContainer(),
+ gcn::BasicContainer(widget),
KeyListener(),
MouseListener(),
WidgetListener(),
mSelectedTab(nullptr),
- mTabContainer(new gcn::Container()),
- mWidgetContainer(new gcn::Container()),
+ mTabContainer(new gcn::Container(widget)),
+ mWidgetContainer(new gcn::Container(widget)),
mTabsToDelete(),
mTabs(),
mTabsWidth(0),
diff --git a/src/gui/widgets/tabbedarea.h b/src/gui/widgets/tabbedarea.h
index 7ac24165b..1d0794c5c 100644
--- a/src/gui/widgets/tabbedarea.h
+++ b/src/gui/widgets/tabbedarea.h
@@ -83,8 +83,7 @@ class Tab;
/**
* A tabbed area, the same as the guichan tabbed area in 0.8, but extended
*/
-class TabbedArea final : public Widget2,
- public ActionListener,
+class TabbedArea final : public ActionListener,
public gcn::BasicContainer,
public KeyListener,
public MouseListener,
diff --git a/src/gui/widgets/tabs/chattab.cpp b/src/gui/widgets/tabs/chattab.cpp
index 331101209..283f1927e 100644
--- a/src/gui/widgets/tabs/chattab.cpp
+++ b/src/gui/widgets/tabs/chattab.cpp
@@ -50,12 +50,13 @@
static const unsigned int MAX_WORD_SIZE = 50;
-ChatTab::ChatTab(const Widget2 *const widget, const std::string &name,
+ChatTab::ChatTab(const Widget2 *const widget,
+ const std::string &name,
const std::string &channel) :
Tab(widget),
mTextOutput(new BrowserBox(this, BrowserBox::AUTO_WRAP, true,
"browserbox.xml")),
- mScrollArea(new ScrollArea(mTextOutput, false)),
+ mScrollArea(new ScrollArea(this, mTextOutput, false)),
mChannelName(channel),
mAllowHightlight(true),
mRemoveNames(false),
diff --git a/src/gui/widgets/tabs/chattab.h b/src/gui/widgets/tabs/chattab.h
index 651e69d6b..a46279483 100644
--- a/src/gui/widgets/tabs/chattab.h
+++ b/src/gui/widgets/tabs/chattab.h
@@ -58,7 +58,8 @@ class ChatTab : public Tab
/**
* Constructor.
*/
- ChatTab(const Widget2 *const widget, const std::string &name,
+ ChatTab(const Widget2 *const widget,
+ const std::string &name,
const std::string &channel);
A_DELETE_COPY(ChatTab)
diff --git a/src/gui/widgets/tabs/guildchattab.h b/src/gui/widgets/tabs/guildchattab.h
index fbfd3a032..cfcf901ca 100644
--- a/src/gui/widgets/tabs/guildchattab.h
+++ b/src/gui/widgets/tabs/guildchattab.h
@@ -28,7 +28,8 @@
/**
* A tab for a guild chat channel.
*/
-class GuildChatTab final : public ChatTab, public ConfigListener
+class GuildChatTab final : public ChatTab,
+ public ConfigListener
{
public:
explicit GuildChatTab(const Widget2 *const widget);
diff --git a/src/gui/widgets/tabs/langtab.cpp b/src/gui/widgets/tabs/langtab.cpp
index fb6a5e12b..f5064be8c 100644
--- a/src/gui/widgets/tabs/langtab.cpp
+++ b/src/gui/widgets/tabs/langtab.cpp
@@ -26,7 +26,8 @@
#include "debug.h"
-LangTab::LangTab(const Widget2 *const widget, const std::string &lang) :
+LangTab::LangTab(const Widget2 *const widget,
+ const std::string &lang) :
// TRANSLATORS: lang chat tab name
ChatTab(widget, _("Lang"), lang + " ")
{
diff --git a/src/gui/widgets/tabs/langtab.h b/src/gui/widgets/tabs/langtab.h
index 275b69399..e036e4dd8 100644
--- a/src/gui/widgets/tabs/langtab.h
+++ b/src/gui/widgets/tabs/langtab.h
@@ -26,7 +26,8 @@
class LangTab final : public ChatTab
{
public:
- LangTab(const Widget2 *const widget, const std::string &lang);
+ LangTab(const Widget2 *const widget,
+ const std::string &lang);
A_DELETE_COPY(LangTab)
diff --git a/src/gui/widgets/tabs/setup_colors.cpp b/src/gui/widgets/tabs/setup_colors.cpp
index 8ea9d5fbb..2aaad6301 100644
--- a/src/gui/widgets/tabs/setup_colors.cpp
+++ b/src/gui/widgets/tabs/setup_colors.cpp
@@ -49,11 +49,12 @@ Setup_Colors::Setup_Colors(const Widget2 *const widget) :
SetupTab(widget),
SelectionListener(),
mColorBox(new ListBox(this, userPalette, "")),
- mScroll(new ScrollArea(mColorBox, true, "setup_colors_background.xml")),
+ mScroll(new ScrollArea(this, mColorBox,
+ true, "setup_colors_background.xml")),
mPreview(new BrowserBox(this, BrowserBox::AUTO_WRAP, true,
"browserbox.xml")),
mTextPreview(new TextPreview(this, gettext(rawmsg))),
- mPreviewBox(new ScrollArea(mPreview, true,
+ mPreviewBox(new ScrollArea(this, mPreview, true,
"setup_colors_preview_background.xml")),
mSelected(-1),
// TRANSLATORS: colors tab. label.
diff --git a/src/gui/widgets/tabs/setup_input.cpp b/src/gui/widgets/tabs/setup_input.cpp
index 22bea9a75..72d05d966 100644
--- a/src/gui/widgets/tabs/setup_input.cpp
+++ b/src/gui/widgets/tabs/setup_input.cpp
@@ -103,7 +103,8 @@ Setup_Input::Setup_Input(const Widget2 *const widget) :
// TRANSLATORS: button in input settings tab
mResetKeysButton(new Button(this, _("Reset all keys"), "resetkeys", this)),
mTabs(new TabStrip(this, config.getIntValue("fontSize") + 10)),
- mScrollArea(new ScrollArea(mKeyList, true, "setup_input_background.xml")),
+ mScrollArea(new ScrollArea(this, mKeyList,
+ true, "setup_input_background.xml")),
mKeySetting(false),
mActionDataSize(new int [9])
{
diff --git a/src/gui/widgets/tabs/setup_relations.cpp b/src/gui/widgets/tabs/setup_relations.cpp
index d23ac565c..35bd2094a 100644
--- a/src/gui/widgets/tabs/setup_relations.cpp
+++ b/src/gui/widgets/tabs/setup_relations.cpp
@@ -249,7 +249,7 @@ Setup_Relations::Setup_Relations(const Widget2 *const widget) :
mPlayerTableModel(new PlayerTableModel(this)),
mPlayerTable(new GuiTable(this, mPlayerTableModel)),
mPlayerTitleTable(new GuiTable(this, mPlayerTableTitleModel)),
- mPlayerScrollArea(new ScrollArea(mPlayerTable)),
+ mPlayerScrollArea(new ScrollArea(this, mPlayerTable)),
// TRANSLATORS: relation dialog button
mDefaultTrading(new CheckBox(this, _("Allow trading"),
player_relations.getDefault() & PlayerRelation::TRADE)),
diff --git a/src/gui/widgets/tabs/setup_video.cpp b/src/gui/widgets/tabs/setup_video.cpp
index be00937f2..d2ef01378 100644
--- a/src/gui/widgets/tabs/setup_video.cpp
+++ b/src/gui/widgets/tabs/setup_video.cpp
@@ -224,7 +224,7 @@ Setup_Video::Setup_Video(const Widget2 *const widget) :
// TRANSLATORS: video settings tab name
setName(_("Video"));
- ScrollArea *const scrollArea = new ScrollArea(mModeList,
+ ScrollArea *const scrollArea = new ScrollArea(this, mModeList,
true, "setup_video_background.xml");
scrollArea->setWidth(150);
scrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
diff --git a/src/gui/widgets/tabs/setup_video.h b/src/gui/widgets/tabs/setup_video.h
index b385d0358..250fac0e0 100644
--- a/src/gui/widgets/tabs/setup_video.h
+++ b/src/gui/widgets/tabs/setup_video.h
@@ -37,7 +37,8 @@ class OpenGLListModel;
class Slider;
class TextDialog;
-class Setup_Video final : public SetupTab, public KeyListener
+class Setup_Video final : public SetupTab,
+ public KeyListener
{
public:
explicit Setup_Video(const Widget2 *const widget);
diff --git a/src/gui/widgets/tabs/setuptabscroll.cpp b/src/gui/widgets/tabs/setuptabscroll.cpp
index 9a37ced42..9c185b2bb 100644
--- a/src/gui/widgets/tabs/setuptabscroll.cpp
+++ b/src/gui/widgets/tabs/setuptabscroll.cpp
@@ -29,7 +29,7 @@
SetupTabScroll::SetupTabScroll(const Widget2 *const widget) :
SetupTab(widget),
mContainer(new VertContainer(this, 25, false, 8)),
- mScroll(new ScrollArea(mContainer, false)),
+ mScroll(new ScrollArea(this, mContainer, false)),
mItems(),
mAllItems(),
mPreferredFirstItemSize(200)
diff --git a/src/gui/widgets/tabs/tab.cpp b/src/gui/widgets/tabs/tab.cpp
index 87bd8bde2..c1650e8a8 100644
--- a/src/gui/widgets/tabs/tab.cpp
+++ b/src/gui/widgets/tabs/tab.cpp
@@ -87,8 +87,7 @@ static std::string const data[Tab::TAB_COUNT] =
Skin *Tab::tabImg[Tab::TAB_COUNT];
Tab::Tab(const Widget2 *const widget) :
- gcn::BasicContainer(),
- Widget2(widget),
+ gcn::BasicContainer(widget),
MouseListener(),
WidgetListener(),
mLabel(new Label(this)),
diff --git a/src/gui/widgets/tabs/tab.h b/src/gui/widgets/tabs/tab.h
index c186a0b4e..878663e36 100644
--- a/src/gui/widgets/tabs/tab.h
+++ b/src/gui/widgets/tabs/tab.h
@@ -84,7 +84,6 @@ class TabbedArea;
* A tab, the same as the Guichan tab in 0.8, but extended
*/
class Tab : public gcn::BasicContainer,
- public Widget2,
public MouseListener,
public WidgetListener
{
diff --git a/src/gui/widgets/tabs/whispertab.cpp b/src/gui/widgets/tabs/whispertab.cpp
index ec02bb70f..023d94110 100644
--- a/src/gui/widgets/tabs/whispertab.cpp
+++ b/src/gui/widgets/tabs/whispertab.cpp
@@ -34,7 +34,8 @@
#include "debug.h"
-WhisperTab::WhisperTab(const Widget2 *const widget, const std::string &nick) :
+WhisperTab::WhisperTab(const Widget2 *const widget,
+ const std::string &nick) :
ChatTab(widget, nick, ""),
mNick(nick)
{
diff --git a/src/gui/widgets/tabs/whispertab.h b/src/gui/widgets/tabs/whispertab.h
index 5dbb05a4e..84b55ae58 100644
--- a/src/gui/widgets/tabs/whispertab.h
+++ b/src/gui/widgets/tabs/whispertab.h
@@ -57,7 +57,8 @@ class WhisperTab final : public ChatTab
*
* @param nick the name of the player this tab is whispering to
*/
- WhisperTab(const Widget2 *const widget, const std::string &nick);
+ WhisperTab(const Widget2 *const widget,
+ const std::string &nick);
~WhisperTab();
diff --git a/src/gui/widgets/tabstrip.cpp b/src/gui/widgets/tabstrip.cpp
index ca31e393d..4a72d7ccd 100644
--- a/src/gui/widgets/tabstrip.cpp
+++ b/src/gui/widgets/tabstrip.cpp
@@ -25,14 +25,16 @@
#include "debug.h"
TabStrip::TabStrip(const Widget2 *const widget,
- const std::string &group, const int height,
+ const std::string &group,
+ const int height,
const int spacing) :
WidgetGroup(widget, group, height, spacing)
{
}
TabStrip::TabStrip(const Widget2 *const widget,
- const int height, const int spacing) :
+ const int height,
+ const int spacing) :
WidgetGroup(widget, "", height, spacing)
{
}
diff --git a/src/gui/widgets/tabstrip.h b/src/gui/widgets/tabstrip.h
index 2e5ccfe34..57a178ff0 100644
--- a/src/gui/widgets/tabstrip.h
+++ b/src/gui/widgets/tabstrip.h
@@ -29,11 +29,13 @@ class TabStrip final : public WidgetGroup
{
public:
TabStrip(const Widget2 *const widget,
- const std::string &group, const int height,
+ const std::string &group,
+ const int height,
const int spacing = 0);
TabStrip(const Widget2 *const widget,
- const int height, const int spacing = 0);
+ const int height,
+ const int spacing = 0);
A_DELETE_COPY(TabStrip)
diff --git a/src/gui/widgets/textbox.cpp b/src/gui/widgets/textbox.cpp
index 0ea05e585..729d40ead 100644
--- a/src/gui/widgets/textbox.cpp
+++ b/src/gui/widgets/textbox.cpp
@@ -33,8 +33,7 @@
#include "debug.h"
TextBox::TextBox(const Widget2 *const widget) :
- gcn::TextBox(),
- Widget2(widget),
+ gcn::TextBox(widget),
mMinWidth(getWidth())
{
mForegroundColor = getThemeColor(Theme::TEXTBOX);
diff --git a/src/gui/widgets/textbox.h b/src/gui/widgets/textbox.h
index 6b0429483..fe719faf8 100644
--- a/src/gui/widgets/textbox.h
+++ b/src/gui/widgets/textbox.h
@@ -36,8 +36,7 @@
*
* \ingroup GUI
*/
-class TextBox final : public gcn::TextBox,
- public Widget2
+class TextBox final : public gcn::TextBox
{
public:
/**
diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp
index 4dd2f1c7b..eb1484449 100644
--- a/src/gui/widgets/textfield.cpp
+++ b/src/gui/widgets/textfield.cpp
@@ -54,9 +54,8 @@ TextField::TextField(const Widget2 *restrict const widget,
ActionListener *restrict const listener,
const std::string &restrict eventId,
const bool sendAlwaysEvents):
- gcn::TextField(text),
+ gcn::TextField(widget, text),
FocusListener(),
- Widget2(widget),
mSendAlwaysEvents(sendAlwaysEvents),
mCaretColor(&getThemeColor(Theme::CARET)),
mPopupMenu(nullptr),
diff --git a/src/gui/widgets/textfield.h b/src/gui/widgets/textfield.h
index ed08de2fa..bfa721b7a 100644
--- a/src/gui/widgets/textfield.h
+++ b/src/gui/widgets/textfield.h
@@ -39,8 +39,7 @@ class PopupMenu;
* \ingroup GUI
*/
class TextField : public gcn::TextField,
- public FocusListener,
- public Widget2
+ public FocusListener
{
public:
/**
diff --git a/src/gui/widgets/textpreview.cpp b/src/gui/widgets/textpreview.cpp
index 2caf2e44c..1344c647a 100644
--- a/src/gui/widgets/textpreview.cpp
+++ b/src/gui/widgets/textpreview.cpp
@@ -35,8 +35,7 @@ Skin *TextPreview::mSkin = nullptr;
TextPreview::TextPreview(const Widget2 *const widget,
const std::string &text) :
- gcn::Widget(),
- Widget2(widget),
+ gcn::Widget(widget),
mFont(gui->getFont()),
mText(text),
mTextColor(&getThemeColor(Theme::TEXT)),
diff --git a/src/gui/widgets/textpreview.h b/src/gui/widgets/textpreview.h
index cb524a974..532175a82 100644
--- a/src/gui/widgets/textpreview.h
+++ b/src/gui/widgets/textpreview.h
@@ -32,11 +32,11 @@
/**
* Preview widget for particle colors, etc.
*/
-class TextPreview final : public gcn::Widget,
- public Widget2
+class TextPreview final : public gcn::Widget
{
public:
- TextPreview(const Widget2 *const widget, const std::string &text);
+ TextPreview(const Widget2 *const widget,
+ const std::string &text);
A_DELETE_COPY(TextPreview)
diff --git a/src/gui/widgets/vertcontainer.cpp b/src/gui/widgets/vertcontainer.cpp
index e38ebb9af..9d596d620 100644
--- a/src/gui/widgets/vertcontainer.cpp
+++ b/src/gui/widgets/vertcontainer.cpp
@@ -24,7 +24,8 @@
#include "debug.h"
VertContainer::VertContainer(const Widget2 *const widget,
- const int verticalItemSize, const bool resizable,
+ const int verticalItemSize,
+ const bool resizable,
const int leftSpacing) :
Container(widget),
WidgetListener(),
diff --git a/src/gui/widgets/vertcontainer.h b/src/gui/widgets/vertcontainer.h
index 1d396efc9..5fb212b48 100644
--- a/src/gui/widgets/vertcontainer.h
+++ b/src/gui/widgets/vertcontainer.h
@@ -40,7 +40,8 @@ class VertContainer final : public Container,
{
public:
VertContainer(const Widget2 *const widget,
- const int verticalItemSize, const bool resizable = true,
+ const int verticalItemSize,
+ const bool resizable = true,
const int leftSpacing = 0);
A_DELETE_COPY(VertContainer)
diff --git a/src/gui/widgets/widgetgroup.cpp b/src/gui/widgets/widgetgroup.cpp
index 3957fab30..4a0065ca8 100644
--- a/src/gui/widgets/widgetgroup.cpp
+++ b/src/gui/widgets/widgetgroup.cpp
@@ -23,7 +23,8 @@
#include "debug.h"
WidgetGroup::WidgetGroup(const Widget2 *const widget,
- const std::string &group, const int height,
+ const std::string &group,
+ const int height,
const int spacing) :
Container(widget),
WidgetListener(),
diff --git a/src/gui/widgets/widgetgroup.h b/src/gui/widgets/widgetgroup.h
index b26d88d15..37523fcdc 100644
--- a/src/gui/widgets/widgetgroup.h
+++ b/src/gui/widgets/widgetgroup.h
@@ -54,7 +54,8 @@ class WidgetGroup : public Container,
protected:
WidgetGroup(const Widget2 *const widget,
- const std::string &group, const int height,
+ const std::string &group,
+ const int height,
const int spacing);
int mSpacing;
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp
index 82c2d91f8..d26580fc2 100644
--- a/src/gui/widgets/window.cpp
+++ b/src/gui/widgets/window.cpp
@@ -48,8 +48,7 @@ int Window::mouseResize = 0;
Window::Window(const std::string &caption, const bool modal,
Window *const parent, std::string skin) :
- gcn::Window(caption),
- Widget2(nullptr),
+ gcn::Window(nullptr, caption),
WidgetListener(),
mSkin(nullptr),
mDefaultX(0),
diff --git a/src/gui/widgets/window.h b/src/gui/widgets/window.h
index c6b2ca2cb..64963be3e 100644
--- a/src/gui/widgets/window.h
+++ b/src/gui/widgets/window.h
@@ -47,7 +47,6 @@ class WindowContainer;
* \ingroup GUI
*/
class Window : public gcn::Window,
- public Widget2,
private WidgetListener
{
public: