-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathShapeHandler.h
65 lines (50 loc) · 1.62 KB
/
ShapeHandler.h
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
#pragma once
#include "Shape.h"
#include "FileManager.h"
#include "RoomShape.h"
class CShapeHandler
{
public:
static CShapeHandler* GetInstance();
virtual ~CShapeHandler();
//////////////////////////////////////////////////////////////////////////
/// CRUD
bool AddShape(CShape *cShape);
CShape* GetShapeByID(int nId);
//////////////////////////////////////////////////////////////////////////
/// ±â´É
void Undo();
void Redo();
void Clear();
void Move(CPoint point);
void Select(CPoint point);
void SetDoorWindowRange(bool bDragFlag, CPoint &OldMousePoint, CPoint &CurrentMousePoint);
void MakeFiveReferenceVertex(int *naVertex, int tmpVal1, int tmpVal2);
void SetRange(int &nX, int &nY, int &nWidth, int &nHeight);
//////////////////////////////////////////////////////////////////////////
/// Select Shape
void InitSelect();
int GetCurrentSelectedIndex();
int HowManySelected();
int RotateSelectedShape(); // °³¹ß Áß
int DeleteSelectedShape(); //delete p; undo() ÇØ¾ß ÇÔ
int UpdateSelectedShape(int nX, int nY, int nWidth, int nHeight);
int CopySelectedShape(int nIndex = MY_ERROR);
int WheelSelectedShape(short zDelta);
int MagneticSelectedShape();
int EditSelectedShape(int nX, int nY, int nWidth, int nHeight, int *m_nSubShapeStatus, int *m_nRememberShapeStatus);
vector<CShape*> m_CaShape;
bool NoAddShape;
int MakeAutoIncId();
int m_nDrawRange;
int m_pRememberRoomIDForDoorWindow;
int m_RememberLocationForDoorWindow;
int m_nDrawSelectRange;
int m_nSelectRange;
private:
CShapeHandler();
static CShapeHandler *instance;
stack<CShape*> m_CsShape;
CFileManager * m_CFileManager;
int m_nAutoIncId;
};