summaryrefslogtreecommitdiff
path: root/src/gui/base
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/base')
-rw-r--r--src/gui/base/basiccontainer.cpp2
-rw-r--r--src/gui/base/basiccontainer.hpp3
-rw-r--r--src/gui/base/gui.cpp5
-rw-r--r--src/gui/base/gui.hpp1
-rw-r--r--src/gui/base/rectangle.hpp3
-rw-r--r--src/gui/base/widget.cpp7
-rw-r--r--src/gui/base/widget.hpp4
-rw-r--r--src/gui/base/widgets/button.cpp5
-rw-r--r--src/gui/base/widgets/button.hpp2
-rw-r--r--src/gui/base/widgets/checkbox.cpp7
-rw-r--r--src/gui/base/widgets/checkbox.hpp2
-rw-r--r--src/gui/base/widgets/container.hpp6
-rw-r--r--src/gui/base/widgets/listbox.cpp8
-rw-r--r--src/gui/base/widgets/radiobutton.cpp7
-rw-r--r--src/gui/base/widgets/radiobutton.hpp2
-rw-r--r--src/gui/base/widgets/scrollarea.cpp3
-rw-r--r--src/gui/base/widgets/scrollarea.hpp2
-rw-r--r--src/gui/base/widgets/slider.cpp5
-rw-r--r--src/gui/base/widgets/textbox.cpp5
-rw-r--r--src/gui/base/widgets/textbox.hpp1
-rw-r--r--src/gui/base/widgets/textfield.cpp5
-rw-r--r--src/gui/base/widgets/window.cpp4
22 files changed, 8 insertions, 81 deletions
diff --git a/src/gui/base/basiccontainer.cpp b/src/gui/base/basiccontainer.cpp
index 05d89f172..edc465726 100644
--- a/src/gui/base/basiccontainer.cpp
+++ b/src/gui/base/basiccontainer.cpp
@@ -71,8 +71,6 @@
#include "gui/focushandler.h"
-#include "input/mouseinput.h"
-
#include "render/graphics.h"
#include "debug.h"
diff --git a/src/gui/base/basiccontainer.hpp b/src/gui/base/basiccontainer.hpp
index cc3aee808..fd28ef7b6 100644
--- a/src/gui/base/basiccontainer.hpp
+++ b/src/gui/base/basiccontainer.hpp
@@ -64,7 +64,6 @@
#ifndef GCN_BASICCONTAINER_HPP
#define GCN_BASICCONTAINER_HPP
-#include <list>
#include <vector>
#include "gui/base/widget.hpp"
@@ -85,7 +84,7 @@ namespace gcn
public DeathListener
{
public:
- BasicContainer(const Widget2 *const widget) :
+ explicit BasicContainer(const Widget2 *const widget) :
Widget(widget),
DeathListener(),
mWidgets()
diff --git a/src/gui/base/gui.cpp b/src/gui/base/gui.cpp
index f62e24260..d5b23e960 100644
--- a/src/gui/base/gui.cpp
+++ b/src/gui/base/gui.cpp
@@ -67,20 +67,15 @@
#include "gui/base/gui.hpp"
-#include "gui/base/basiccontainer.hpp"
#include "gui/base/widget.hpp"
#include "gui/focushandler.h"
-#include "gui/sdlinput.h"
-#include "input/keyinput.h"
#include "input/mouseinput.h"
#include "listeners/keylistener.h"
#include "listeners/mouselistener.h"
-#include "render/graphics.h"
-
#include "debug.h"
namespace gcn
diff --git a/src/gui/base/gui.hpp b/src/gui/base/gui.hpp
index f614c00fd..391a0520e 100644
--- a/src/gui/base/gui.hpp
+++ b/src/gui/base/gui.hpp
@@ -68,7 +68,6 @@
#include <deque>
#include "events/keyevent.h"
-#include "events/mouseevent.h"
#include "input/mouseinput.h"
diff --git a/src/gui/base/rectangle.hpp b/src/gui/base/rectangle.hpp
index b8503db98..299ce99b9 100644
--- a/src/gui/base/rectangle.hpp
+++ b/src/gui/base/rectangle.hpp
@@ -95,6 +95,9 @@ namespace gcn
*/
Rectangle(const int x, const int y, const int width, const int height);
+ virtual ~Rectangle()
+ { }
+
/**
* Sets the dimension of a rectangle.
*
diff --git a/src/gui/base/widget.cpp b/src/gui/base/widget.cpp
index f5994d1af..692ea479c 100644
--- a/src/gui/base/widget.cpp
+++ b/src/gui/base/widget.cpp
@@ -71,17 +71,10 @@
#include "events/event.h"
-#include "gui/base/basiccontainer.hpp"
-
#include "gui/focushandler.h"
-#include "input/keyinput.h"
-#include "input/mouseinput.h"
-
#include "listeners/actionlistener.h"
#include "listeners/deathlistener.h"
-#include "listeners/keylistener.h"
-#include "listeners/mouselistener.h"
#include "listeners/widgetlistener.h"
#include "render/graphics.h"
diff --git a/src/gui/base/widget.hpp b/src/gui/base/widget.hpp
index 013ead3b8..6245d3c98 100644
--- a/src/gui/base/widget.hpp
+++ b/src/gui/base/widget.hpp
@@ -89,8 +89,6 @@ class WidgetListener;
namespace gcn
{
- class BasicContainer;
-
/**
* Abstract class for widgets of Guichan. It contains basic functions
* every widget should have.
@@ -110,7 +108,7 @@ namespace gcn
* focusable as default, therefore, widgets that are supposed to be
* focusable should overide this default in their own constructor.
*/
- Widget(const Widget2 *const widget);
+ explicit 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 e4285cffd..5187c625b 100644
--- a/src/gui/base/widgets/button.cpp
+++ b/src/gui/base/widgets/button.cpp
@@ -67,11 +67,6 @@
#include "gui/base/widgets/button.hpp"
-#include "gui/font.h"
-
-#include "input/key.h"
-#include "input/mouseinput.h"
-
#include "events/mouseevent.h"
#include "render/graphics.h"
diff --git a/src/gui/base/widgets/button.hpp b/src/gui/base/widgets/button.hpp
index 7fd5613bd..fea175362 100644
--- a/src/gui/base/widgets/button.hpp
+++ b/src/gui/base/widgets/button.hpp
@@ -70,8 +70,6 @@
#include "listeners/keylistener.h"
#include "listeners/mouselistener.h"
-#include "events/mouseevent.h"
-
#include "gui/base/widget.hpp"
#include "render/graphics.h"
diff --git a/src/gui/base/widgets/checkbox.cpp b/src/gui/base/widgets/checkbox.cpp
index d75fb5cb0..a5ec72dfa 100644
--- a/src/gui/base/widgets/checkbox.cpp
+++ b/src/gui/base/widgets/checkbox.cpp
@@ -67,13 +67,6 @@
#include "gui/base/widgets/checkbox.hpp"
-#include "gui/font.h"
-
-#include "input/key.h"
-#include "input/mouseinput.h"
-
-#include "render/graphics.h"
-
#include "debug.h"
namespace gcn
diff --git a/src/gui/base/widgets/checkbox.hpp b/src/gui/base/widgets/checkbox.hpp
index d87a6b206..c79ccaff9 100644
--- a/src/gui/base/widgets/checkbox.hpp
+++ b/src/gui/base/widgets/checkbox.hpp
@@ -90,7 +90,7 @@ namespace gcn
/**
* Contructor.
*/
- CheckBox(const Widget2 *const widget);
+ explicit CheckBox(const Widget2 *const widget);
/**
* Constructor. The check box will be automatically resized
diff --git a/src/gui/base/widgets/container.hpp b/src/gui/base/widgets/container.hpp
index ba3cff153..3e6c0a587 100644
--- a/src/gui/base/widgets/container.hpp
+++ b/src/gui/base/widgets/container.hpp
@@ -64,12 +64,8 @@
#ifndef GCN_CONTAINER_HPP
#define GCN_CONTAINER_HPP
-#include <list>
-
#include "gui/base/basiccontainer.hpp"
-#include "render/graphics.h"
-
namespace gcn
{
/**
@@ -89,7 +85,7 @@ namespace gcn
*
* @see setOpaque, isOpaque
*/
- Container(const Widget2 *const widget);
+ explicit Container(const Widget2 *const widget);
/**
* Destructor.
diff --git a/src/gui/base/widgets/listbox.cpp b/src/gui/base/widgets/listbox.cpp
index 0dd5c88f7..02d94626c 100644
--- a/src/gui/base/widgets/listbox.cpp
+++ b/src/gui/base/widgets/listbox.cpp
@@ -69,16 +69,8 @@
#include "gui/font.h"
-#include "gui/base/basiccontainer.hpp"
-#include "gui/base/listmodel.hpp"
-
-#include "input/key.h"
-#include "input/mouseinput.h"
-
#include "listeners/selectionlistener.h"
-#include "render/graphics.h"
-
#include "debug.h"
namespace gcn
diff --git a/src/gui/base/widgets/radiobutton.cpp b/src/gui/base/widgets/radiobutton.cpp
index 832c00bbe..e17b9f776 100644
--- a/src/gui/base/widgets/radiobutton.cpp
+++ b/src/gui/base/widgets/radiobutton.cpp
@@ -67,13 +67,6 @@
#include "gui/base/widgets/radiobutton.hpp"
-#include "gui/font.h"
-
-#include "input/key.h"
-#include "input/mouseinput.h"
-
-#include "render/graphics.h"
-
#include "debug.h"
namespace gcn
diff --git a/src/gui/base/widgets/radiobutton.hpp b/src/gui/base/widgets/radiobutton.hpp
index 4d4403fac..f4bfd53fa 100644
--- a/src/gui/base/widgets/radiobutton.hpp
+++ b/src/gui/base/widgets/radiobutton.hpp
@@ -93,7 +93,7 @@ namespace gcn
/**
* Constructor.
*/
- RadioButton(const Widget2 *const widget);
+ explicit RadioButton(const Widget2 *const widget);
/**
* Constructor. The radio button will be automatically resized
diff --git a/src/gui/base/widgets/scrollarea.cpp b/src/gui/base/widgets/scrollarea.cpp
index 68e1b72d3..0fc605fa3 100644
--- a/src/gui/base/widgets/scrollarea.cpp
+++ b/src/gui/base/widgets/scrollarea.cpp
@@ -67,9 +67,6 @@
#include "gui/base/widgets/scrollarea.hpp"
-
-#include "render/graphics.h"
-
#include "debug.h"
namespace gcn
diff --git a/src/gui/base/widgets/scrollarea.hpp b/src/gui/base/widgets/scrollarea.hpp
index e2d8aada5..669ccfbdd 100644
--- a/src/gui/base/widgets/scrollarea.hpp
+++ b/src/gui/base/widgets/scrollarea.hpp
@@ -64,8 +64,6 @@
#ifndef GCN_SCROLLAREA_HPP
#define GCN_SCROLLAREA_HPP
-#include <string>
-
#include "gui/base/basiccontainer.hpp"
#include "listeners/mouselistener.h"
diff --git a/src/gui/base/widgets/slider.cpp b/src/gui/base/widgets/slider.cpp
index e995ff55a..4e9df0341 100644
--- a/src/gui/base/widgets/slider.cpp
+++ b/src/gui/base/widgets/slider.cpp
@@ -67,11 +67,6 @@
#include "gui/base/widgets/slider.hpp"
-#include "input/key.h"
-#include "input/mouseinput.h"
-
-#include "render/graphics.h"
-
#include "debug.h"
namespace gcn
diff --git a/src/gui/base/widgets/textbox.cpp b/src/gui/base/widgets/textbox.cpp
index 7a5b63a50..bb22a6f46 100644
--- a/src/gui/base/widgets/textbox.cpp
+++ b/src/gui/base/widgets/textbox.cpp
@@ -69,11 +69,6 @@
#include "gui/font.h"
-#include "gui/base/basiccontainer.hpp"
-
-#include "input/key.h"
-#include "input/mouseinput.h"
-
#include "render/graphics.h"
#include "debug.h"
diff --git a/src/gui/base/widgets/textbox.hpp b/src/gui/base/widgets/textbox.hpp
index 0c96096ec..151af8c00 100644
--- a/src/gui/base/widgets/textbox.hpp
+++ b/src/gui/base/widgets/textbox.hpp
@@ -64,7 +64,6 @@
#ifndef GCN_TEXTBOX_HPP
#define GCN_TEXTBOX_HPP
-#include <ctime>
#include <string>
#include <vector>
diff --git a/src/gui/base/widgets/textfield.cpp b/src/gui/base/widgets/textfield.cpp
index 6ca37c4af..ddcbec1b4 100644
--- a/src/gui/base/widgets/textfield.cpp
+++ b/src/gui/base/widgets/textfield.cpp
@@ -69,11 +69,6 @@
#include "gui/font.h"
-#include "input/key.h"
-#include "input/mouseinput.h"
-
-#include "render/graphics.h"
-
#include "debug.h"
namespace gcn
diff --git a/src/gui/base/widgets/window.cpp b/src/gui/base/widgets/window.cpp
index 0ead95bc1..401e3ab6d 100644
--- a/src/gui/base/widgets/window.cpp
+++ b/src/gui/base/widgets/window.cpp
@@ -67,10 +67,6 @@
#include "gui/base/widgets/window.hpp"
-#include "gui/font.h"
-
-#include "input/mouseinput.h"
-
#include "render/graphics.h"
#include "debug.h"