summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-02-15 23:14:41 +0300
committerAndrei Karas <akaras@inbox.ru>2014-02-15 23:14:41 +0300
commit9502e9c968fac129ab57d7b0496c874086995b04 (patch)
tree3709ed6883222be555d39f7a606b674fb67ebb52 /src/gui/widgets
parente3ec854f275cc6f79129bbdd3129be277100908f (diff)
downloadmv-9502e9c968fac129ab57d7b0496c874086995b04.tar.gz
mv-9502e9c968fac129ab57d7b0496c874086995b04.tar.bz2
mv-9502e9c968fac129ab57d7b0496c874086995b04.tar.xz
mv-9502e9c968fac129ab57d7b0496c874086995b04.zip
move actionlistener from base into listeners.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/button.cpp8
-rw-r--r--src/gui/widgets/button.h8
-rw-r--r--src/gui/widgets/characterviewbase.h6
-rw-r--r--src/gui/widgets/checkbox.cpp2
-rw-r--r--src/gui/widgets/checkbox.h2
-rw-r--r--src/gui/widgets/dropdown.cpp4
-rw-r--r--src/gui/widgets/dropdown.h7
-rw-r--r--src/gui/widgets/guitable.cpp6
-rw-r--r--src/gui/widgets/itemlinkhandler.cpp4
-rw-r--r--src/gui/widgets/setupitem.cpp4
-rw-r--r--src/gui/widgets/setupitem.h4
-rw-r--r--src/gui/widgets/sliderlist.cpp4
-rw-r--r--src/gui/widgets/sliderlist.h7
-rw-r--r--src/gui/widgets/tabbedarea.cpp2
-rw-r--r--src/gui/widgets/tabbedarea.h5
-rw-r--r--src/gui/widgets/tabs/setuptab.cpp2
-rw-r--r--src/gui/widgets/tabs/setuptab.h4
-rw-r--r--src/gui/widgets/textfield.cpp2
-rw-r--r--src/gui/widgets/textfield.h2
-rw-r--r--src/gui/widgets/widgetgroup.cpp2
-rw-r--r--src/gui/widgets/widgetgroup.h4
21 files changed, 46 insertions, 43 deletions
diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp
index 6d326116d..7cbdff44d 100644
--- a/src/gui/widgets/button.cpp
+++ b/src/gui/widgets/button.cpp
@@ -81,7 +81,7 @@ Button::Button(const Widget2 *const widget) :
Button::Button(const Widget2 *const widget,
const std::string &restrict caption,
const std::string &restrict actionEventId,
- gcn::ActionListener *const listener) :
+ ActionListener *const listener) :
gcn::Button(caption),
Widget2(widget),
gcn::WidgetListener(),
@@ -121,7 +121,7 @@ Button::Button(const Widget2 *const widget,
const std::string &restrict imageName,
const int imageWidth, const int imageHeight,
const std::string &restrict actionEventId,
- gcn::ActionListener *const listener) :
+ ActionListener *const listener) :
gcn::Button(caption),
Widget2(widget),
gcn::WidgetListener(),
@@ -161,7 +161,7 @@ Button::Button(const Widget2 *const widget,
const std::string &restrict imageName,
const int imageWidth, const int imageHeight,
const std::string &restrict actionEventId,
- gcn::ActionListener *const listener) :
+ ActionListener *const listener) :
gcn::Button(),
Widget2(widget),
gcn::WidgetListener(),
@@ -201,7 +201,7 @@ Button::Button(const Widget2 *const widget,
const std::string &restrict caption,
const std::string &restrict imageName,
const std::string &restrict actionEventId,
- gcn::ActionListener *const listener) :
+ ActionListener *const listener) :
gcn::Button(caption),
Widget2(widget),
gcn::WidgetListener(),
diff --git a/src/gui/widgets/button.h b/src/gui/widgets/button.h
index 949993a48..e80593f7f 100644
--- a/src/gui/widgets/button.h
+++ b/src/gui/widgets/button.h
@@ -59,7 +59,7 @@ class Button final : public gcn::Button,
Button(const Widget2 *const widget,
const std::string &restrict caption,
const std::string &restrict actionEventId,
- gcn::ActionListener *const listener);
+ ActionListener *const listener);
/**
* Constructor, sets the caption of the button to the given string and
@@ -70,7 +70,7 @@ class Button final : public gcn::Button,
const std::string &restrict imageName,
const int imageWidth, const int imageHeight,
const std::string &actionEventId,
- gcn::ActionListener *const listener);
+ ActionListener *const listener);
/**
* Constructor, sets the caption of the button to the given string and
@@ -80,7 +80,7 @@ class Button final : public gcn::Button,
const std::string &restrict imageName,
const int imageWidth, const int imageHeight,
const std::string &restrict actionEventId,
- gcn::ActionListener *const listener);
+ ActionListener *const listener);
/**
* Constructor, sets the caption of the button to the given string and
@@ -90,7 +90,7 @@ class Button final : public gcn::Button,
const std::string &restrict imageName,
const std::string &restrict caption,
const std::string &restrict actionEventId,
- gcn::ActionListener *const listener);
+ ActionListener *const listener);
A_DELETE_COPY(Button)
diff --git a/src/gui/widgets/characterviewbase.h b/src/gui/widgets/characterviewbase.h
index af3722e4b..16b6c3e0d 100644
--- a/src/gui/widgets/characterviewbase.h
+++ b/src/gui/widgets/characterviewbase.h
@@ -25,12 +25,12 @@
#include "gui/widgets/container.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
#include "localconsts.h"
class CharacterViewBase : public Container,
- public gcn::ActionListener
+ public ActionListener
{
public:
A_DELETE_COPY(CharacterViewBase)
@@ -50,7 +50,7 @@ class CharacterViewBase : public Container,
protected:
CharacterViewBase(CharSelectDialog *const widget, const int padding) :
Container(widget),
- gcn::ActionListener(),
+ ActionListener(),
mParent(widget),
mPadding(padding),
mSelected(0)
diff --git a/src/gui/widgets/checkbox.cpp b/src/gui/widgets/checkbox.cpp
index 2f11dc2ce..0721e29f6 100644
--- a/src/gui/widgets/checkbox.cpp
+++ b/src/gui/widgets/checkbox.cpp
@@ -39,7 +39,7 @@ float CheckBox::mAlpha = 1.0;
CheckBox::CheckBox(const Widget2 *const widget,
const std::string &restrict caption, const bool selected,
- gcn::ActionListener *const listener,
+ ActionListener *const listener,
const std::string &restrict eventId) :
gcn::CheckBox(caption, selected),
Widget2(widget),
diff --git a/src/gui/widgets/checkbox.h b/src/gui/widgets/checkbox.h
index a49c38d47..8e5958c92 100644
--- a/src/gui/widgets/checkbox.h
+++ b/src/gui/widgets/checkbox.h
@@ -46,7 +46,7 @@ class CheckBox final : public gcn::CheckBox,
CheckBox(const Widget2 *const widget,
const std::string &restrict caption,
const bool selected = false,
- gcn::ActionListener *const listener = nullptr,
+ ActionListener *const listener = nullptr,
const std::string &restrict eventId = "");
A_DELETE_COPY(CheckBox)
diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp
index 7aa53e83f..070afdbb5 100644
--- a/src/gui/widgets/dropdown.cpp
+++ b/src/gui/widgets/dropdown.cpp
@@ -54,9 +54,9 @@ DropDown::DropDown(const Widget2 *const widget,
gcn::ListModel *const listModel,
const bool extended,
const bool modal,
- gcn::ActionListener *const listener,
+ ActionListener *const listener,
const std::string &eventId):
- gcn::ActionListener(),
+ ActionListener(),
gcn::BasicContainer(),
gcn::KeyListener(),
gcn::MouseListener(),
diff --git a/src/gui/widgets/dropdown.h b/src/gui/widgets/dropdown.h
index af566fb69..0b6ada6dd 100644
--- a/src/gui/widgets/dropdown.h
+++ b/src/gui/widgets/dropdown.h
@@ -25,7 +25,6 @@
#include "gui/widgets/widget2.h"
-#include "gui/base/actionlistener.hpp"
#include "gui/base/basiccontainer.hpp"
#include "gui/base/focuslistener.hpp"
#include "gui/base/keylistener.hpp"
@@ -33,6 +32,8 @@
#include "gui/base/mouselistener.hpp"
#include "gui/base/selectionlistener.hpp"
+#include "listeners/actionlistener.h"
+
#include "localconsts.h"
class Image;
@@ -49,7 +50,7 @@ class Skin;
* DropDown you must give DropDown an implemented ListModel which represents
* your list.
*/
-class DropDown final : public gcn::ActionListener,
+class DropDown final : public ActionListener,
public gcn::BasicContainer,
public gcn::KeyListener,
public gcn::MouseListener,
@@ -70,7 +71,7 @@ class DropDown final : public gcn::ActionListener,
gcn::ListModel *const listModel,
const bool extended = false,
const bool modal = false,
- gcn::ActionListener *const listener = nullptr,
+ ActionListener *const listener = nullptr,
const std::string &eventId = "");
A_DELETE_COPY(DropDown)
diff --git a/src/gui/widgets/guitable.cpp b/src/gui/widgets/guitable.cpp
index 6928b11d8..e2af7f16d 100644
--- a/src/gui/widgets/guitable.cpp
+++ b/src/gui/widgets/guitable.cpp
@@ -29,7 +29,7 @@
#include "utils/dtor.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
#include "gui/base/key.hpp"
#include "render/graphics.h"
@@ -38,7 +38,7 @@
float GuiTable::mAlpha = 1.0;
-class GuiTableActionListener final : public gcn::ActionListener
+class GuiTableActionListener final : public ActionListener
{
public:
GuiTableActionListener(GuiTable *restrict _table,
@@ -62,7 +62,7 @@ protected:
GuiTableActionListener::GuiTableActionListener(GuiTable *restrict table,
gcn::Widget *restrict widget,
int row, int column) :
- gcn::ActionListener(),
+ ActionListener(),
mTable(table),
mRow(row),
mColumn(column),
diff --git a/src/gui/widgets/itemlinkhandler.cpp b/src/gui/widgets/itemlinkhandler.cpp
index c10979bef..96494ed0b 100644
--- a/src/gui/widgets/itemlinkhandler.cpp
+++ b/src/gui/widgets/itemlinkhandler.cpp
@@ -37,14 +37,14 @@
#include <string>
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
#include "gui/base/mouseinput.hpp"
#include "debug.h"
namespace
{
- struct OpenUrlListener : public gcn::ActionListener
+ struct OpenUrlListener : public ActionListener
{
OpenUrlListener() :
url()
diff --git a/src/gui/widgets/setupitem.cpp b/src/gui/widgets/setupitem.cpp
index 4f0ea025d..8453a9722 100644
--- a/src/gui/widgets/setupitem.cpp
+++ b/src/gui/widgets/setupitem.cpp
@@ -51,7 +51,7 @@ SetupItem::SetupItem(const std::string &restrict text,
SetupTabScroll *restrict const parent,
const std::string &restrict eventName,
const bool mainConfig) :
- gcn::ActionListener(),
+ ActionListener(),
Widget2(),
mText(text),
mDescription(description),
@@ -75,7 +75,7 @@ SetupItem::SetupItem(const std::string &restrict text,
const std::string &restrict eventName,
const std::string &restrict def,
const bool mainConfig) :
- gcn::ActionListener(),
+ ActionListener(),
Widget2(),
mText(text),
mDescription(description),
diff --git a/src/gui/widgets/setupitem.h b/src/gui/widgets/setupitem.h
index 027f91824..dd5eda1d9 100644
--- a/src/gui/widgets/setupitem.h
+++ b/src/gui/widgets/setupitem.h
@@ -24,7 +24,7 @@
#include "gui/widgets/button.h"
#include "gui/widgets/tabs/setuptabscroll.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
#include <list>
#include <vector>
@@ -45,7 +45,7 @@ namespace gcn
class ListModel;
}
-class SetupItem : public gcn::ActionListener,
+class SetupItem : public ActionListener,
public Widget2
{
public:
diff --git a/src/gui/widgets/sliderlist.cpp b/src/gui/widgets/sliderlist.cpp
index b75f65820..0ae0890dc 100644
--- a/src/gui/widgets/sliderlist.cpp
+++ b/src/gui/widgets/sliderlist.cpp
@@ -36,7 +36,7 @@ static const int sliderHeight = 30;
SliderList::SliderList(const Widget2 *const widget,
gcn::ListModel *const listModel) :
Container(widget),
- gcn::ActionListener(),
+ ActionListener(),
gcn::MouseListener(),
mLabel(new Label(this)),
mListModel(listModel),
@@ -48,7 +48,7 @@ SliderList::SliderList(const Widget2 *const widget,
setHeight(sliderHeight);
}
-void SliderList::postInit(gcn::ActionListener *const listener,
+void SliderList::postInit(ActionListener *const listener,
const std::string &eventId)
{
mPrevEventId = eventId + "_prev";
diff --git a/src/gui/widgets/sliderlist.h b/src/gui/widgets/sliderlist.h
index e0f63517b..3d86f8735 100644
--- a/src/gui/widgets/sliderlist.h
+++ b/src/gui/widgets/sliderlist.h
@@ -21,10 +21,11 @@
#ifndef GUI_WIDGETS_SLIDERLIST_H
#define GUI_WIDGETS_SLIDERLIST_H
-#include "gui/base/actionlistener.hpp"
#include "gui/base/listmodel.hpp"
#include "gui/base/mouselistener.hpp"
+#include "listeners/actionlistener.h"
+
#include "gui/widgets/container.h"
#include "localconsts.h"
@@ -33,7 +34,7 @@ class Button;
class Label;
class SliderList final : public Container,
- public gcn::ActionListener,
+ public ActionListener,
public gcn::MouseListener
{
public:
@@ -44,7 +45,7 @@ class SliderList final : public Container,
~SliderList();
- void postInit(gcn::ActionListener *const listener,
+ void postInit(ActionListener *const listener,
const std::string &eventId);
void updateAlpha();
diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp
index 2a212ce75..d659cd6b6 100644
--- a/src/gui/widgets/tabbedarea.cpp
+++ b/src/gui/widgets/tabbedarea.cpp
@@ -35,7 +35,7 @@
TabbedArea::TabbedArea(const Widget2 *const widget) :
Widget2(widget),
- gcn::ActionListener(),
+ ActionListener(),
gcn::BasicContainer(),
gcn::KeyListener(),
gcn::MouseListener(),
diff --git a/src/gui/widgets/tabbedarea.h b/src/gui/widgets/tabbedarea.h
index dede91767..af7fe5429 100644
--- a/src/gui/widgets/tabbedarea.h
+++ b/src/gui/widgets/tabbedarea.h
@@ -25,12 +25,13 @@
#include "gui/widgets/widget2.h"
-#include "gui/base/actionlistener.hpp"
#include "gui/base/keylistener.hpp"
#include "gui/base/mouselistener.hpp"
#include "gui/base/widgetlistener.hpp"
#include "gui/base/widgets/container.hpp"
+#include "listeners/actionlistener.h"
+
class Button;
class Image;
class Tab;
@@ -39,7 +40,7 @@ class Tab;
* A tabbed area, the same as the guichan tabbed area in 0.8, but extended
*/
class TabbedArea final : public Widget2,
- public gcn::ActionListener,
+ public ActionListener,
public gcn::BasicContainer,
public gcn::KeyListener,
public gcn::MouseListener,
diff --git a/src/gui/widgets/tabs/setuptab.cpp b/src/gui/widgets/tabs/setuptab.cpp
index c445e2ad7..efead5a3c 100644
--- a/src/gui/widgets/tabs/setuptab.cpp
+++ b/src/gui/widgets/tabs/setuptab.cpp
@@ -26,7 +26,7 @@
SetupTab::SetupTab(const Widget2 *const widget) :
Container(widget),
- gcn::ActionListener(),
+ ActionListener(),
gcn::WidgetListener(),
mName()
{
diff --git a/src/gui/widgets/tabs/setuptab.h b/src/gui/widgets/tabs/setuptab.h
index d8e76f812..1621b0713 100644
--- a/src/gui/widgets/tabs/setuptab.h
+++ b/src/gui/widgets/tabs/setuptab.h
@@ -25,7 +25,7 @@
#include "gui/widgets/container.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
#include "gui/base/widgetlistener.hpp"
#include <string>
@@ -36,7 +36,7 @@
* A container for the contents of a tab in the setup window.
*/
class SetupTab : public Container,
- public gcn::ActionListener,
+ public ActionListener,
public gcn::WidgetListener
{
public:
diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp
index fdcd84089..692a5608e 100644
--- a/src/gui/widgets/textfield.cpp
+++ b/src/gui/widgets/textfield.cpp
@@ -53,7 +53,7 @@ ImageRect TextField::skin;
TextField::TextField(const Widget2 *restrict const widget,
const std::string &restrict text,
const bool loseFocusOnTab,
- gcn::ActionListener *restrict const listener,
+ ActionListener *restrict const listener,
const std::string &restrict eventId,
const bool sendAlwaysEvents):
gcn::TextField(text),
diff --git a/src/gui/widgets/textfield.h b/src/gui/widgets/textfield.h
index d3d1ff0eb..80d022bb1 100644
--- a/src/gui/widgets/textfield.h
+++ b/src/gui/widgets/textfield.h
@@ -48,7 +48,7 @@ class TextField : public gcn::TextField,
explicit TextField(const Widget2 *restrict const widget,
const std::string &restrict text = "",
const bool loseFocusOnTab = true,
- gcn::ActionListener *restrict
+ ActionListener *restrict
const listener = nullptr,
const std::string &restrict eventId = "",
const bool sendAlwaysEvents = false);
diff --git a/src/gui/widgets/widgetgroup.cpp b/src/gui/widgets/widgetgroup.cpp
index 34cbeebb5..ee8d6f719 100644
--- a/src/gui/widgets/widgetgroup.cpp
+++ b/src/gui/widgets/widgetgroup.cpp
@@ -27,7 +27,7 @@ WidgetGroup::WidgetGroup(const Widget2 *const widget,
const int spacing) :
Container(widget),
gcn::WidgetListener(),
- gcn::ActionListener(),
+ ActionListener(),
mSpacing(spacing),
mCount(0),
mGroup(group),
diff --git a/src/gui/widgets/widgetgroup.h b/src/gui/widgets/widgetgroup.h
index 897183839..e648a17e5 100644
--- a/src/gui/widgets/widgetgroup.h
+++ b/src/gui/widgets/widgetgroup.h
@@ -23,14 +23,14 @@
#include "gui/widgets/container.h"
-#include "gui/base/actionlistener.hpp"
+#include "listeners/actionlistener.h"
#include "gui/base/widgetlistener.hpp"
#include "localconsts.h"
class WidgetGroup : public Container,
public gcn::WidgetListener,
- public gcn::ActionListener
+ public ActionListener
{
public:
A_DELETE_COPY(WidgetGroup)