summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/base/basiccontainer.hpp4
-rw-r--r--src/gui/base/widget.cpp3
-rw-r--r--src/gui/base/widget.hpp6
-rw-r--r--src/gui/base/widgets/button.cpp9
-rw-r--r--src/gui/base/widgets/button.hpp5
-rw-r--r--src/gui/base/widgets/checkbox.cpp10
-rw-r--r--src/gui/base/widgets/checkbox.hpp6
-rw-r--r--src/gui/base/widgets/container.cpp4
-rw-r--r--src/gui/base/widgets/container.hpp2
-rw-r--r--src/gui/base/widgets/label.cpp9
-rw-r--r--src/gui/base/widgets/label.hpp5
-rw-r--r--src/gui/base/widgets/listbox.cpp9
-rw-r--r--src/gui/base/widgets/listbox.hpp5
-rw-r--r--src/gui/base/widgets/radiobutton.cpp9
-rw-r--r--src/gui/base/widgets/radiobutton.hpp5
-rw-r--r--src/gui/base/widgets/scrollarea.cpp14
-rw-r--r--src/gui/base/widgets/scrollarea.hpp8
-rw-r--r--src/gui/base/widgets/slider.cpp11
-rw-r--r--src/gui/base/widgets/slider.hpp7
-rw-r--r--src/gui/base/widgets/textbox.cpp9
-rw-r--r--src/gui/base/widgets/textbox.hpp5
-rw-r--r--src/gui/base/widgets/textfield.cpp9
-rw-r--r--src/gui/base/widgets/textfield.hpp5
-rw-r--r--src/gui/base/widgets/window.cpp9
-rw-r--r--src/gui/base/widgets/window.hpp5
-rw-r--r--src/gui/popups/popupmenu.cpp2
-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
-rw-r--r--src/gui/windows/botcheckerwindow.cpp2
-rw-r--r--src/gui/windows/buydialog.cpp2
-rw-r--r--src/gui/windows/didyouknowwindow.cpp2
-rw-r--r--src/gui/windows/helpwindow.cpp3
-rw-r--r--src/gui/windows/inventorywindow.cpp4
-rw-r--r--src/gui/windows/npcdialog.cpp6
-rw-r--r--src/gui/windows/npcpostdialog.cpp2
-rw-r--r--src/gui/windows/questswindow.cpp4
-rw-r--r--src/gui/windows/selldialog.cpp2
-rw-r--r--src/gui/windows/serverdialog.cpp2
-rw-r--r--src/gui/windows/shopwindow.cpp4
-rw-r--r--src/gui/windows/shortcutwindow.cpp7
-rw-r--r--src/gui/windows/skilldialog.cpp8
-rw-r--r--src/gui/windows/socialwindow.cpp31
-rw-r--r--src/gui/windows/statuswindow.cpp4
-rw-r--r--src/gui/windows/tradewindow.cpp5
-rw-r--r--src/gui/windows/updaterwindow.cpp3
-rw-r--r--src/gui/windows/whoisonline.cpp2
-rw-r--r--src/gui/windows/worldselectdialog.cpp2
-rw-r--r--src/net/ea/gui/guildtab.h3
-rw-r--r--src/net/ea/gui/partytab.h3
123 files changed, 311 insertions, 306 deletions
diff --git a/src/gui/base/basiccontainer.hpp b/src/gui/base/basiccontainer.hpp
index 0fec2c0e7..cc3aee808 100644
--- a/src/gui/base/basiccontainer.hpp
+++ b/src/gui/base/basiccontainer.hpp
@@ -85,7 +85,9 @@ namespace gcn
public DeathListener
{
public:
- BasicContainer() :
+ BasicContainer(const Widget2 *const widget) :
+ Widget(widget),
+ DeathListener(),
mWidgets()
{ }
diff --git a/src/gui/base/widget.cpp b/src/gui/base/widget.cpp
index 9e2912d39..f5994d1af 100644
--- a/src/gui/base/widget.cpp
+++ b/src/gui/base/widget.cpp
@@ -94,7 +94,8 @@ namespace gcn
std::list<Widget*> Widget::mWidgets;
std::set<Widget*> Widget::mWidgetsSet;
- Widget::Widget() :
+ Widget::Widget(const Widget2 *const widget) :
+ Widget2(widget),
mMouseListeners(),
mKeyListeners(),
mActionListeners(),
diff --git a/src/gui/base/widget.hpp b/src/gui/base/widget.hpp
index 1c1c0ae14..013ead3b8 100644
--- a/src/gui/base/widget.hpp
+++ b/src/gui/base/widget.hpp
@@ -71,6 +71,8 @@
#include "gui/base/color.hpp"
#include "gui/base/rectangle.hpp"
+#include "gui/widgets/widget2.h"
+
#include "localconsts.h"
class ActionListener;
@@ -100,7 +102,7 @@ namespace gcn
* @author Per Larsson.
* @since 0.1.0
*/
- class Widget
+ class Widget : public Widget2
{
public:
/**
@@ -108,7 +110,7 @@ namespace gcn
* focusable as default, therefore, widgets that are supposed to be
* focusable should overide this default in their own constructor.
*/
- Widget();
+ Widget(const Widget2 *const widget);
A_DELETE_COPY(Widget)
diff --git a/src/gui/base/widgets/button.cpp b/src/gui/base/widgets/button.cpp
index 5867b9dc8..e4285cffd 100644
--- a/src/gui/base/widgets/button.cpp
+++ b/src/gui/base/widgets/button.cpp
@@ -80,8 +80,8 @@
namespace gcn
{
- Button::Button() :
- gcn::Widget(),
+ Button::Button(const Widget2 *const widget) :
+ gcn::Widget(widget),
MouseListener(),
KeyListener(),
FocusListener(),
@@ -101,8 +101,9 @@ namespace gcn
addFocusListener(this);
}
- Button::Button(const std::string& caption) :
- gcn::Widget(),
+ Button::Button(const Widget2 *const widget,
+ const std::string& caption) :
+ gcn::Widget(widget),
MouseListener(),
KeyListener(),
FocusListener(),
diff --git a/src/gui/base/widgets/button.hpp b/src/gui/base/widgets/button.hpp
index 6fee7f3b3..7fd5613bd 100644
--- a/src/gui/base/widgets/button.hpp
+++ b/src/gui/base/widgets/button.hpp
@@ -96,7 +96,7 @@ namespace gcn
/**
* Constructor.
*/
- Button();
+ explicit Button(const Widget2 *const widget);
/**
* Constructor. The button will be automatically resized
@@ -104,7 +104,8 @@ namespace gcn
*
* @param caption The caption of the button.
*/
- explicit Button(const std::string& caption);
+ Button(const Widget2 *const widget,
+ const std::string& caption);
A_DELETE_COPY(Button)
diff --git a/src/gui/base/widgets/checkbox.cpp b/src/gui/base/widgets/checkbox.cpp
index 7cba5ac47..d75fb5cb0 100644
--- a/src/gui/base/widgets/checkbox.cpp
+++ b/src/gui/base/widgets/checkbox.cpp
@@ -79,8 +79,8 @@
namespace gcn
{
- CheckBox::CheckBox() :
- gcn::Widget(),
+ CheckBox::CheckBox(const Widget2 *const widget) :
+ gcn::Widget(widget),
MouseListener(),
KeyListener(),
mSelected(false),
@@ -91,8 +91,10 @@ namespace gcn
addKeyListener(this);
}
- CheckBox::CheckBox(const std::string &caption, bool selected) :
- gcn::Widget(),
+ CheckBox::CheckBox(const Widget2 *const widget,
+ const std::string &caption,
+ bool selected) :
+ gcn::Widget(widget),
MouseListener(),
KeyListener(),
mSelected(selected),
diff --git a/src/gui/base/widgets/checkbox.hpp b/src/gui/base/widgets/checkbox.hpp
index c03187bba..d87a6b206 100644
--- a/src/gui/base/widgets/checkbox.hpp
+++ b/src/gui/base/widgets/checkbox.hpp
@@ -90,7 +90,7 @@ namespace gcn
/**
* Contructor.
*/
- CheckBox();
+ CheckBox(const Widget2 *const widget);
/**
* Constructor. The check box will be automatically resized
@@ -99,7 +99,9 @@ namespace gcn
* @param caption The caption of the check box.
* @param marked True if the check box is selected, false otherwise.
*/
- CheckBox(const std::string &caption, bool selected = false);
+ CheckBox(const Widget2 *const widget,
+ const std::string &caption,
+ bool selected = false);
A_DELETE_COPY(CheckBox)
diff --git a/src/gui/base/widgets/container.cpp b/src/gui/base/widgets/container.cpp
index 6026b920d..c79f8fcbc 100644
--- a/src/gui/base/widgets/container.cpp
+++ b/src/gui/base/widgets/container.cpp
@@ -75,8 +75,8 @@
namespace gcn
{
- Container::Container() :
- BasicContainer(),
+ Container::Container(const Widget2 *const widget) :
+ BasicContainer(widget),
mOpaque(true)
{
}
diff --git a/src/gui/base/widgets/container.hpp b/src/gui/base/widgets/container.hpp
index bffe6e884..ba3cff153 100644
--- a/src/gui/base/widgets/container.hpp
+++ b/src/gui/base/widgets/container.hpp
@@ -89,7 +89,7 @@ namespace gcn
*
* @see setOpaque, isOpaque
*/
- Container();
+ Container(const Widget2 *const widget);
/**
* Destructor.
diff --git a/src/gui/base/widgets/label.cpp b/src/gui/base/widgets/label.cpp
index cbee2ac4c..84ba87d84 100644
--- a/src/gui/base/widgets/label.cpp
+++ b/src/gui/base/widgets/label.cpp
@@ -75,15 +75,16 @@
namespace gcn
{
- Label::Label() :
- gcn::Widget(),
+ Label::Label(const Widget2 *const widget) :
+ gcn::Widget(widget),
mCaption(),
mAlignment(Graphics::LEFT)
{
}
- Label::Label(const std::string& caption) :
- gcn::Widget(),
+ Label::Label(const Widget2 *const widget,
+ const std::string& caption) :
+ gcn::Widget(widget),
mCaption(caption),
mAlignment(Graphics::LEFT)
{
diff --git a/src/gui/base/widgets/label.hpp b/src/gui/base/widgets/label.hpp
index 90a395f7b..399e4202a 100644
--- a/src/gui/base/widgets/label.hpp
+++ b/src/gui/base/widgets/label.hpp
@@ -81,7 +81,7 @@ namespace gcn
/**
* Constructor.
*/
- Label();
+ explicit Label(const Widget2 *const widget);
/**
* Constructor. The label will be automatically resized
@@ -89,7 +89,8 @@ namespace gcn
*
* @param caption The caption of the label.
*/
- explicit Label(const std::string& caption);
+ Label(const Widget2 *const widget,
+ const std::string& caption);
A_DELETE_COPY(Label)
diff --git a/src/gui/base/widgets/listbox.cpp b/src/gui/base/widgets/listbox.cpp
index ad1bf2535..0dd5c88f7 100644
--- a/src/gui/base/widgets/listbox.cpp
+++ b/src/gui/base/widgets/listbox.cpp
@@ -83,8 +83,8 @@
namespace gcn
{
- ListBox::ListBox() :
- gcn::Widget(),
+ ListBox::ListBox(const Widget2 *const widget) :
+ gcn::Widget(widget),
MouseListener(),
KeyListener(),
mSelected(-1),
@@ -99,8 +99,9 @@ namespace gcn
addKeyListener(this);
}
- ListBox::ListBox(ListModel *listModel) :
- gcn::Widget(),
+ ListBox::ListBox(const Widget2 *const widget,
+ ListModel *listModel) :
+ gcn::Widget(widget),
MouseListener(),
KeyListener(),
mSelected(-1),
diff --git a/src/gui/base/widgets/listbox.hpp b/src/gui/base/widgets/listbox.hpp
index 61c8486bb..ff2df395c 100644
--- a/src/gui/base/widgets/listbox.hpp
+++ b/src/gui/base/widgets/listbox.hpp
@@ -96,14 +96,15 @@ namespace gcn
/**
* Constructor.
*/
- ListBox();
+ explicit ListBox(const Widget2 *const widget);
/**
* Constructor.
*
* @param listModel the list model to use.
*/
- explicit ListBox(ListModel *listModel);
+ ListBox(const Widget2 *const widget,
+ ListModel *listModel);
A_DELETE_COPY(ListBox)
diff --git a/src/gui/base/widgets/radiobutton.cpp b/src/gui/base/widgets/radiobutton.cpp
index 4cd515bba..832c00bbe 100644
--- a/src/gui/base/widgets/radiobutton.cpp
+++ b/src/gui/base/widgets/radiobutton.cpp
@@ -80,8 +80,8 @@ namespace gcn
{
RadioButton::GroupMap RadioButton::mGroupMap;
- RadioButton::RadioButton() :
- gcn::Widget(),
+ RadioButton::RadioButton(const Widget2 *const widget) :
+ gcn::Widget(widget),
MouseListener(),
KeyListener(),
mSelected(false),
@@ -95,10 +95,11 @@ namespace gcn
addKeyListener(this);
}
- RadioButton::RadioButton(const std::string &caption,
+ RadioButton::RadioButton(const Widget2 *const widget,
+ const std::string &caption,
const std::string &group,
bool selected) :
- gcn::Widget(),
+ gcn::Widget(widget),
MouseListener(),
KeyListener(),
mSelected(false),
diff --git a/src/gui/base/widgets/radiobutton.hpp b/src/gui/base/widgets/radiobutton.hpp
index 8a9a8b585..4d4403fac 100644
--- a/src/gui/base/widgets/radiobutton.hpp
+++ b/src/gui/base/widgets/radiobutton.hpp
@@ -93,7 +93,7 @@ namespace gcn
/**
* Constructor.
*/
- RadioButton();
+ RadioButton(const Widget2 *const widget);
/**
* Constructor. The radio button will be automatically resized
@@ -103,7 +103,8 @@ namespace gcn
* @param group The group the radio button should belong to.
* @param selected True if the radio button should be selected.
*/
- RadioButton(const std::string &caption,
+ RadioButton(const Widget2 *const widget,
+ const std::string &caption,
const std::string &group,
bool selected = false);
diff --git a/src/gui/base/widgets/scrollarea.cpp b/src/gui/base/widgets/scrollarea.cpp
index f76226bc5..68e1b72d3 100644
--- a/src/gui/base/widgets/scrollarea.cpp
+++ b/src/gui/base/widgets/scrollarea.cpp
@@ -74,8 +74,8 @@
namespace gcn
{
- ScrollArea::ScrollArea() :
- gcn::BasicContainer(),
+ ScrollArea::ScrollArea(const Widget2 *const widget) :
+ gcn::BasicContainer(widget),
MouseListener(),
mVScroll(0),
mHScroll(0),
@@ -101,8 +101,9 @@ namespace gcn
addMouseListener(this);
}
- ScrollArea::ScrollArea(Widget *const content) :
- gcn::BasicContainer(),
+ ScrollArea::ScrollArea(const Widget2 *const widget,
+ Widget *const content) :
+ gcn::BasicContainer(widget),
MouseListener(),
mVScroll(0),
mHScroll(0),
@@ -129,10 +130,11 @@ namespace gcn
addMouseListener(this);
}
- ScrollArea::ScrollArea(Widget *content,
+ ScrollArea::ScrollArea(const Widget2 *const widget,
+ Widget *content,
ScrollPolicy hPolicy,
ScrollPolicy vPolicy) :
- gcn::BasicContainer(),
+ gcn::BasicContainer(widget),
MouseListener(),
mVScroll(0),
mHScroll(0),
diff --git a/src/gui/base/widgets/scrollarea.hpp b/src/gui/base/widgets/scrollarea.hpp
index 1d4c0dd54..e2d8aada5 100644
--- a/src/gui/base/widgets/scrollarea.hpp
+++ b/src/gui/base/widgets/scrollarea.hpp
@@ -100,14 +100,15 @@ namespace gcn
/**
* Constructor.
*/
- ScrollArea();
+ explicit ScrollArea(const Widget2 *const widget);
/**
* Constructor.
*
* @param content The content of the scroll area.
*/
- explicit ScrollArea(Widget *const content);
+ ScrollArea(const Widget2 *const widget,
+ Widget *const content);
/**
* Constructor.
@@ -118,7 +119,8 @@ namespace gcn
* @param vPolicy The policy for the vertical scrollbar. See enum with
* policies.
*/
- ScrollArea(Widget *content,
+ ScrollArea(const Widget2 *const widget,
+ Widget *content,
ScrollPolicy hPolicy,
ScrollPolicy vPolicy);
diff --git a/src/gui/base/widgets/slider.cpp b/src/gui/base/widgets/slider.cpp
index 1245b6590..e995ff55a 100644
--- a/src/gui/base/widgets/slider.cpp
+++ b/src/gui/base/widgets/slider.cpp
@@ -76,8 +76,9 @@
namespace gcn
{
- Slider::Slider(const double scaleEnd) :
- gcn::Widget(),
+ Slider::Slider(const Widget2 *const widget,
+ const double scaleEnd) :
+ gcn::Widget(widget),
MouseListener(),
KeyListener(),
mDragged(false),
@@ -95,8 +96,10 @@ namespace gcn
addKeyListener(this);
}
- Slider::Slider(const double scaleStart, const double scaleEnd) :
- gcn::Widget(),
+ Slider::Slider(const Widget2 *const widget,
+ const double scaleStart,
+ const double scaleEnd) :
+ gcn::Widget(widget),
MouseListener(),
KeyListener(),
mDragged(false),
diff --git a/src/gui/base/widgets/slider.hpp b/src/gui/base/widgets/slider.hpp
index f77d3f5dd..f29ad5950 100644
--- a/src/gui/base/widgets/slider.hpp
+++ b/src/gui/base/widgets/slider.hpp
@@ -99,7 +99,8 @@ namespace gcn
*
* @param scaleEnd The end value of the slider scale.
*/
- explicit Slider(const double scaleEnd = 1.0);
+ explicit Slider(const Widget2 *const widget,
+ const double scaleEnd = 1.0);
/**
* Constructor.
@@ -107,7 +108,9 @@ namespace gcn
* @param scaleStart The start value of the slider scale.
* @param scaleEnd The end value of the slider scale.
*/
- Slider(const double scaleStart, const double scaleEnd);
+ Slider(const Widget2 *const widget,
+ const double scaleStart,
+ const double scaleEnd);
A_DELETE_COPY(Slider)
diff --git a/src/gui/base/widgets/textbox.cpp b/src/gui/base/widgets/textbox.cpp
index 292e35850..7a5b63a50 100644
--- a/src/gui/base/widgets/textbox.cpp
+++ b/src/gui/base/widgets/textbox.cpp
@@ -80,8 +80,8 @@
namespace gcn
{
- TextBox::TextBox() :
- gcn::Widget(),
+ TextBox::TextBox(const Widget2 *const widget) :
+ gcn::Widget(widget),
MouseListener(),
KeyListener(),
mTextRows(),
@@ -98,8 +98,9 @@ namespace gcn
adjustSize();
}
- TextBox::TextBox(const std::string& text) :
- gcn::Widget(),
+ TextBox::TextBox(const Widget2 *const widget,
+ const std::string& text) :
+ gcn::Widget(widget),
MouseListener(),
KeyListener(),
mTextRows(),
diff --git a/src/gui/base/widgets/textbox.hpp b/src/gui/base/widgets/textbox.hpp
index 8fc788816..0c96096ec 100644
--- a/src/gui/base/widgets/textbox.hpp
+++ b/src/gui/base/widgets/textbox.hpp
@@ -87,14 +87,15 @@ namespace gcn
/**
* Constructor.
*/
- TextBox();
+ explicit TextBox(const Widget2 *const widget);
/**
* Constructor.
*
* @param text The default text of the text box.
*/
- explicit TextBox(const std::string& text);
+ TextBox(const Widget2 *const widget,
+ const std::string& text);
A_DELETE_COPY(TextBox)
diff --git a/src/gui/base/widgets/textfield.cpp b/src/gui/base/widgets/textfield.cpp
index f149e8667..6ca37c4af 100644
--- a/src/gui/base/widgets/textfield.cpp
+++ b/src/gui/base/widgets/textfield.cpp
@@ -78,8 +78,8 @@
namespace gcn
{
- TextField::TextField() :
- gcn::Widget(),
+ TextField::TextField(const Widget2 *const widget) :
+ gcn::Widget(widget),
MouseListener(),
KeyListener(),
mText(),
@@ -92,8 +92,9 @@ namespace gcn
addKeyListener(this);
}
- TextField::TextField(const std::string& text) :
- gcn::Widget(),
+ TextField::TextField(const Widget2 *const widget,
+ const std::string& text) :
+ gcn::Widget(widget),
MouseListener(),
KeyListener(),
mText(text),
diff --git a/src/gui/base/widgets/textfield.hpp b/src/gui/base/widgets/textfield.hpp
index 099ed1356..aa5f210c5 100644
--- a/src/gui/base/widgets/textfield.hpp
+++ b/src/gui/base/widgets/textfield.hpp
@@ -85,7 +85,7 @@ namespace gcn
/**
* Constructor.
*/
- TextField();
+ explicit TextField(const Widget2 *const widget);
/**
* Constructor. The text field will be automatically resized
@@ -93,7 +93,8 @@ namespace gcn
*
* @param text The default text of the text field.
*/
- explicit TextField(const std::string& text);
+ TextField(const Widget2 *const widget,
+ const std::string& text);
A_DELETE_COPY(TextField)
diff --git a/src/gui/base/widgets/window.cpp b/src/gui/base/widgets/window.cpp
index 8d33c1dd5..0ead95bc1 100644
--- a/src/gui/base/widgets/window.cpp
+++ b/src/gui/base/widgets/window.cpp
@@ -77,8 +77,8 @@
namespace gcn
{
- Window::Window() :
- Container(),
+ Window::Window(const Widget2 *const widget) :
+ Container(widget),
MouseListener(),
mCaption(),
mAlignment(Graphics::CENTER),
@@ -94,8 +94,9 @@ namespace gcn
addMouseListener(this);
}
- Window::Window(const std::string& caption) :
- Container(),
+ Window::Window(const Widget2 *const widget,
+ const std::string& caption) :
+ Container(widget),
MouseListener(),
mCaption(caption),
mAlignment(Graphics::CENTER),
diff --git a/src/gui/base/widgets/window.hpp b/src/gui/base/widgets/window.hpp
index 030d57edc..e2772d850 100644
--- a/src/gui/base/widgets/window.hpp
+++ b/src/gui/base/widgets/window.hpp
@@ -82,7 +82,7 @@ namespace gcn
/**
* Constructor.
*/
- Window();
+ explicit Window(const Widget2 *const widget);
/**
* Constructor. The window will be automatically resized in height
@@ -90,7 +90,8 @@ namespace gcn
*
* @param caption the caption of the window.
*/
- explicit Window(const std::string& caption);
+ Window(const Widget2 *const widget,
+ const std::string& caption);
A_DELETE_COPY(Window)
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp
index 45551d165..450bd504f 100644
--- a/src/gui/popups/popupmenu.cpp
+++ b/src/gui/popups/popupmenu.cpp
@@ -118,7 +118,7 @@ PopupMenu::PopupMenu() :
mPlayerListener.setNick("");
mPlayerListener.setDialog(nullptr);
mPlayerListener.setType(static_cast<int>(Being::UNKNOWN));
- mScrollArea = new ScrollArea(mBrowserBox, false);
+ mScrollArea = new ScrollArea(this, mBrowserBox, false);
mScrollArea->setVerticalScrollPolicy(ScrollArea::SHOW_AUTO);
}
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:
diff --git a/src/gui/windows/botcheckerwindow.cpp b/src/gui/windows/botcheckerwindow.cpp
index e04174962..ade95eba5 100644
--- a/src/gui/windows/botcheckerwindow.cpp
+++ b/src/gui/windows/botcheckerwindow.cpp
@@ -263,7 +263,7 @@ BotCheckerWindow::BotCheckerWindow():
ActionListener(),
mTableModel(new UsersTableModel(this)),
mTable(new GuiTable(this, mTableModel)),
- playersScrollArea(new ScrollArea(mTable, true,
+ playersScrollArea(new ScrollArea(this, mTable, true,
"bochecker_background.xml")),
mPlayerTableTitleModel(new StaticTableModel(1, COLUMNS_NR)),
mPlayerTitleTable(new GuiTable(this, mPlayerTableTitleModel)),
diff --git a/src/gui/windows/buydialog.cpp b/src/gui/windows/buydialog.cpp
index 4d2acfac9..cd593bf92 100644
--- a/src/gui/windows/buydialog.cpp
+++ b/src/gui/windows/buydialog.cpp
@@ -240,7 +240,7 @@ void BuyDialog::init()
mShopItemList = new ShopListBox(this, mShopItems, mShopItems);
mShopItemList->postInit();
- mScrollArea = new ScrollArea(mShopItemList,
+ mScrollArea = new ScrollArea(this, mShopItemList,
getOptionBool("showbackground"), "buy_background.xml");
mScrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
diff --git a/src/gui/windows/didyouknowwindow.cpp b/src/gui/windows/didyouknowwindow.cpp
index 58e6d9c24..95d657772 100644
--- a/src/gui/windows/didyouknowwindow.cpp
+++ b/src/gui/windows/didyouknowwindow.cpp
@@ -51,7 +51,7 @@ DidYouKnowWindow::DidYouKnowWindow() :
ActionListener(),
mBrowserBox(new BrowserBox(this, BrowserBox::AUTO_SIZE, true,
"browserbox.xml")),
- mScrollArea(new ScrollArea(mBrowserBox,
+ mScrollArea(new ScrollArea(this, mBrowserBox,
true, "didyouknow_background.xml")),
// TRANSLATORS: did you know window button
mButtonPrev(new Button(this, _("< Previous"), "prev", this)),
diff --git a/src/gui/windows/helpwindow.cpp b/src/gui/windows/helpwindow.cpp
index 0b31a410b..7457c7b1e 100644
--- a/src/gui/windows/helpwindow.cpp
+++ b/src/gui/windows/helpwindow.cpp
@@ -53,7 +53,8 @@ HelpWindow::HelpWindow() :
mDYKButton(new Button(this, _("Did you know..."), "DYK", this)),
mBrowserBox(new BrowserBox(this, BrowserBox::AUTO_SIZE, true,
"browserbox.xml")),
- mScrollArea(new ScrollArea(mBrowserBox, true, "help_background.xml")),
+ mScrollArea(new ScrollArea(this, mBrowserBox,
+ true, "help_background.xml")),
mTagFileMap()
{
setMinWidth(300);
diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp
index c95c2c54e..bc66f588c 100644
--- a/src/gui/windows/inventorywindow.cpp
+++ b/src/gui/windows/inventorywindow.cpp
@@ -182,8 +182,8 @@ InventoryWindow::InventoryWindow(Inventory *const inventory):
mItems->addSelectionListener(this);
- gcn::ScrollArea *const invenScroll = new ScrollArea(
- mItems, getOptionBool("showbackground"), "inventory_background.xml");
+ gcn::ScrollArea *const invenScroll = new ScrollArea(this, mItems,
+ getOptionBool("showbackground"), "inventory_background.xml");
invenScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
const int size = config.getIntValue("fontSize");
diff --git a/src/gui/windows/npcdialog.cpp b/src/gui/windows/npcdialog.cpp
index d1823d5cf..a1b2109fb 100644
--- a/src/gui/windows/npcdialog.cpp
+++ b/src/gui/windows/npcdialog.cpp
@@ -84,12 +84,12 @@ NpcDialog::NpcDialog(const int npcId) :
mDefaultString(),
mTextBox(new BrowserBox(this, BrowserBox::AUTO_WRAP, true,
"browserbox.xml")),
- mScrollArea(new ScrollArea(mTextBox,
+ mScrollArea(new ScrollArea(this, mTextBox,
getOptionBool("showtextbackground"), "npc_textbackground.xml")),
mText(),
mNewText(),
mItemList(new ExtendedListBox(this, this, "extendedlistbox.xml")),
- mListScrollArea(new ScrollArea(mItemList,
+ mListScrollArea(new ScrollArea(this, mItemList,
getOptionBool("showlistbackground"), "npc_listbackground.xml")),
mItems(),
mImages(),
@@ -111,7 +111,7 @@ NpcDialog::NpcDialog(const int npcId) :
mResetButton(new Button(this, _("Reset"), "reset", this)),
mInventory(new Inventory(Inventory::NPC, 1)),
mItemContainer(new ItemContainer(this, mInventory)),
- mItemScrollArea(new ScrollArea(mItemContainer,
+ mItemScrollArea(new ScrollArea(this, mItemContainer,
getOptionBool("showitemsbackground"), "npc_listbackground.xml")),
mInputState(NPC_INPUT_NONE),
mActionState(NPC_ACTION_WAIT),
diff --git a/src/gui/windows/npcpostdialog.cpp b/src/gui/windows/npcpostdialog.cpp
index 587f94ab2..23c21da0c 100644
--- a/src/gui/windows/npcpostdialog.cpp
+++ b/src/gui/windows/npcpostdialog.cpp
@@ -74,7 +74,7 @@ void NpcPostDialog::postInit()
mText->setEditable(true);
// create scroll box for letter text
- ScrollArea *const scrollArea = new ScrollArea(mText);
+ ScrollArea *const scrollArea = new ScrollArea(this, mText);
scrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
scrollArea->setDimension(gcn::Rectangle(
5, mSender->getHeight() + 5,
diff --git a/src/gui/windows/questswindow.cpp b/src/gui/windows/questswindow.cpp
index 2e8c5dcc8..1a8749899 100644
--- a/src/gui/windows/questswindow.cpp
+++ b/src/gui/windows/questswindow.cpp
@@ -126,11 +126,11 @@ QuestsWindow::QuestsWindow() :
mQuestsModel(new QuestsModel),
mQuestsListBox(new ExtendedListBox(this,
mQuestsModel, "extendedlistbox.xml")),
- mQuestScrollArea(new ScrollArea(mQuestsListBox,
+ mQuestScrollArea(new ScrollArea(this, mQuestsListBox,
getOptionBool("showlistbackground"), "quests_list_background.xml")),
mItemLinkHandler(new ItemLinkHandler),
mText(new BrowserBox(this, BrowserBox::AUTO_WRAP, true, "browserbox.xml")),
- mTextScrollArea(new ScrollArea(mText,
+ mTextScrollArea(new ScrollArea(this, mText,
getOptionBool("showtextbackground"), "quests_text_background.xml")),
// TRANSLATORS: quests window button
mCloseButton(new Button(this, _("Close"), "close", this)),
diff --git a/src/gui/windows/selldialog.cpp b/src/gui/windows/selldialog.cpp
index b79d18dcf..dc932ca69 100644
--- a/src/gui/windows/selldialog.cpp
+++ b/src/gui/windows/selldialog.cpp
@@ -86,7 +86,7 @@ void SellDialog::init()
mShopItemList = new ShopListBox(this, mShopItems, mShopItems);
mShopItemList->postInit();
mShopItemList->setProtectItems(true);
- mScrollArea = new ScrollArea(mShopItemList,
+ mScrollArea = new ScrollArea(this, mShopItemList,
getOptionBool("showbackground"), "sell_background.xml");
mScrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
diff --git a/src/gui/windows/serverdialog.cpp b/src/gui/windows/serverdialog.cpp
index fb2f5258b..6823c2649 100644
--- a/src/gui/windows/serverdialog.cpp
+++ b/src/gui/windows/serverdialog.cpp
@@ -292,7 +292,7 @@ ServerDialog::ServerDialog(ServerInfo *const serverInfo,
mServersList->addMouseListener(this);
- ScrollArea *const usedScroll = new ScrollArea(mServersList,
+ ScrollArea *const usedScroll = new ScrollArea(this, mServersList,
getOptionBool("showbackground"), "server_background.xml");
usedScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
diff --git a/src/gui/windows/shopwindow.cpp b/src/gui/windows/shopwindow.cpp
index 9e55af797..706438f61 100644
--- a/src/gui/windows/shopwindow.cpp
+++ b/src/gui/windows/shopwindow.cpp
@@ -79,9 +79,9 @@ ShopWindow::ShopWindow():
mSellShopItems(new ShopItems),
mBuyShopItemList(new ShopListBox(this, mBuyShopItems, mBuyShopItems)),
mSellShopItemList(new ShopListBox(this, mSellShopItems, mSellShopItems)),
- mBuyScrollArea(new ScrollArea(mBuyShopItemList,
+ mBuyScrollArea(new ScrollArea(this, mBuyShopItemList,
getOptionBool("showbuybackground"), "shop_buy_background.xml")),
- mSellScrollArea(new ScrollArea(mSellShopItemList,
+ mSellScrollArea(new ScrollArea(this, mSellShopItemList,
getOptionBool("showsellbackground"), "shop_sell_background.xml")),
// TRANSLATORS: shop window label
mBuyLabel(new Label(this, _("Buy items"))),
diff --git a/src/gui/windows/shortcutwindow.cpp b/src/gui/windows/shortcutwindow.cpp
index 50bc6fcd1..5b3c03e90 100644
--- a/src/gui/windows/shortcutwindow.cpp
+++ b/src/gui/windows/shortcutwindow.cpp
@@ -40,7 +40,8 @@ class ShortcutTab final : public Tab
{
public:
ShortcutTab(const Widget2 *const widget,
- std::string name, ShortcutContainer *const content) :
+ std::string name,
+ ShortcutContainer *const content) :
Tab(widget),
mContent(content)
{
@@ -58,7 +59,7 @@ ShortcutWindow::ShortcutWindow(const std::string &restrict title,
int width, int height) :
Window("Window", false, nullptr, skinFile),
mItems(content),
- mScrollArea(new ScrollArea(mItems, false)),
+ mScrollArea(new ScrollArea(this, mItems, false)),
mTabs(nullptr),
mPages()
{
@@ -160,7 +161,7 @@ ShortcutWindow::~ShortcutWindow()
void ShortcutWindow::addTab(const std::string &name,
ShortcutContainer *const content)
{
- ScrollArea *const scroll = new ScrollArea(content, false);
+ ScrollArea *const scroll = new ScrollArea(this, content, false);
scroll->setPosition(SCROLL_PADDING, SCROLL_PADDING);
scroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
content->setWidget2(this);
diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp
index 413f73226..9cc952ec6 100644
--- a/src/gui/windows/skilldialog.cpp
+++ b/src/gui/windows/skilldialog.cpp
@@ -59,7 +59,8 @@
class SkillListBox final : public ListBox
{
public:
- SkillListBox(const Widget2 *const widget, SkillModel *const model) :
+ SkillListBox(const Widget2 *const widget,
+ SkillModel *const model) :
ListBox(widget, model, "skilllistbox.xml"),
mModel(model),
mPopup(new TextPopup),
@@ -241,7 +242,8 @@ class SkillTab final : public Tab
{
public:
SkillTab(const Widget2 *const widget,
- const std::string &name, SkillListBox *const listBox) :
+ const std::string &name,
+ SkillListBox *const listBox) :
Tab(widget),
mListBox(listBox)
{
@@ -541,7 +543,7 @@ void SkillDialog::loadXmlFile(const std::string &fileName)
SkillListBox *const listbox = new SkillListBox(this, model);
listbox->setActionEventId("sel");
listbox->addActionListener(this);
- ScrollArea *const scroll = new ScrollArea(listbox, false);
+ ScrollArea *const scroll = new ScrollArea(this, listbox, false);
scroll->setHorizontalScrollPolicy(ScrollArea::SHOW_NEVER);
scroll->setVerticalScrollPolicy(ScrollArea::SHOW_ALWAYS);
diff --git a/src/gui/windows/socialwindow.cpp b/src/gui/windows/socialwindow.cpp
index 704bf0ca6..52ddc9439 100644
--- a/src/gui/windows/socialwindow.cpp
+++ b/src/gui/windows/socialwindow.cpp
@@ -173,7 +173,8 @@ class SocialGuildTab final : public SocialTab, public ActionListener
{
public:
SocialGuildTab(const Widget2 *const widget,
- Guild *const guild, const bool showBackground) :
+ Guild *const guild,
+ const bool showBackground) :
SocialTab(widget),
ActionListener(),
mGuild(guild)
@@ -191,7 +192,7 @@ public:
mList = new AvatarListBox(this, guild);
mList->postInit();
- mScroll = new ScrollArea(mList, showBackground,
+ mScroll = new ScrollArea(this, mList, showBackground,
"social_background.xml");
mScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_AUTO);
@@ -308,7 +309,8 @@ private:
class SocialGuildTab2 final : public SocialTab, public ActionListener
{
public:
- SocialGuildTab2(const Widget2 *const widget, Guild *const guild,
+ SocialGuildTab2(const Widget2 *const widget,
+ Guild *const guild,
const bool showBackground) :
SocialTab(widget),
ActionListener()
@@ -326,7 +328,7 @@ public:
mList = new AvatarListBox(this, guild);
mList->postInit();
- mScroll = new ScrollArea(mList, showBackground,
+ mScroll = new ScrollArea(this, mList, showBackground,
"social_background.xml");
mScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_AUTO);
@@ -376,7 +378,8 @@ class SocialPartyTab final : public SocialTab, public ActionListener
{
public:
SocialPartyTab(const Widget2 *const widget,
- Party *const party, const bool showBackground) :
+ Party *const party,
+ const bool showBackground) :
SocialTab(widget),
ActionListener(),
mParty(party)
@@ -394,7 +397,7 @@ public:
mList = new AvatarListBox(this, party);
mList->postInit();
- mScroll = new ScrollArea(mList, showBackground,
+ mScroll = new ScrollArea(this, mList, showBackground,
"social_background.xml");
mScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_AUTO);
@@ -538,13 +541,14 @@ class SocialPlayersTab final : public SocialTab
{
public:
SocialPlayersTab(const Widget2 *const widget,
- std::string name, const bool showBackground) :
+ std::string name,
+ const bool showBackground) :
SocialTab(widget),
mBeings(new BeingsListModal)
{
mList = new AvatarListBox(this, mBeings);
mList->postInit();
- mScroll = new ScrollArea(mList, showBackground,
+ mScroll = new ScrollArea(this, mList, showBackground,
"social_background.xml");
mScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_AUTO);
@@ -710,7 +714,7 @@ public:
{
mList = new AvatarListBox(this, mBeings);
mList->postInit();
- mScroll = new ScrollArea(mList, showBackground,
+ mScroll = new ScrollArea(this, mList, showBackground,
"social_background.xml");
mScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_AUTO);
@@ -1039,7 +1043,7 @@ public:
{
mList = new AvatarListBox(this, mBeings);
mList->postInit();
- mScroll = new ScrollArea(mList, showBackground,
+ mScroll = new ScrollArea(this, mList, showBackground,
"social_background.xml");
mScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_AUTO);
@@ -1086,7 +1090,7 @@ public:
{
mList = new AvatarListBox(this, mBeings);
mList->postInit();
- mScroll = new ScrollArea(mList, showBackground,
+ mScroll = new ScrollArea(this, mList, showBackground,
"social_background.xml");
mScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_AUTO);
@@ -1126,13 +1130,14 @@ class SocialFriendsTab final : public SocialTab
{
public:
SocialFriendsTab(const Widget2 *const widget,
- std::string name, const bool showBackground) :
+ std::string name,
+ const bool showBackground) :
SocialTab(widget),
mBeings(new BeingsListModal)
{
mList = new AvatarListBox(this, mBeings);
mList->postInit();
- mScroll = new ScrollArea(mList, showBackground,
+ mScroll = new ScrollArea(this, mList, showBackground,
"social_background.xml");
mScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_AUTO);
diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp
index 1279961e6..05172c9b3 100644
--- a/src/gui/windows/statuswindow.cpp
+++ b/src/gui/windows/statuswindow.cpp
@@ -159,9 +159,9 @@ StatusWindow::StatusWindow() :
mJobLabel(nullptr),
mJobBar(nullptr),
mAttrCont(new VertContainer(this, 32)),
- mAttrScroll(new ScrollArea(mAttrCont, false)),
+ mAttrScroll(new ScrollArea(this, mAttrCont, false)),
mDAttrCont(new VertContainer(this, 32)),
- mDAttrScroll(new ScrollArea(mDAttrCont, false)),
+ mDAttrScroll(new ScrollArea(this, mDAttrCont, false)),
mCharacterPointsLabel(new Label(this, "C")),
mCorrectionPointsLabel(nullptr),
// TRANSLATORS: status window button
diff --git a/src/gui/windows/tradewindow.cpp b/src/gui/windows/tradewindow.cpp
index d94b78c34..25d077d5d 100644
--- a/src/gui/windows/tradewindow.cpp
+++ b/src/gui/windows/tradewindow.cpp
@@ -110,13 +110,14 @@ TradeWindow::TradeWindow():
mMyItemContainer->addSelectionListener(this);
- ScrollArea *const myScroll = new ScrollArea(mMyItemContainer,
+ ScrollArea *const myScroll = new ScrollArea(this, mMyItemContainer,
true, "trade_background.xml");
myScroll->setHorizontalScrollPolicy(ScrollArea::SHOW_NEVER);
mPartnerItemContainer->addSelectionListener(this);
- ScrollArea *const partnerScroll = new ScrollArea(mPartnerItemContainer,
+ ScrollArea *const partnerScroll = new ScrollArea(this,
+ mPartnerItemContainer,
true, "trade_background.xml");
partnerScroll->setHorizontalScrollPolicy(ScrollArea::SHOW_NEVER);
diff --git a/src/gui/windows/updaterwindow.cpp b/src/gui/windows/updaterwindow.cpp
index 8e31939ff..e72308da7 100644
--- a/src/gui/windows/updaterwindow.cpp
+++ b/src/gui/windows/updaterwindow.cpp
@@ -190,7 +190,8 @@ UpdaterWindow::UpdaterWindow(const std::string &restrict updateHost,
"updateprogressbar.xml", "updateprogressbar_fill.xml")),
mBrowserBox(new BrowserBox(this, BrowserBox::AUTO_SIZE, true,
"browserbox.xml")),
- mScrollArea(new ScrollArea(mBrowserBox, true, "update_background.xml")),
+ mScrollArea(new ScrollArea(this, mBrowserBox,
+ true, "update_background.xml")),
mUpdateServerPath(mUpdateHost)
{
setWindowName("UpdaterWindow");
diff --git a/src/gui/windows/whoisonline.cpp b/src/gui/windows/whoisonline.cpp
index 1af21866d..76f12f795 100644
--- a/src/gui/windows/whoisonline.cpp
+++ b/src/gui/windows/whoisonline.cpp
@@ -87,7 +87,7 @@ WhoIsOnline::WhoIsOnline() :
mCurlError(new char[CURL_ERROR_SIZE]),
mBrowserBox(new BrowserBox(this, BrowserBox::AUTO_SIZE, true,
"onlinebrowserbox.xml")),
- mScrollArea(new ScrollArea(mBrowserBox, false)),
+ mScrollArea(new ScrollArea(this, mBrowserBox, false)),
mUpdateTimer(0),
mOnlinePlayers(),
mOnlineNicks(),
diff --git a/src/gui/windows/worldselectdialog.cpp b/src/gui/windows/worldselectdialog.cpp
index 0d861b85c..3c7602a70 100644
--- a/src/gui/windows/worldselectdialog.cpp
+++ b/src/gui/windows/worldselectdialog.cpp
@@ -93,7 +93,7 @@ WorldSelectDialog::WorldSelectDialog(Worlds worlds):
mChooseWorld(new Button(this, _("Choose World"), "world", this))
{
mWorldList->postInit();
- ScrollArea *const worldsScroll = new ScrollArea(mWorldList,
+ ScrollArea *const worldsScroll = new ScrollArea(this, mWorldList,
getOptionBool("showbackground"), "world_background.xml");
worldsScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
diff --git a/src/net/ea/gui/guildtab.h b/src/net/ea/gui/guildtab.h
index 2b6a4bd1a..931b53397 100644
--- a/src/net/ea/gui/guildtab.h
+++ b/src/net/ea/gui/guildtab.h
@@ -31,7 +31,8 @@ namespace Ea
/**
* A tab for a guild chat channel.
*/
-class GuildTab : public ChatTab, public ConfigListener
+class GuildTab : public ChatTab,
+ public ConfigListener
{
public:
explicit GuildTab(const Widget2 *const widget);
diff --git a/src/net/ea/gui/partytab.h b/src/net/ea/gui/partytab.h
index d141452d0..6c61990dd 100644
--- a/src/net/ea/gui/partytab.h
+++ b/src/net/ea/gui/partytab.h
@@ -31,7 +31,8 @@ namespace Ea
/**
* A tab for a party chat channel.
*/
-class PartyTab : public ChatTab, public ConfigListener
+class PartyTab : public ChatTab,
+ public ConfigListener
{
public:
explicit PartyTab(const Widget2 *const widget);