summaryrefslogtreecommitdiff
path: root/plugins/Skins/SkinLib/IconField.cpp
blob: 4cf1aaf532f118bf0aba679c799aa0d68ce3818a (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
#include "globals.h"
#include "IconField.h"
#include "IconFieldState.h"


IconField::IconField(Dialog *dlg, const char *name) 
		: Field(dlg, name), hIcon(NULL)
{

}

IconField::~IconField()
{
}

FieldType IconField::getType() const
{
	return SIMPLE_ICON;
}

HICON IconField::getIcon() const
{
	return hIcon;
}

void IconField::setIcon(HICON hIcon)
{
	if (this->hIcon == hIcon)
		return;

	this->hIcon = hIcon;
	fireOnChange();
}

FieldState * IconField::createState(DialogState *dialogState)
{
	return new IconFieldState(dialogState, this);
}