diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-02-16 15:18:59 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-02-16 15:23:11 +0300 |
commit | a9a838708956e001461c6d835d228aad8ce30902 (patch) | |
tree | b0227578856a4663578ede002d977cc112258364 /src/gui | |
parent | 36c98f4e483ec0a9fc831d8a5938b7a3a72c1a9b (diff) | |
download | mv-a9a838708956e001461c6d835d228aad8ce30902.tar.gz mv-a9a838708956e001461c6d835d228aad8ce30902.tar.bz2 mv-a9a838708956e001461c6d835d228aad8ce30902.tar.xz mv-a9a838708956e001461c6d835d228aad8ce30902.zip |
move selectionevent into events directory.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/base/selectionevent.cpp | 82 | ||||
-rw-r--r-- | src/gui/base/selectionevent.hpp | 98 | ||||
-rw-r--r-- | src/gui/widgets/dropdown.cpp | 4 | ||||
-rw-r--r-- | src/gui/widgets/dropdown.h | 2 | ||||
-rw-r--r-- | src/gui/widgets/itemcontainer.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/tabs/setup_colors.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/tabs/setup_colors.h | 2 | ||||
-rw-r--r-- | src/gui/windows/buydialog.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/buydialog.h | 2 | ||||
-rw-r--r-- | src/gui/windows/inventorywindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/inventorywindow.h | 2 | ||||
-rw-r--r-- | src/gui/windows/selldialog.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/selldialog.h | 2 | ||||
-rw-r--r-- | src/gui/windows/serverdialog.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/serverdialog.h | 2 | ||||
-rw-r--r-- | src/gui/windows/shopwindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/shopwindow.h | 2 | ||||
-rw-r--r-- | src/gui/windows/tradewindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/tradewindow.h | 2 |
19 files changed, 18 insertions, 198 deletions
diff --git a/src/gui/base/selectionevent.cpp b/src/gui/base/selectionevent.cpp deleted file mode 100644 index 04318be06..000000000 --- a/src/gui/base/selectionevent.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/* - * The ManaPlus Client - * Copyright (C) 2011-2014 The ManaPlus Developers - * - * This file is part of The ManaPlus Client. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -/* _______ __ __ __ ______ __ __ _______ __ __ - * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ - * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / - * / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / / - * / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / / - * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / - * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ - * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * - * - * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem - * - * Visit: http://guichan.sourceforge.net - * - * License: (BSD) - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name of Guichan nor the names of its contributors may - * be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * For comments regarding functions please see the header file. - */ - -#include "gui/base/selectionevent.hpp" - -#include "debug.h" - -namespace gcn -{ - SelectionEvent::SelectionEvent(Widget *const source) : - Event(source) - { - } - - SelectionEvent::~SelectionEvent() - { - } -} // namespace gcn diff --git a/src/gui/base/selectionevent.hpp b/src/gui/base/selectionevent.hpp deleted file mode 100644 index 5d05f015c..000000000 --- a/src/gui/base/selectionevent.hpp +++ /dev/null @@ -1,98 +0,0 @@ -/* - * The ManaPlus Client - * Copyright (C) 2011-2014 The ManaPlus Developers - * - * This file is part of The ManaPlus Client. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -/* _______ __ __ __ ______ __ __ _______ __ __ - * / _____/\ / /\ / /\ / /\ / ____/\ / /\ / /\ / ___ /\ / |\/ /\ - * / /\____\// / // / // / // /\___\// /_// / // /\_/ / // , |/ / / - * / / /__ / / // / // / // / / / ___ / // ___ / // /| ' / / - * / /_// /\ / /_// / // / // /_/_ / / // / // /\_/ / // / | / / - * /______/ //______/ //_/ //_____/\ /_/ //_/ //_/ //_/ //_/ /|_/ / - * \______\/ \______\/ \_\/ \_____\/ \_\/ \_\/ \_\/ \_\/ \_\/ \_\/ - * - * Copyright (c) 2004 - 2008 Olof Naessén and Per Larsson - * - * - * Per Larsson a.k.a finalman - * Olof Naessén a.k.a jansem/yakslem - * - * Visit: http://guichan.sourceforge.net - * - * License: (BSD) - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name of Guichan nor the names of its contributors may - * be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef GCN_SELECTIONEVENT_HPP -#define GCN_SELECTIONEVENT_HPP - -#include "events/event.h" - -#include "localconsts.h" - -namespace gcn -{ - class Widget; - - /** - * Represents a selection event. - * - * @author Olof Naessén - * @since 0.8.0 - */ - class SelectionEvent final: public Event - { - public: - /** - * Constructor. - * - * @param source source The widget of the selection event. - */ - explicit SelectionEvent(Widget *const source); - - /** - * Destructor. - */ - virtual ~SelectionEvent(); - }; -} // namespace gcn - -#endif // end GCN_SELECTIONEVENT_HPP diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp index aca82cef4..225ea11bb 100644 --- a/src/gui/widgets/dropdown.cpp +++ b/src/gui/widgets/dropdown.cpp @@ -524,7 +524,7 @@ gcn::Rectangle DropDown::getChildrenArea() return gcn::Rectangle(); } -void DropDown::valueChanged(const gcn::SelectionEvent& event A_UNUSED) +void DropDown::valueChanged(const SelectionEvent& event A_UNUSED) { } @@ -552,7 +552,7 @@ void DropDown::distributeValueChangedEvent() iter != mSelectionListeners.end(); ++iter) { - gcn::SelectionEvent event(this); + SelectionEvent event(this); (*iter)->valueChanged(event); } } diff --git a/src/gui/widgets/dropdown.h b/src/gui/widgets/dropdown.h index dd38a1730..8f42bfc65 100644 --- a/src/gui/widgets/dropdown.h +++ b/src/gui/widgets/dropdown.h @@ -107,7 +107,7 @@ class DropDown final : public ActionListener, std::string getSelectedString() const A_WARN_UNUSED; - void valueChanged(const gcn::SelectionEvent& event) override final; + void valueChanged(const SelectionEvent& event) override final; void updateSelection(); diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp index 27a00798e..4608534b1 100644 --- a/src/gui/widgets/itemcontainer.cpp +++ b/src/gui/widgets/itemcontainer.cpp @@ -374,7 +374,7 @@ void ItemContainer::distributeValueChangedEvent() { if (*i) { - gcn::SelectionEvent event(this); + SelectionEvent event(this); (*i)->valueChanged(event); } } diff --git a/src/gui/widgets/tabs/setup_colors.cpp b/src/gui/widgets/tabs/setup_colors.cpp index f7068b965..1a2bdfeae 100644 --- a/src/gui/widgets/tabs/setup_colors.cpp +++ b/src/gui/widgets/tabs/setup_colors.cpp @@ -244,7 +244,7 @@ void Setup_Colors::action(const ActionEvent &event) } } -void Setup_Colors::valueChanged(const gcn::SelectionEvent &event A_UNUSED) +void Setup_Colors::valueChanged(const SelectionEvent &event A_UNUSED) { if (!userPalette) return; diff --git a/src/gui/widgets/tabs/setup_colors.h b/src/gui/widgets/tabs/setup_colors.h index 55d5950c5..8864db7db 100644 --- a/src/gui/widgets/tabs/setup_colors.h +++ b/src/gui/widgets/tabs/setup_colors.h @@ -52,7 +52,7 @@ class Setup_Colors final : public SetupTab, void action(const ActionEvent &event) override final; - void valueChanged(const gcn::SelectionEvent &event) override final; + void valueChanged(const SelectionEvent &event) override final; private: static const char *const rawmsg; diff --git a/src/gui/windows/buydialog.cpp b/src/gui/windows/buydialog.cpp index 0027b695e..19a46b9b8 100644 --- a/src/gui/windows/buydialog.cpp +++ b/src/gui/windows/buydialog.cpp @@ -482,7 +482,7 @@ void BuyDialog::action(const ActionEvent &event) } } -void BuyDialog::valueChanged(const gcn::SelectionEvent &event A_UNUSED) +void BuyDialog::valueChanged(const SelectionEvent &event A_UNUSED) { // Reset amount of items and update labels mAmountItems = 1; diff --git a/src/gui/windows/buydialog.h b/src/gui/windows/buydialog.h index f3ba80c45..500f378ef 100644 --- a/src/gui/windows/buydialog.h +++ b/src/gui/windows/buydialog.h @@ -108,7 +108,7 @@ class BuyDialog final : public Window, /** * Updates the labels according to the selected item. */ - void valueChanged(const gcn::SelectionEvent &event) override final; + void valueChanged(const SelectionEvent &event) override final; /** * Updates the state of buttons and labels. diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp index 09368e2ad..3eb10e0e8 100644 --- a/src/gui/windows/inventorywindow.cpp +++ b/src/gui/windows/inventorywindow.cpp @@ -625,7 +625,7 @@ void InventoryWindow::keyReleased(KeyEvent &event) mSplit = false; } -void InventoryWindow::valueChanged(const gcn::SelectionEvent &event A_UNUSED) +void InventoryWindow::valueChanged(const SelectionEvent &event A_UNUSED) { if (!mInventory || !mInventory->isMainInventory()) return; diff --git a/src/gui/windows/inventorywindow.h b/src/gui/windows/inventorywindow.h index 96d9d04fb..6a6999034 100644 --- a/src/gui/windows/inventorywindow.h +++ b/src/gui/windows/inventorywindow.h @@ -112,7 +112,7 @@ class InventoryWindow final : public Window, /** * Updates labels to currently selected item. */ - void valueChanged(const gcn::SelectionEvent &event) override final; + void valueChanged(const SelectionEvent &event) override final; /** * Sets whether the split button should be shown. diff --git a/src/gui/windows/selldialog.cpp b/src/gui/windows/selldialog.cpp index 1917f7693..aad3619ba 100644 --- a/src/gui/windows/selldialog.cpp +++ b/src/gui/windows/selldialog.cpp @@ -309,7 +309,7 @@ void SellDialog::action(const ActionEvent &event) } } -void SellDialog::valueChanged(const gcn::SelectionEvent &event A_UNUSED) +void SellDialog::valueChanged(const SelectionEvent &event A_UNUSED) { // Reset amount of items and update labels mAmountItems = 1; diff --git a/src/gui/windows/selldialog.h b/src/gui/windows/selldialog.h index 5d1065c16..bd270919e 100644 --- a/src/gui/windows/selldialog.h +++ b/src/gui/windows/selldialog.h @@ -87,7 +87,7 @@ class SellDialog final : public Window, * * @see SelectionListener::selectionChanged */ - void valueChanged(const gcn::SelectionEvent &event) override final; + void valueChanged(const SelectionEvent &event) override final; /** * Gives Player's Money amount diff --git a/src/gui/windows/serverdialog.cpp b/src/gui/windows/serverdialog.cpp index 4ad0e8360..ce5c3c815 100644 --- a/src/gui/windows/serverdialog.cpp +++ b/src/gui/windows/serverdialog.cpp @@ -495,7 +495,7 @@ void ServerDialog::keyPressed(KeyEvent &keyEvent) mServersList->keyPressed(keyEvent); } -void ServerDialog::valueChanged(const gcn::SelectionEvent &) +void ServerDialog::valueChanged(const SelectionEvent &) { const int index = mServersList->getSelected(); if (index == -1) diff --git a/src/gui/windows/serverdialog.h b/src/gui/windows/serverdialog.h index 41ef8bcf1..112c8001d 100644 --- a/src/gui/windows/serverdialog.h +++ b/src/gui/windows/serverdialog.h @@ -123,7 +123,7 @@ class ServerDialog final : public Window, /** * Called when the selected value changed in the servers list box. */ - void valueChanged(const gcn::SelectionEvent &event) override final; + void valueChanged(const SelectionEvent &event) override final; void mouseClicked(MouseEvent &mouseEvent) override final; diff --git a/src/gui/windows/shopwindow.cpp b/src/gui/windows/shopwindow.cpp index 04258998a..9e55af797 100644 --- a/src/gui/windows/shopwindow.cpp +++ b/src/gui/windows/shopwindow.cpp @@ -307,7 +307,7 @@ void ShopWindow::startTrade() mTradeNick.clear(); } -void ShopWindow::valueChanged(const gcn::SelectionEvent &event A_UNUSED) +void ShopWindow::valueChanged(const SelectionEvent &event A_UNUSED) { updateButtonsAndLabels(); } diff --git a/src/gui/windows/shopwindow.h b/src/gui/windows/shopwindow.h index a93e0d475..76971364b 100644 --- a/src/gui/windows/shopwindow.h +++ b/src/gui/windows/shopwindow.h @@ -77,7 +77,7 @@ class ShopWindow final : public Window, /** * Updates the labels according to the selected item. */ - void valueChanged(const gcn::SelectionEvent &event) override final; + void valueChanged(const SelectionEvent &event) override final; /** * Updates the state of buttons and labels. diff --git a/src/gui/windows/tradewindow.cpp b/src/gui/windows/tradewindow.cpp index 2a3b1c7b5..1793fc2fb 100644 --- a/src/gui/windows/tradewindow.cpp +++ b/src/gui/windows/tradewindow.cpp @@ -268,7 +268,7 @@ void TradeWindow::tradeItem(const Item *const item, const int quantity, Net::getTradeHandler()->addItem(item, quantity); } -void TradeWindow::valueChanged(const gcn::SelectionEvent &event) +void TradeWindow::valueChanged(const SelectionEvent &event) { if (!mMyItemContainer || !mPartnerItemContainer) return; diff --git a/src/gui/windows/tradewindow.h b/src/gui/windows/tradewindow.h index 6839b2f30..9704c1e80 100644 --- a/src/gui/windows/tradewindow.h +++ b/src/gui/windows/tradewindow.h @@ -109,7 +109,7 @@ class TradeWindow final : public Window, * Updates the labels and makes sure only one item is selected in * either my inventory or partner inventory. */ - void valueChanged(const gcn::SelectionEvent &event) override final; + void valueChanged(const SelectionEvent &event) override final; /** * Called when receiving actions from the widgets. |