mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-12 13:37:00 -04:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user