diff options
Diffstat (limited to 'src/gui/widgets/itemlinkhandler.h')
-rw-r--r-- | src/gui/widgets/itemlinkhandler.h | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/gui/widgets/itemlinkhandler.h b/src/gui/widgets/itemlinkhandler.h index d0f00b25..3bb0b557 100644 --- a/src/gui/widgets/itemlinkhandler.h +++ b/src/gui/widgets/itemlinkhandler.h @@ -24,18 +24,32 @@ #include "gui/widgets/linkhandler.h" +#include <guichan/actionlistener.hpp> + +#include <memory> + +class ConfirmDialog; class ItemPopup; +class Window; -class ItemLinkHandler : public LinkHandler +class ItemLinkHandler : public LinkHandler, gcn::ActionListener { public: - ItemLinkHandler(); + ItemLinkHandler(Window *parent = nullptr); ~ItemLinkHandler() override; + // LinkHandler interface void handleLink(const std::string &link) override; + // ActionListener interface + void action(const gcn::ActionEvent &actionEvent) override; + private: - ItemPopup *mItemPopup; + std::unique_ptr<ItemPopup> mItemPopup; + ConfirmDialog *mConfirmDialog = nullptr; + + Window *mParent = nullptr; + std::string mLink; }; #endif |