trunk 20080912
[gitenigma.git] / lib / gui / epixmap.cpp
blobc544b007c5ed39acdaff829024e56ee10e56cbc7
1 #include <lib/gui/epixmap.h>
2 #include <lib/gui/eskin.h>
3 #include <lib/gui/init.h>
4 #include <lib/gui/init_num.h>
6 ePixmap::ePixmap(eWidget *parent): eWidget(parent)
8 position=ePoint(0, 0);
9 setBackgroundColor(getForegroundColor());
12 ePixmap::~ePixmap()
16 void ePixmap::redrawWidget(gPainter *paint, const eRect &area)
18 if (pixmap)
19 paint->blit(*pixmap, position);
22 void ePixmap::eraseBackground(gPainter *target, const eRect &area)
26 static eWidget *create_ePixmap(eWidget *parent)
28 return new ePixmap(parent);
31 class ePixmapSkinInit
33 public:
34 ePixmapSkinInit()
36 eSkin::addWidgetCreator("ePixmap", create_ePixmap);
38 ~ePixmapSkinInit()
40 eSkin::removeWidgetCreator("ePixmap", create_ePixmap);
44 eAutoInitP0<ePixmapSkinInit> init_ePixmapSkinInit(eAutoInitNumbers::guiobject, "ePixmap");