summaryrefslogtreecommitdiff
path: root/src/gui/widgets/itemcontainer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/itemcontainer.h')
-rw-r--r--src/gui/widgets/itemcontainer.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/gui/widgets/itemcontainer.h b/src/gui/widgets/itemcontainer.h
index 38ccf9ca..ca21ad3f 100644
--- a/src/gui/widgets/itemcontainer.h
+++ b/src/gui/widgets/itemcontainer.h
@@ -27,6 +27,7 @@
#include <guichan/widget.hpp>
#include <guichan/widgetlistener.hpp>
+#include <map>
#include <list>
class Image;
@@ -59,9 +60,6 @@ class ItemContainer : public gcn::Widget,
*/
ItemContainer(Inventory *inventory, bool forceQuantity = false);
- /**
- * Destructor.
- */
virtual ~ItemContainer();
/**
@@ -98,6 +96,12 @@ class ItemContainer : public gcn::Widget,
*/
void selectNone();
+
+ /**
+ * Sets item filter
+ */
+ void setFilter(const std::string &filter);
+
/**
* Adds a listener to the list that's notified each time a change to
* the selection occurs.
@@ -170,6 +174,8 @@ class ItemContainer : public gcn::Widget,
*/
int getSlotIndex(int x, int y) const;
+ Item *getItemAt(int) const;
+
Inventory *mInventory;
int mGridColumns, mGridRows;
Image *mSelImg;
@@ -181,6 +187,10 @@ class ItemContainer : public gcn::Widget,
bool mDescItems;
int mDragPosX, mDragPosY;
+ std::map<int, Item*> mFilteredMap;
+
+ std::string mFilter;
+
ItemPopup *mItemPopup;
typedef std::list<gcn::SelectionListener*> SelectionListenerList;