summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-02-16 13:30:46 +0300
committerAndrei Karas <akaras@inbox.ru>2014-02-16 13:44:58 +0300
commit9e3f92a3914e28ce01331d7df7d03c31244a843b (patch)
treef1e8618bb1f649e10f78f4d2d53d6861474930f5 /src/gui/widgets
parent9ca8495acdebb975a7b0777e11d7c599e61c0185 (diff)
downloadplus-9e3f92a3914e28ce01331d7df7d03c31244a843b.tar.gz
plus-9e3f92a3914e28ce01331d7df7d03c31244a843b.tar.bz2
plus-9e3f92a3914e28ce01331d7df7d03c31244a843b.tar.xz
plus-9e3f92a3914e28ce01331d7df7d03c31244a843b.zip
move keyevent into events directory.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/button.cpp7
-rw-r--r--src/gui/widgets/button.h4
-rw-r--r--src/gui/widgets/checkbox.cpp5
-rw-r--r--src/gui/widgets/checkbox.h2
-rw-r--r--src/gui/widgets/dropdown.cpp5
-rw-r--r--src/gui/widgets/dropdown.h2
-rw-r--r--src/gui/widgets/guitable.cpp5
-rw-r--r--src/gui/widgets/guitable.h2
-rw-r--r--src/gui/widgets/inttextfield.cpp5
-rw-r--r--src/gui/widgets/inttextfield.h2
-rw-r--r--src/gui/widgets/itemcontainer.cpp4
-rw-r--r--src/gui/widgets/itemcontainer.h4
-rw-r--r--src/gui/widgets/listbox.cpp5
-rw-r--r--src/gui/widgets/listbox.h2
-rw-r--r--src/gui/widgets/radiobutton.cpp5
-rw-r--r--src/gui/widgets/radiobutton.h2
-rw-r--r--src/gui/widgets/slider.cpp5
-rw-r--r--src/gui/widgets/slider.h2
-rw-r--r--src/gui/widgets/tabbedarea.cpp5
-rw-r--r--src/gui/widgets/tabbedarea.h2
-rw-r--r--src/gui/widgets/textbox.cpp5
-rw-r--r--src/gui/widgets/textbox.h2
-rw-r--r--src/gui/widgets/textfield.cpp4
-rw-r--r--src/gui/widgets/textfield.h2
24 files changed, 49 insertions, 39 deletions
diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp
index 5478d8164..10088d5f4 100644
--- a/src/gui/widgets/button.cpp
+++ b/src/gui/widgets/button.cpp
@@ -25,8 +25,9 @@
#include "client.h"
#include "graphicsvertexes.h"
+#include "events/keyevent.h"
+
#include "input/keydata.h"
-#include "input/keyevent.h"
#include "resources/imageset.h"
@@ -589,7 +590,7 @@ void Button::setCaption(const std::string& caption)
mCaption = caption;
}
-void Button::keyPressed(gcn::KeyEvent& keyEvent)
+void Button::keyPressed(KeyEvent& keyEvent)
{
const int action = static_cast<KeyEvent*>(&keyEvent)->getActionId();
@@ -600,7 +601,7 @@ void Button::keyPressed(gcn::KeyEvent& keyEvent)
}
}
-void Button::keyReleased(gcn::KeyEvent& keyEvent)
+void Button::keyReleased(KeyEvent& keyEvent)
{
const int action = static_cast<KeyEvent*>(&keyEvent)->getActionId();
diff --git a/src/gui/widgets/button.h b/src/gui/widgets/button.h
index 7fd7e4a9a..5dc89ea4d 100644
--- a/src/gui/widgets/button.h
+++ b/src/gui/widgets/button.h
@@ -144,9 +144,9 @@ class Button final : public gcn::Button,
void setCaption(const std::string& caption);
- void keyPressed(gcn::KeyEvent &keyEvent) override final;
+ void keyPressed(KeyEvent &keyEvent) override final;
- void keyReleased(gcn::KeyEvent &keyEvent) override final;
+ void keyReleased(KeyEvent &keyEvent) override final;
bool isPressed2() const A_WARN_UNUSED;
diff --git a/src/gui/widgets/checkbox.cpp b/src/gui/widgets/checkbox.cpp
index 0721e29f6..2514f30d3 100644
--- a/src/gui/widgets/checkbox.cpp
+++ b/src/gui/widgets/checkbox.cpp
@@ -24,8 +24,9 @@
#include "client.h"
+#include "events/keyevent.h"
+
#include "input/keydata.h"
-#include "input/keyevent.h"
#include "resources/image.h"
@@ -181,7 +182,7 @@ void CheckBox::mouseExited(gcn::MouseEvent& event A_UNUSED)
mHasMouse = false;
}
-void CheckBox::keyPressed(gcn::KeyEvent& keyEvent)
+void CheckBox::keyPressed(KeyEvent& keyEvent)
{
const int action = static_cast<KeyEvent*>(&keyEvent)->getActionId();
diff --git a/src/gui/widgets/checkbox.h b/src/gui/widgets/checkbox.h
index 8e5958c92..2d1502552 100644
--- a/src/gui/widgets/checkbox.h
+++ b/src/gui/widgets/checkbox.h
@@ -81,7 +81,7 @@ class CheckBox final : public gcn::CheckBox,
*/
void mouseExited(gcn::MouseEvent& event) override final;
- void keyPressed(gcn::KeyEvent& keyEvent) override final;
+ void keyPressed(KeyEvent& keyEvent) override final;
void adjustSize();
diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp
index bbba0cd99..db3393b46 100644
--- a/src/gui/widgets/dropdown.cpp
+++ b/src/gui/widgets/dropdown.cpp
@@ -24,8 +24,9 @@
#include "client.h"
+#include "events/keyevent.h"
+
#include "input/keydata.h"
-#include "input/keyevent.h"
#include "gui/widgets/extendedlistmodel.h"
#include "gui/widgets/popuplist.h"
@@ -309,7 +310,7 @@ void DropDown::drawButton(Graphics *graphics)
}
}
-void DropDown::keyPressed(gcn::KeyEvent& keyEvent)
+void DropDown::keyPressed(KeyEvent& keyEvent)
{
if (keyEvent.isConsumed())
return;
diff --git a/src/gui/widgets/dropdown.h b/src/gui/widgets/dropdown.h
index f3431459f..58942bdb5 100644
--- a/src/gui/widgets/dropdown.h
+++ b/src/gui/widgets/dropdown.h
@@ -89,7 +89,7 @@ class DropDown final : public ActionListener,
// Inherited from KeyListener
- void keyPressed(gcn::KeyEvent& keyEvent) override final;
+ void keyPressed(KeyEvent& keyEvent) override final;
// Inherited from MouseListener
diff --git a/src/gui/widgets/guitable.cpp b/src/gui/widgets/guitable.cpp
index dcb5431d5..1d3dc0c55 100644
--- a/src/gui/widgets/guitable.cpp
+++ b/src/gui/widgets/guitable.cpp
@@ -24,7 +24,8 @@
#include "client.h"
-#include "input/keyevent.h"
+#include "events/keyevent.h"
+
#include "input/keydata.h"
#include "utils/dtor.h"
@@ -418,7 +419,7 @@ gcn::Rectangle GuiTable::getChildrenArea()
}
// -- KeyListener notifications
-void GuiTable::keyPressed(gcn::KeyEvent& keyEvent)
+void GuiTable::keyPressed(KeyEvent& keyEvent)
{
const int action = static_cast<KeyEvent*>(&keyEvent)->getActionId();
diff --git a/src/gui/widgets/guitable.h b/src/gui/widgets/guitable.h
index a751cac59..766f7a3de 100644
--- a/src/gui/widgets/guitable.h
+++ b/src/gui/widgets/guitable.h
@@ -125,7 +125,7 @@ public:
void _setFocusHandler(gcn::FocusHandler* focusHandler) override final;
// Inherited from KeyListener
- void keyPressed(gcn::KeyEvent& keyEvent) override final;
+ void keyPressed(KeyEvent& keyEvent) override final;
/**
* Sets the table to be opaque, that is sets the table
diff --git a/src/gui/widgets/inttextfield.cpp b/src/gui/widgets/inttextfield.cpp
index e50bd232b..8e3713522 100644
--- a/src/gui/widgets/inttextfield.cpp
+++ b/src/gui/widgets/inttextfield.cpp
@@ -26,8 +26,9 @@
#include "gui/sdlinput.h"
#endif
+#include "events/keyevent.h"
+
#include "input/keydata.h"
-#include "input/keyevent.h"
#include "utils/stringutils.h"
#include "debug.h"
@@ -49,7 +50,7 @@ IntTextField::IntTextField(const Widget2 *const widget, const int def,
setWidth(width);
}
-void IntTextField::keyPressed(gcn::KeyEvent &event)
+void IntTextField::keyPressed(KeyEvent &event)
{
const int action = static_cast<KeyEvent*>(&event)->getActionId();
diff --git a/src/gui/widgets/inttextfield.h b/src/gui/widgets/inttextfield.h
index 3493cf52b..2e4e68083 100644
--- a/src/gui/widgets/inttextfield.h
+++ b/src/gui/widgets/inttextfield.h
@@ -68,7 +68,7 @@ class IntTextField final : public TextField
/**
* Responds to key presses.
*/
- void keyPressed(gcn::KeyEvent &event) override final;
+ void keyPressed(KeyEvent &event) override final;
private:
int mMin; /**< Minimum value */
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index 2c9e9b731..b2fa6a47e 100644
--- a/src/gui/widgets/itemcontainer.cpp
+++ b/src/gui/widgets/itemcontainer.cpp
@@ -386,11 +386,11 @@ void ItemContainer::hidePopup()
mItemPopup->setVisible(false);
}
-void ItemContainer::keyPressed(gcn::KeyEvent &event A_UNUSED)
+void ItemContainer::keyPressed(KeyEvent &event A_UNUSED)
{
}
-void ItemContainer::keyReleased(gcn::KeyEvent &event A_UNUSED)
+void ItemContainer::keyReleased(KeyEvent &event A_UNUSED)
{
}
diff --git a/src/gui/widgets/itemcontainer.h b/src/gui/widgets/itemcontainer.h
index ecb7b658e..bc1bee695 100644
--- a/src/gui/widgets/itemcontainer.h
+++ b/src/gui/widgets/itemcontainer.h
@@ -85,8 +85,8 @@ class ItemContainer final : public gcn::Widget,
void draw(Graphics *graphics) override final;
// KeyListener
- void keyPressed(gcn::KeyEvent &event) override final;
- void keyReleased(gcn::KeyEvent &event) override final;
+ void keyPressed(KeyEvent &event) override final;
+ void keyReleased(KeyEvent &event) override final;
// MouseListener
void mousePressed(gcn::MouseEvent &event) override final;
diff --git a/src/gui/widgets/listbox.cpp b/src/gui/widgets/listbox.cpp
index e71907f37..bd685632f 100644
--- a/src/gui/widgets/listbox.cpp
+++ b/src/gui/widgets/listbox.cpp
@@ -24,8 +24,9 @@
#include "client.h"
+#include "events/keyevent.h"
+
#include "input/keydata.h"
-#include "input/keyevent.h"
#include "gui/gui.h"
@@ -174,7 +175,7 @@ void ListBox::draw(Graphics *graphics)
BLOCK_END("ListBox::draw")
}
-void ListBox::keyPressed(gcn::KeyEvent &keyEvent)
+void ListBox::keyPressed(KeyEvent &keyEvent)
{
const int action = static_cast<KeyEvent*>(&keyEvent)->getActionId();
if (action == Input::KEY_GUI_SELECT)
diff --git a/src/gui/widgets/listbox.h b/src/gui/widgets/listbox.h
index 459aea2e3..883814456 100644
--- a/src/gui/widgets/listbox.h
+++ b/src/gui/widgets/listbox.h
@@ -67,7 +67,7 @@ class ListBox : public gcn::ListBox,
// Inherited from KeyListener
- void keyPressed(gcn::KeyEvent& keyEvent) override final;
+ void keyPressed(KeyEvent& keyEvent) override final;
// Inherited from MouseListener
diff --git a/src/gui/widgets/radiobutton.cpp b/src/gui/widgets/radiobutton.cpp
index 092841dcf..75ea4819a 100644
--- a/src/gui/widgets/radiobutton.cpp
+++ b/src/gui/widgets/radiobutton.cpp
@@ -24,8 +24,9 @@
#include "client.h"
+#include "events/keyevent.h"
+
#include "input/keydata.h"
-#include "input/keyevent.h"
#include "resources/image.h"
@@ -177,7 +178,7 @@ void RadioButton::mouseExited(gcn::MouseEvent& event A_UNUSED)
mHasMouse = false;
}
-void RadioButton::keyPressed(gcn::KeyEvent& keyEvent)
+void RadioButton::keyPressed(KeyEvent& keyEvent)
{
const int action = static_cast<KeyEvent*>(&keyEvent)->getActionId();
if (action == Input::KEY_GUI_SELECT)
diff --git a/src/gui/widgets/radiobutton.h b/src/gui/widgets/radiobutton.h
index ff6f5aafd..9802fb5fd 100644
--- a/src/gui/widgets/radiobutton.h
+++ b/src/gui/widgets/radiobutton.h
@@ -74,7 +74,7 @@ class RadioButton final : public gcn::RadioButton,
*/
void mouseExited(gcn::MouseEvent& event) override final;
- void keyPressed(gcn::KeyEvent& keyEvent) override final;
+ void keyPressed(KeyEvent& keyEvent) override final;
void updateAlpha();
diff --git a/src/gui/widgets/slider.cpp b/src/gui/widgets/slider.cpp
index 8eb27824d..4513ca167 100644
--- a/src/gui/widgets/slider.cpp
+++ b/src/gui/widgets/slider.cpp
@@ -25,8 +25,9 @@
#include "client.h"
#include "graphicsvertexes.h"
+#include "events/keyevent.h"
+
#include "input/keydata.h"
-#include "input/keyevent.h"
#include "resources/image.h"
@@ -340,7 +341,7 @@ void Slider::mouseWheelMovedDown(gcn::MouseEvent &mouseEvent)
mouseEvent.consume();
}
-void Slider::keyPressed(gcn::KeyEvent& keyEvent)
+void Slider::keyPressed(KeyEvent& keyEvent)
{
const int action = static_cast<KeyEvent*>(&keyEvent)->getActionId();
diff --git a/src/gui/widgets/slider.h b/src/gui/widgets/slider.h
index c59e0c47f..38c149560 100644
--- a/src/gui/widgets/slider.h
+++ b/src/gui/widgets/slider.h
@@ -85,7 +85,7 @@ class Slider final : public gcn::Slider,
void mouseWheelMovedDown(gcn::MouseEvent &mouseEvent) override final;
- void keyPressed(gcn::KeyEvent& keyEvent) override final;
+ void keyPressed(KeyEvent& keyEvent) override final;
void setValue2(const double value);
diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp
index 2fe4f1332..bc41ba824 100644
--- a/src/gui/widgets/tabbedarea.cpp
+++ b/src/gui/widgets/tabbedarea.cpp
@@ -22,8 +22,9 @@
#include "gui/widgets/tabbedarea.h"
+#include "events/keyevent.h"
+
#include "input/keydata.h"
-#include "input/keyevent.h"
#include "gui/widgets/button.h"
#include "gui/widgets/scrollarea.h"
@@ -683,7 +684,7 @@ void TabbedArea::setDimension(const gcn::Rectangle &dimension)
adjustSize();
}
-void TabbedArea::keyPressed(gcn::KeyEvent& keyEvent)
+void TabbedArea::keyPressed(KeyEvent& keyEvent)
{
if (mBlockSwitching || keyEvent.isConsumed() || !isFocused())
return;
diff --git a/src/gui/widgets/tabbedarea.h b/src/gui/widgets/tabbedarea.h
index d517c9a51..de470e89d 100644
--- a/src/gui/widgets/tabbedarea.h
+++ b/src/gui/widgets/tabbedarea.h
@@ -171,7 +171,7 @@ class TabbedArea final : public Widget2,
bool getFollowDownScroll() const A_WARN_UNUSED
{ return mFollowDownScroll; }
- void keyPressed(gcn::KeyEvent& keyEvent) override final;
+ void keyPressed(KeyEvent& keyEvent) override final;
void setBlockSwitching(const bool b)
{ mBlockSwitching = b; }
diff --git a/src/gui/widgets/textbox.cpp b/src/gui/widgets/textbox.cpp
index 6bd301b32..8130469b7 100644
--- a/src/gui/widgets/textbox.cpp
+++ b/src/gui/widgets/textbox.cpp
@@ -22,8 +22,9 @@
#include "gui/widgets/textbox.h"
+#include "events/keyevent.h"
+
#include "input/keydata.h"
-#include "input/keyevent.h"
#include "gui/base/font.hpp"
@@ -165,7 +166,7 @@ void TextBox::setTextWrapped(const std::string &text, const int minDimension)
gcn::TextBox::setText(wrappedStream.str());
}
-void TextBox::keyPressed(gcn::KeyEvent& keyEvent)
+void TextBox::keyPressed(KeyEvent& keyEvent)
{
const gcn::Key &key = keyEvent.getKey();
const int action = static_cast<KeyEvent*>(&keyEvent)->getActionId();
diff --git a/src/gui/widgets/textbox.h b/src/gui/widgets/textbox.h
index d8841cfeb..6b0429483 100644
--- a/src/gui/widgets/textbox.h
+++ b/src/gui/widgets/textbox.h
@@ -60,7 +60,7 @@ class TextBox final : public gcn::TextBox,
int getMinWidth() const A_WARN_UNUSED
{ return mMinWidth; }
- void keyPressed(gcn::KeyEvent& keyEvent) override final;
+ void keyPressed(KeyEvent& keyEvent) override final;
void draw(Graphics* graphics) override final;
diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp
index 58facecb8..81a69e472 100644
--- a/src/gui/widgets/textfield.cpp
+++ b/src/gui/widgets/textfield.cpp
@@ -26,7 +26,7 @@
#include "input/inputmanager.h"
-#include "input/keyevent.h"
+#include "events/keyevent.h"
#include "gui/sdlinput.h"
@@ -198,7 +198,7 @@ int TextField::getValue() const
return value;
}
-void TextField::keyPressed(gcn::KeyEvent &keyEvent)
+void TextField::keyPressed(KeyEvent &keyEvent)
{
const int val = keyEvent.getKey().getValue();
#ifdef USE_SDL2
diff --git a/src/gui/widgets/textfield.h b/src/gui/widgets/textfield.h
index 42f76985c..71285bd64 100644
--- a/src/gui/widgets/textfield.h
+++ b/src/gui/widgets/textfield.h
@@ -90,7 +90,7 @@ class TextField : public gcn::TextField,
/**
* Processes one keypress.
*/
- void keyPressed(gcn::KeyEvent &keyEvent) override;
+ void keyPressed(KeyEvent &keyEvent) override;
/**
* Set the minimum value for a range