aboutsummaryrefslogtreecommitdiff
path: root/lib/gui/epixmap.cpp
blob: c544b007c5ed39acdaff829024e56ee10e56cbc7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#include <lib/gui/epixmap.h>
#include <lib/gui/eskin.h>
#include <lib/gui/init.h>
#include <lib/gui/init_num.h>

ePixmap::ePixmap(eWidget *parent): eWidget(parent)
{
	position=ePoint(0, 0);
	setBackgroundColor(getForegroundColor());
}

ePixmap::~ePixmap()
{
}

void ePixmap::redrawWidget(gPainter *paint, const eRect &area)
{
	if (pixmap)
		paint->blit(*pixmap, position);
}

void ePixmap::eraseBackground(gPainter *target, const eRect &area)
{
}

static eWidget *create_ePixmap(eWidget *parent)
{
	return new ePixmap(parent);
}

class ePixmapSkinInit
{
public:
	ePixmapSkinInit()
	{
		eSkin::addWidgetCreator("ePixmap", create_ePixmap);
	}
	~ePixmapSkinInit()
	{
		eSkin::removeWidgetCreator("ePixmap", create_ePixmap);
	}
};

eAutoInitP0<ePixmapSkinInit> init_ePixmapSkinInit(eAutoInitNumbers::guiobject, "ePixmap");