-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathController.h
More file actions
60 lines (53 loc) · 1.26 KB
/
Copy pathController.h
File metadata and controls
60 lines (53 loc) · 1.26 KB
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
#pragma once
#include "MainFrm.h"
#include "Shape.h"
#include "sRectangle.h"
#include "sCircle.h"
#include "sSquare.h"
#include "sEllipse.h"
#include "sPolygon.h"
#include "sConnector.h"
#include <vector>
#include <iostream>
#include <fstream>
#include <sstream>
class Controller
{
public:
static enum DrawShape{ None, Square, Rectangle, Circle, Ellipse, Polygon } Shapes;
static enum ShapeColor{
RED = RGB(255,0,0),
GREEN = RGB(0,255,0),
BLUE = RGB(0,0,255),
YELLOW = RGB(255,255,0) } Colors;
std::vector<Shape*> shapes;
ShapeColor currentColor;
int currentLineThickness;
int currentLineType;
DrawShape currentShape;
bool IsDrawingPolygon;
private:
CMainFrame *mainFrame;
CChildView *view;
bool selectTool;
bool connectTool;
public:
Controller();
~Controller(void);
void setMainFrame(CMainFrame *mainFrame);
void setView(CChildView *view);
void UndoLastAction();
void setShape(DrawShape shape);
Shape* getShape(Shape* shape);
void Save();
void Open();
void SetSelectedShapeColor(ShapeColor color);
ShapeColor GetSelectedShapeColor();
void SetShapeText(wchar_t ch);
void SetSelectTool(bool value);
bool GetSelectTool();
void DeleteCurrentShape();
void SetConnectTool(bool value);
bool GetConnectTool();
};
extern Controller *Ctrl;