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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
#ifndef T2DLL_T2TOOLWINDOW_H
#define T2DLL_T2TOOLWINDOW_H
#include "../common.h"
class T2ToolIconItem;
enum {
// General tools
kToolOption0 = 0,
// Tenants
kToolOption1 = 1,
// Movers
kToolOption2 = 2,
// OutObjs
kToolOption3 = 3,
// Categories
kToolOption4 = 4,
};
class AFX_CLASS_EXPORT T2ToolWindow : public CFrameWnd {
DECLARE_DYNCREATE(T2ToolWindow)
DECLARE_MESSAGE_MAP()
public:
T2ToolWindow();
virtual ~T2ToolWindow();
virtual void SetDocument(T2TowerDoc* inDoc);
virtual int GetSel();
virtual void SetSel(int inID);
virtual CString* GetIconName(int inID);
virtual T2TemplatePlugin* GetIconPlugin(int inID);
virtual DWORD GetIconOption(int inID);
virtual unsigned int GetIconValiation(int inID);
virtual void AddIcon(const char* inName, char* inStr2, unsigned int inValiation, DWORD inOption, T2ToolDef* inToolDef, int inFld18, unsigned short inSomeMask, T2ToolCallback* inToolCallback);
virtual void AddIcon(const char* inName, unsigned short inSomeMask, char* inStr2, T2ToolCallback* inToolCallback);
virtual void RemoveIcon(const char* inName, unsigned int inValiation);
virtual void RemoveAll();
virtual void Refresh();
virtual int GetID(const char* inName, unsigned int inValiation);
virtual T2ToolIconItem* GetItem(const char* inName, unsigned int inValiation);
virtual T2ToolIconItem* GetItem(int inID);
virtual BOOL EnableIcon(const char* inName, unsigned int inValiation, BOOL inFlag);
virtual void EnableIcon(BOOL inFlag);
virtual T2ToolIconItem* EnableIcon(unsigned short inMask);
virtual BOOL OnEraseBkgndProc(CDC* pDC);
virtual int OnCreateProc(LPCREATESTRUCT lpCreateStruct);
virtual void OnLButtonDownProc(UINT nFlags, CPoint point);
virtual void OnLButtonUpProc(UINT nFlags, CPoint point);
virtual void OnMouseMoveProc(UINT nFlags, CPoint point);
virtual void OnLButtonDblClkProc(UINT nFlags, CPoint point);
virtual void OnTimerProc(UINT nIDEvent);
virtual void OnSizeProc(UINT nType, int cx, int cy);
void StartTimer(UINT inDelay);
void StopTimer();
protected:
virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
virtual BOOL RefreshItem(T2ToolIconItem* inItem);
virtual T2TemplatePlugin* SearchPlugin(T2TemplatePluginList* inList, CString& inName);
virtual POSITION SearchID(int inID);
virtual int AssignNewID();
virtual void RemoveItem(POSITION inPos);
virtual void SelChange(int inID);
virtual void Updated();
virtual void ListUpdated();
virtual void RedrawButton();
afx_msg BOOL OnQueryNewPalette();
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnDestroy();
afx_msg void OnClose();
friend class T2TowerDoc;
HINSTANCE mModule;
T2TowerDoc *mDocument;
T2WorldDef *mWorldDef;
T2ToolIconList *mToolIconList;
int mSel;
UINT mTimerID;
T2ToolIconItem *_D8[16];
unsigned short _118;
CListCtrl *mListCtrl;
};
class AFX_CLASS_EXPORT T2ToolIconItem {
public:
T2ToolIconItem();
virtual ~T2ToolIconItem();
int mID;
T2TemplatePlugin *mPlugin;
CString mName;
unsigned int mValiation;
DWORD mOption;
int m18;
unsigned short m1C;
T2ToolCallback *mToolCallback;
BOOL m24;
int mEnableCount;
CString m2C;
unsigned int m30;
T2ToolDef *mToolDef;
};
class AFX_CLASS_EXPORT T2ToolIconList : public CList<T2ToolIconItem *, T2ToolIconItem *> {
public:
T2ToolIconList();
virtual ~T2ToolIconList();
};
#endif
|