Added a "quick search" box for filtering the card list

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1483 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2010-08-04 21:52:26 +00:00
parent 4532fade77
commit be922940a2
17 changed files with 239 additions and 15 deletions
+19
View File
@@ -11,6 +11,7 @@
#include <util/prec.hpp>
#include <gui/control/card_list.hpp>
#include <gui/control/filtered_card_list.hpp>
DECLARE_POINTER_TYPE(ImageField);
@@ -39,5 +40,23 @@ class ImageCardList : public CardListBase {
friend class CardThumbnailRequest;
};
// ----------------------------------------------------------------------------- : FilteredImageCardList
class FilteredImageCardList : public ImageCardList {
public:
FilteredImageCardList(Window* parent, int id, long additional_style = 0);
/// Change the filter to use, if null then don't use a filter
void setFilter(const CardListFilterP& filter);
protected:
/// Get only the subset of the cards
virtual void getItems(vector<VoidP>& out) const;
virtual void onChangeSet();
private:
CardListFilterP filter; ///< Filter with which this.cards is made
};
// ----------------------------------------------------------------------------- : EOF
#endif