diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-02-16 12:22:47 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-02-16 12:28:10 +0300 |
commit | 0d73f54f842a9690c65faedf094112017fd07430 (patch) | |
tree | ca009ae0b366a95ad9c0fef1fa518ad60f8dbac2 /src/gui/widgets | |
parent | 85e89895c4f7a53721a6bd93b47a79d5537d263a (diff) | |
download | manaplus-0d73f54f842a9690c65faedf094112017fd07430.tar.gz manaplus-0d73f54f842a9690c65faedf094112017fd07430.tar.bz2 manaplus-0d73f54f842a9690c65faedf094112017fd07430.tar.xz manaplus-0d73f54f842a9690c65faedf094112017fd07430.zip |
move actionevent into events directory.
Diffstat (limited to 'src/gui/widgets')
31 files changed, 46 insertions, 47 deletions
diff --git a/src/gui/widgets/characterviewnormal.cpp b/src/gui/widgets/characterviewnormal.cpp index 78c538b8c..75481268b 100644 --- a/src/gui/widgets/characterviewnormal.cpp +++ b/src/gui/widgets/characterviewnormal.cpp @@ -87,6 +87,6 @@ void CharacterViewNormal::resize() (*mCharacterEntries)[f]->setPosition((f - 5) * width, y); } -void CharacterViewNormal::action(const gcn::ActionEvent &event A_UNUSED) +void CharacterViewNormal::action(const ActionEvent &event A_UNUSED) { } diff --git a/src/gui/widgets/characterviewnormal.h b/src/gui/widgets/characterviewnormal.h index 50001a61d..4ef1500b0 100644 --- a/src/gui/widgets/characterviewnormal.h +++ b/src/gui/widgets/characterviewnormal.h @@ -40,7 +40,7 @@ class CharacterViewNormal final : public CharacterViewBase void resize() override; - void action(const gcn::ActionEvent &event A_UNUSED) override final; + void action(const ActionEvent &event A_UNUSED) override final; private: std::vector<CharacterDisplay*> *mCharacterEntries; diff --git a/src/gui/widgets/characterviewsmall.cpp b/src/gui/widgets/characterviewsmall.cpp index ce218646b..eda1e4a71 100644 --- a/src/gui/widgets/characterviewsmall.cpp +++ b/src/gui/widgets/characterviewsmall.cpp @@ -98,7 +98,7 @@ void CharacterViewSmall::resize() mNumber->setPosition(10, y2); } -void CharacterViewSmall::action(const gcn::ActionEvent &event) +void CharacterViewSmall::action(const ActionEvent &event) { const std::string &eventId = event.getId(); if (eventId == "next") diff --git a/src/gui/widgets/characterviewsmall.h b/src/gui/widgets/characterviewsmall.h index 3a326134b..17a549718 100644 --- a/src/gui/widgets/characterviewsmall.h +++ b/src/gui/widgets/characterviewsmall.h @@ -39,7 +39,7 @@ class CharacterViewSmall final : public CharacterViewBase void resize() override final; - void action(const gcn::ActionEvent &event) override final; + void action(const ActionEvent &event) override final; private: CharacterDisplay *mSelectedEntry; diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp index 1aed0dfe1..bbba0cd99 100644 --- a/src/gui/widgets/dropdown.cpp +++ b/src/gui/widgets/dropdown.cpp @@ -505,7 +505,7 @@ gcn::ListModel *DropDown::getListModel() return mPopup->getListModel(); } -void DropDown::action(const gcn::ActionEvent &actionEvent A_UNUSED) +void DropDown::action(const ActionEvent &actionEvent A_UNUSED) { foldUp(); distributeActionEvent(); diff --git a/src/gui/widgets/dropdown.h b/src/gui/widgets/dropdown.h index 692b341ca..f3431459f 100644 --- a/src/gui/widgets/dropdown.h +++ b/src/gui/widgets/dropdown.h @@ -133,7 +133,7 @@ class DropDown final : public ActionListener, gcn::Rectangle getChildrenArea() override; - void action(const gcn::ActionEvent &actionEvent) override; + void action(const ActionEvent &actionEvent) override; void distributeValueChangedEvent(); diff --git a/src/gui/widgets/guitable.cpp b/src/gui/widgets/guitable.cpp index 3d987ed63..dcb5431d5 100644 --- a/src/gui/widgets/guitable.cpp +++ b/src/gui/widgets/guitable.cpp @@ -49,7 +49,7 @@ public: ~GuiTableActionListener(); - void action(const gcn::ActionEvent& actionEvent) override final; + void action(const ActionEvent& actionEvent) override final; protected: GuiTable *mTable; @@ -84,8 +84,7 @@ GuiTableActionListener::~GuiTableActionListener() } } -void GuiTableActionListener::action(const gcn::ActionEvent - &actionEvent A_UNUSED) +void GuiTableActionListener::action(const ActionEvent &actionEvent A_UNUSED) { mTable->setSelected(mRow, mColumn); mTable->distributeActionEvent(); diff --git a/src/gui/widgets/itemlinkhandler.cpp b/src/gui/widgets/itemlinkhandler.cpp index 96494ed0b..108444bb0 100644 --- a/src/gui/widgets/itemlinkhandler.cpp +++ b/src/gui/widgets/itemlinkhandler.cpp @@ -53,7 +53,7 @@ namespace A_DELETE_COPY(OpenUrlListener) - void action(const gcn::ActionEvent &event) override final + void action(const ActionEvent &event) override final { if (event.getId() == "yes") openBrowser(url); diff --git a/src/gui/widgets/setupitem.cpp b/src/gui/widgets/setupitem.cpp index 8453a9722..8b6cca5a7 100644 --- a/src/gui/widgets/setupitem.cpp +++ b/src/gui/widgets/setupitem.cpp @@ -154,7 +154,7 @@ std::string SetupItem::getActionEventId() const return mWidget->getActionEventId(); } -void SetupItem::action(const gcn::ActionEvent &event) +void SetupItem::action(const ActionEvent &event) { if (!mWidget) return; @@ -393,7 +393,7 @@ void SetupItemTextField::toWidget() mTextField->setText(mValue); } -void SetupItemTextField::action(const gcn::ActionEvent &event) +void SetupItemTextField::action(const ActionEvent &event) { if (!mTextField) return; @@ -529,7 +529,7 @@ void SetupItemIntTextField::toWidget() mTextField->setText(mValue); } -void SetupItemIntTextField::action(const gcn::ActionEvent &event) +void SetupItemIntTextField::action(const ActionEvent &event) { if (!mTextField) return; @@ -609,7 +609,7 @@ void SetupItemLabel::toWidget() { } -void SetupItemLabel::action(const gcn::ActionEvent &event A_UNUSED) +void SetupItemLabel::action(const ActionEvent &event A_UNUSED) { } @@ -799,7 +799,7 @@ void SetupItemSlider::toWidget() mSlider->setValue2(atof(mValue.c_str())); } -void SetupItemSlider::action(const gcn::ActionEvent &event A_UNUSED) +void SetupItemSlider::action(const ActionEvent &event A_UNUSED) { fromWidget(); if (mOnTheFly) @@ -954,7 +954,7 @@ void SetupItemSlider2::toWidget() updateLabel(); } -void SetupItemSlider2::action(const gcn::ActionEvent &event A_UNUSED) +void SetupItemSlider2::action(const ActionEvent &event A_UNUSED) { fromWidget(); updateLabel(); @@ -1086,7 +1086,7 @@ void SetupItemSliderList::toWidget() mSlider->setSelectedString(mValue); } -void SetupItemSliderList::action(const gcn::ActionEvent &event A_UNUSED) +void SetupItemSliderList::action(const ActionEvent &event A_UNUSED) { fromWidget(); if (mOnTheFly) @@ -1124,7 +1124,7 @@ void SetupItemSound::addMoreControls() mHorizont->add(mButton); } -void SetupItemSound::action(const gcn::ActionEvent &event) +void SetupItemSound::action(const ActionEvent &event) { if (event.getId() == mEventName + "_PLAY") { diff --git a/src/gui/widgets/setupitem.h b/src/gui/widgets/setupitem.h index dd5eda1d9..b5261e2f4 100644 --- a/src/gui/widgets/setupitem.h +++ b/src/gui/widgets/setupitem.h @@ -79,7 +79,7 @@ class SetupItem : public ActionListener, virtual std::string getActionEventId() const A_WARN_UNUSED; - virtual void action(const gcn::ActionEvent &event) override; + virtual void action(const ActionEvent &event) override; virtual void action(); @@ -210,7 +210,7 @@ class SetupItemTextField final : public SetupItem void toWidget() override final; - void action(const gcn::ActionEvent &event) override final; + void action(const ActionEvent &event) override final; void apply(const std::string &eventName) override final; @@ -265,7 +265,7 @@ class SetupItemIntTextField final : public SetupItem void toWidget() override final; - void action(const gcn::ActionEvent &event) override final; + void action(const ActionEvent &event) override final; void apply(const std::string &eventName) override final; @@ -297,7 +297,7 @@ class SetupItemLabel final : public SetupItem void toWidget() override final; - void action(const gcn::ActionEvent &event) override final; + void action(const ActionEvent &event) override final; void apply(const std::string &eventName) override final; @@ -377,7 +377,7 @@ class SetupItemSlider final : public SetupItem void toWidget() override final; - void action(const gcn::ActionEvent &event) override final; + void action(const ActionEvent &event) override final; void apply(const std::string &eventName) override final; @@ -433,7 +433,7 @@ class SetupItemSlider2 final : public SetupItem void toWidget() override final; - void action(const gcn::ActionEvent &event) override final; + void action(const ActionEvent &event) override final; void apply(const std::string &eventName) override final; @@ -470,7 +470,7 @@ class SetupItemSliderList : public SetupItem void toWidget() override; - virtual void action(const gcn::ActionEvent &event) override; + virtual void action(const ActionEvent &event) override; void apply(const std::string &eventName) override final; @@ -520,7 +520,7 @@ class SetupItemSound final : public SetupItemSliderList A_DELETE_COPY(SetupItemSound) - void action(const gcn::ActionEvent &event) override final; + void action(const ActionEvent &event) override final; void addMoreControls() override final; diff --git a/src/gui/widgets/sliderlist.cpp b/src/gui/widgets/sliderlist.cpp index d70977ff3..eee012120 100644 --- a/src/gui/widgets/sliderlist.cpp +++ b/src/gui/widgets/sliderlist.cpp @@ -138,7 +138,7 @@ void SliderList::updateLabel() mLabel->setPosition(buttonSpace + (space - labelWidth) / 2, labelY); } -void SliderList::action(const gcn::ActionEvent &event) +void SliderList::action(const ActionEvent &event) { if (!mListModel) return; diff --git a/src/gui/widgets/sliderlist.h b/src/gui/widgets/sliderlist.h index 144fa0cf1..952b6c337 100644 --- a/src/gui/widgets/sliderlist.h +++ b/src/gui/widgets/sliderlist.h @@ -58,7 +58,7 @@ class SliderList final : public Container, void draw(Graphics *graphics) override final; - void action(const gcn::ActionEvent &event) override final; + void action(const ActionEvent &event) override final; void setSelectedString(const std::string &str); diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp index 0bf6b8d11..500e821f5 100644 --- a/src/gui/widgets/tabbedarea.cpp +++ b/src/gui/widgets/tabbedarea.cpp @@ -558,7 +558,7 @@ void TabbedArea::adjustTabPositions() } } -void TabbedArea::action(const gcn::ActionEvent& actionEvent) +void TabbedArea::action(const ActionEvent& actionEvent) { gcn::Widget *const source = actionEvent.getSource(); Tab *const tab = dynamic_cast<Tab *const>(source); diff --git a/src/gui/widgets/tabbedarea.h b/src/gui/widgets/tabbedarea.h index 27ed05b5e..ec4c02ce5 100644 --- a/src/gui/widgets/tabbedarea.h +++ b/src/gui/widgets/tabbedarea.h @@ -151,7 +151,7 @@ class TabbedArea final : public Widget2, */ void adjustTabPositions(); - void action(const gcn::ActionEvent& actionEvent) override final; + void action(const ActionEvent& actionEvent) override final; // Inherited from MouseListener diff --git a/src/gui/widgets/tabs/setup_colors.cpp b/src/gui/widgets/tabs/setup_colors.cpp index fadea948a..f7068b965 100644 --- a/src/gui/widgets/tabs/setup_colors.cpp +++ b/src/gui/widgets/tabs/setup_colors.cpp @@ -207,7 +207,7 @@ Setup_Colors::~Setup_Colors() } } -void Setup_Colors::action(const gcn::ActionEvent &event) +void Setup_Colors::action(const ActionEvent &event) { const std::string &eventId = event.getId(); if (eventId == "slider_grad") diff --git a/src/gui/widgets/tabs/setup_colors.h b/src/gui/widgets/tabs/setup_colors.h index 0bcc9c7f0..55d5950c5 100644 --- a/src/gui/widgets/tabs/setup_colors.h +++ b/src/gui/widgets/tabs/setup_colors.h @@ -50,7 +50,7 @@ class Setup_Colors final : public SetupTab, void cancel() override final; - void action(const gcn::ActionEvent &event) override final; + void action(const ActionEvent &event) override final; void valueChanged(const gcn::SelectionEvent &event) override final; diff --git a/src/gui/widgets/tabs/setup_input.cpp b/src/gui/widgets/tabs/setup_input.cpp index b079974d5..ba02eb5a2 100644 --- a/src/gui/widgets/tabs/setup_input.cpp +++ b/src/gui/widgets/tabs/setup_input.cpp @@ -213,7 +213,7 @@ void Setup_Input::cancel() refreshKeys(); } -void Setup_Input::action(const gcn::ActionEvent &event) +void Setup_Input::action(const ActionEvent &event) { const std::string id = event.getId(); diff --git a/src/gui/widgets/tabs/setup_input.h b/src/gui/widgets/tabs/setup_input.h index 135cb3339..43ec53b56 100644 --- a/src/gui/widgets/tabs/setup_input.h +++ b/src/gui/widgets/tabs/setup_input.h @@ -55,7 +55,7 @@ class Setup_Input final : public SetupTab void cancel() override final; - void action(const gcn::ActionEvent &event) override final; + void action(const ActionEvent &event) override final; /** * Get an update on the assigned key. diff --git a/src/gui/widgets/tabs/setup_joystick.cpp b/src/gui/widgets/tabs/setup_joystick.cpp index 6f023a488..7f96ee468 100644 --- a/src/gui/widgets/tabs/setup_joystick.cpp +++ b/src/gui/widgets/tabs/setup_joystick.cpp @@ -102,7 +102,7 @@ Setup_Joystick::~Setup_Joystick() mNamesModel = nullptr; } -void Setup_Joystick::action(const gcn::ActionEvent &event) +void Setup_Joystick::action(const ActionEvent &event) { const gcn::Widget *const source = event.getSource(); if (source == mJoystickEnabled) diff --git a/src/gui/widgets/tabs/setup_joystick.h b/src/gui/widgets/tabs/setup_joystick.h index 5c7b764ec..ac6caef24 100644 --- a/src/gui/widgets/tabs/setup_joystick.h +++ b/src/gui/widgets/tabs/setup_joystick.h @@ -44,7 +44,7 @@ class Setup_Joystick final : public SetupTab void cancel() override final; - void action(const gcn::ActionEvent &event) override final; + void action(const ActionEvent &event) override final; void setTempEnabled(const bool sel); diff --git a/src/gui/widgets/tabs/setup_relations.cpp b/src/gui/widgets/tabs/setup_relations.cpp index 89d1f5beb..d23ac565c 100644 --- a/src/gui/widgets/tabs/setup_relations.cpp +++ b/src/gui/widgets/tabs/setup_relations.cpp @@ -370,7 +370,7 @@ void Setup_Relations::cancel() { } -void Setup_Relations::action(const gcn::ActionEvent &event) +void Setup_Relations::action(const ActionEvent &event) { const std::string &eventId = event.getId(); if (eventId == ACTION_TABLE) diff --git a/src/gui/widgets/tabs/setup_relations.h b/src/gui/widgets/tabs/setup_relations.h index c9d8e50a3..55da0bedc 100644 --- a/src/gui/widgets/tabs/setup_relations.h +++ b/src/gui/widgets/tabs/setup_relations.h @@ -56,7 +56,7 @@ public: void reset(); - void action(const gcn::ActionEvent &event) override final; + void action(const ActionEvent &event) override final; void updatedPlayer(const std::string &name); diff --git a/src/gui/widgets/tabs/setup_theme.cpp b/src/gui/widgets/tabs/setup_theme.cpp index d7cc4b4df..fd70b9158 100644 --- a/src/gui/widgets/tabs/setup_theme.cpp +++ b/src/gui/widgets/tabs/setup_theme.cpp @@ -433,7 +433,7 @@ void Setup_Theme::updateInfo() mInfoButton->setEnabled(!mThemeInfo.empty()); } -void Setup_Theme::action(const gcn::ActionEvent &event) +void Setup_Theme::action(const ActionEvent &event) { const std::string &eventId = event.getId(); if (eventId == ACTION_THEME) diff --git a/src/gui/widgets/tabs/setup_theme.h b/src/gui/widgets/tabs/setup_theme.h index a7f3ad101..5e8fe7c2a 100644 --- a/src/gui/widgets/tabs/setup_theme.h +++ b/src/gui/widgets/tabs/setup_theme.h @@ -46,7 +46,7 @@ class Setup_Theme final : public SetupTab void cancel() override final; - void action(const gcn::ActionEvent &event) override final; + void action(const ActionEvent &event) override final; void updateInfo(); diff --git a/src/gui/widgets/tabs/setup_video.cpp b/src/gui/widgets/tabs/setup_video.cpp index ffadc5d03..589b08e5e 100644 --- a/src/gui/widgets/tabs/setup_video.cpp +++ b/src/gui/widgets/tabs/setup_video.cpp @@ -445,7 +445,7 @@ void Setup_Video::cancel() config.setValue("noframe", mNoFrame); } -void Setup_Video::action(const gcn::ActionEvent &event) +void Setup_Video::action(const ActionEvent &event) { const std::string &id = event.getId(); diff --git a/src/gui/widgets/tabs/setup_video.h b/src/gui/widgets/tabs/setup_video.h index facbcbce3..b385d0358 100644 --- a/src/gui/widgets/tabs/setup_video.h +++ b/src/gui/widgets/tabs/setup_video.h @@ -50,7 +50,7 @@ class Setup_Video final : public SetupTab, public KeyListener void cancel() override final; - void action(const gcn::ActionEvent &event) override final; + void action(const ActionEvent &event) override final; private: bool mFullScreenEnabled; diff --git a/src/gui/widgets/tabs/setuptabscroll.h b/src/gui/widgets/tabs/setuptabscroll.h index fb7de574d..779826e5a 100644 --- a/src/gui/widgets/tabs/setuptabscroll.h +++ b/src/gui/widgets/tabs/setuptabscroll.h @@ -56,7 +56,7 @@ class SetupTabScroll : public SetupTab virtual void externalUnloaded() override; - virtual void action(const gcn::ActionEvent &event A_UNUSED) + virtual void action(const ActionEvent &event A_UNUSED) override final { } diff --git a/src/gui/widgets/tabstrip.cpp b/src/gui/widgets/tabstrip.cpp index 24c33c614..ca31e393d 100644 --- a/src/gui/widgets/tabstrip.cpp +++ b/src/gui/widgets/tabstrip.cpp @@ -48,7 +48,7 @@ gcn::Widget *TabStrip::createWidget(const std::string &text) const return widget; } -void TabStrip::action(const gcn::ActionEvent &event) +void TabStrip::action(const ActionEvent &event) { WidgetGroup::action(event); if (event.getSource()) diff --git a/src/gui/widgets/tabstrip.h b/src/gui/widgets/tabstrip.h index 3e954aec5..2e5ccfe34 100644 --- a/src/gui/widgets/tabstrip.h +++ b/src/gui/widgets/tabstrip.h @@ -40,7 +40,7 @@ class TabStrip final : public WidgetGroup gcn::Widget *createWidget(const std::string &name) const override final A_WARN_UNUSED; - void action(const gcn::ActionEvent &event) override final; + void action(const ActionEvent &event) override final; }; #endif // GUI_WIDGETS_TABSTRIP_H diff --git a/src/gui/widgets/widgetgroup.cpp b/src/gui/widgets/widgetgroup.cpp index 17383780f..56da2d492 100644 --- a/src/gui/widgets/widgetgroup.cpp +++ b/src/gui/widgets/widgetgroup.cpp @@ -57,7 +57,7 @@ void WidgetGroup::addButton(const std::string &restrict text, } } -void WidgetGroup::action(const gcn::ActionEvent &event) +void WidgetGroup::action(const ActionEvent &event) { for (ActionListenerIterator iter = mActionListeners.begin(); iter != mActionListeners.end(); ++iter) diff --git a/src/gui/widgets/widgetgroup.h b/src/gui/widgets/widgetgroup.h index 60ee2672f..835738a6f 100644 --- a/src/gui/widgets/widgetgroup.h +++ b/src/gui/widgets/widgetgroup.h @@ -40,7 +40,7 @@ class WidgetGroup : public Container, virtual void addButton(const std::string &restrict text, const std::string &restrict tag); - void action(const gcn::ActionEvent &event) override; + void action(const ActionEvent &event) override; virtual void add(gcn::Widget *const widget, const int spacing); |