summaryrefslogtreecommitdiff
path: root/src/T2DLL/T2DrawableObject.cpp
blob: 5775da7941256a556e13ac4291ae8e5a439e3a77 (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 "T2DrawableObject.h"
#include "T2InfoDialog.h"

T2DrawableObject::T2DrawableObject() {
}

/*virtual*/ T2DrawableObject::~T2DrawableObject() {
}

/*virtual*/ void T2DrawableObject::Draw(T2TowerDoc* towerDoc, const RECT& rect) {
	DrawSelf(towerDoc, rect);
}

/*virtual*/ void T2DrawableObject::DrawSelf(T2TowerDoc*, const RECT&) {
}

/*virtual*/ T2InfoDialog* T2DrawableObject::ShowInfoDialog(T2TowerDoc* towerDoc) {
	CRect rect;
	AfxGetMainWnd()->GetWindowRect(rect);

	T2DLGTEMPLATE tmpl;
	tmpl.pt = rect.CenterPoint();
	tmpl.moduleHandle = AfxGetInstanceHandle();
	tmpl.resID = 1000;

	T2InfoDialog *dialog = ConstructInfoDialog();
	dialog->Realize(this, &tmpl, towerDoc, NULL, NULL, true, NULL, 0, 1);
	return dialog;
}

/*virtual*/ T2InfoDialog* T2DrawableObject::ConstructInfoDialog() {
	return new T2InfoDialog(this);
}

/*virtual*/ void T2DrawableObject::DrawHitMask(T2TowerDoc*) {
#line 78
	_ASSERT(0);
}