summaryrefslogtreecommitdiff
path: root/src/T2DLL/T2MoverModuleList.h
blob: 2891bd90c75499b771a1f24e2655201e8058ba87 (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
#ifndef T2DLL_T2MOVERMODULELIST_H
#define T2DLL_T2MOVERMODULELIST_H
#include "../common.h"
#include "LArray.h"

class AFX_CLASS_EXPORT T2MoverModuleList : public LArray {
public:
	T2MoverModuleList();
	virtual ~T2MoverModuleList();
	virtual BOOL Init(T2MoverDef* moverDef, const RECT& baseRect);
    virtual void Destruct(T2TowerDoc* towerDoc);
    virtual void RemoveModule(T2TowerDoc* towerDoc, T2MoverModule*);
    virtual void StopAdded(T2TowerDoc* towerDoc, T2Mover*, int);
    virtual void StopRemoved(T2TowerDoc* towerDoc, T2Mover*, int);
    virtual int GetModuleCount() const;
    virtual T2MoverModule* ConstructModule();
    virtual void Read(T2Archive&, T2TowerDoc* towerDoc);
    virtual void Write(T2Archive&);

	BOOL InsertModuleAt(int where, T2MoverModule* module);
	void AllClear();
	unsigned int GetItemCount();

    void GetBaseRect(RECT& r) const { r = mBaseRect; }

	static T2MoverModuleList* ReadMMList(T2Archive&, T2TowerDoc* towerDoc);
	static void WriteMMList(T2MoverModuleList*, T2Archive&);

protected:
	virtual DWORD GetMMClassID() { return '_MML'; }

    int mMaxModule;
    int mModuleCount;
    RECT mBaseRect;
};
#endif