aboutsummaryrefslogtreecommitdiff
path: root/Src/Wasabi/api/wnd/dragitemi.cpp
blob: 75abde2648478918f587390e88abc35d3b20cd81 (plain) (blame)
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
#include <precomp.h>
#include "dragitemi.h"

DragItemI::DragItemI(const wchar_t *_datatype, void *_data) :
		datatype(_datatype)
{
	if (_data != NULL) addVoidDatum(_data);
}

void DragItemI::addVoidDatum(void *newdatum)
{
	datalist.addItem(reinterpret_cast<char *>(newdatum));
}

const wchar_t *DragItemI::getDatatype()
{
	return datatype;
};

int DragItemI::getNumData()
{
	return datalist.getNumItems();
}

void *DragItemI::getDatum(int pos)
{
	return reinterpret_cast<void *>(datalist[pos]);
}

#define CBCLASS DragItemI
START_DISPATCH;
CB(GETDATATYPE, getDatatype);
CB(GETNUMDATA, getNumData);
CB(GETDATUM, getDatum);
END_DISPATCH;
#undef CBCLASS