Files
MagicSetEditor2/src/gui/control/image_card_list.hpp
T
twanvl 4c10107dbb Thread for generating thumbnail images;
Used for card list;
Implemented reordering from card list

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@115 0fc631ac-6414-0410-93d0-97cfa31319b6
2006-12-18 19:30:44 +00:00

44 lines
1.6 KiB
C++

//+----------------------------------------------------------------------------+
//| Description: Magic Set Editor - Program to make Magic (tm) cards |
//| Copyright: (C) 2001 - 2006 Twan van Laarhoven |
//| License: GNU General Public License 2 or later (see file COPYING) |
//+----------------------------------------------------------------------------+
#ifndef HEADER_GUI_CONTROL_IMAGE_CARD_LIST
#define HEADER_GUI_CONTROL_IMAGE_CARD_LIST
// ----------------------------------------------------------------------------- : Includes
#include <util/prec.hpp>
#include <gui/control/card_list.hpp>
DECLARE_POINTER_TYPE(ImageField);
// ----------------------------------------------------------------------------- : ImageCardList
/// A card list that allows the shows thumbnails of card images
/** This card list also allows the list to be modified */
class ImageCardList : public CardListBase {
public:
~ImageCardList();
ImageCardList(Window* parent, int id, long additional_style = 0);
protected:
virtual int OnGetItemImage(long pos) const;
virtual void onRebuild();
virtual void onBeforeChangeSet();
virtual bool allowModify() const { return true; }
private:
DECLARE_EVENT_TABLE();
void onIdle(wxIdleEvent&);
ImageFieldP image_field; ///< Field to use for card images
mutable map<String,int> thumbnails; ///< image thumbnails, based on image_field
ImageFieldP findImageField();
friend class CardThumbnailRequest;
};
// ----------------------------------------------------------------------------- : EOF
#endif