blob: aa59b4792f126761a320f931ba1f6ce16acca79c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#include "headers.h"
ISkinElement *SkinCreateObjectFromXml(HXML hXml, ISkinDataSource *ds)
{
CSkinObject *result = NULL;
const TCHAR *name = xi.getName(hXml);
if (!lstrcmp(name, _T("image")))
result = new CSkinImage;
else if (!lstrcmp(name, _T("icon")))
result = new CSkinIcon;
else if (!lstrcmp(name, _T("text")))
result = new CSkinText;
else if (!lstrcmp(name, _T("layout")))
result = new CSkinLayout;
else
return NULL;
result->SetDataSource(ds);
result->LoadFromXml(hXml);
return result;
}
|