-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathVisualADSView.h
124 lines (99 loc) · 3.83 KB
/
VisualADSView.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
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
118
119
120
121
122
123
124
// VisualADSView.h : interface of the CVisualADSView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_VISUALADSVIEW_H__C51F58B0_3B0D_432D_89F0_526A93C78AE0__INCLUDED_)
#define AFX_VISUALADSVIEW_H__C51F58B0_3B0D_432D_89F0_526A93C78AE0__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "MyShape.h"
#include <vector>
using namespace std;
class CVisualADSDoc;
class ADObject;
class CVisualADSView : public CFODrawView
{
protected: // create from serialization only
CVisualADSView();
DECLARE_DYNCREATE(CVisualADSView)
// Attributes
public:
CVisualADSDoc* GetDocument();
// Operations
public:
void My_Serialize();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CVisualADSView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
virtual void OnInitialUpdate();
protected:
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
//}}AFX_VIRTUAL
public:
vector<CMyShape*> m_shapes;
vector<CFOLinkShape*> m_links;
CMyShape* m_frameShape;
POINT m_ptGroupSize;
POINT m_ptUserSize;
POINT m_ptComputerSize;
POINT m_ptResourceSize;
POINT m_ptGroupFrameSize;
POINT m_ptUserFrameSize;
POINT m_ptComputerFrameSize;
POINT m_ptResourceFrameSize;
BOOL m_bEnableDragCanvas;
public:
void removeFrameShape();
CMyShape* addDomain(ADObject *aDObject, CString strName, int iX1, int iY1, int iX2, int iY2);
CMyShape* addOU(ADObject *aDObject, CString strName, int iX1, int iY1, int iX2, int iY2);
CMyShape* addBigComputer(ADObject *aDObject, CString strName, int iX1, int iY1, int iX2, int iY2);
CMyShape* addGroup(ADObject *aDObject, CString strName, int iX, int iY);
CMyShape* addUser(ADObject *aDObject, CString strName, int iX, int iY);
CMyShape* addComputer(ADObject *aDObject, CString strName, int iX, int iY);
CMyShape* addResource(ADObject *aDObject, CString strName, int iX, int iY);
CFOLinkShape* addInheritRelation(CString strName, CFODrawPortsShape *pShape1, CFODrawPortsShape *pShape2);
CFOLinkShape* addNTFSRelation(CString strName, CFODrawPortsShape *pShape1, CFODrawPortsShape *pShape2, int iPermission, BOOL bBothRelation);
CFOLinkShape* addShareRelation(CString strName, CFODrawPortsShape *pShape1, CFODrawPortsShape *pShape2, int iPermission, BOOL bBothRelation);
CMyShape* addGroupFrame(int iX, int iY);
CMyShape* addUserFrame(int iX, int iY);
CMyShape* addComputerFrame(int iX, int iY);
CMyShape* addResourceFrame(int iX, int iY);
void deleteAllShapes();
void deleteAllLinks();
void FOSetCursor(UINT nID);
virtual CSize GetCanvasOrginOffset() const;
virtual void DoChangeModel(CFODataModel *pModel);
virtual void DoEventSingleClick(CFODrawShape *pShape);
void DoChangeCanvasSize(CPoint ptGraphSize);
void MyDoChangeModel(CPoint ptGraphSize);
// Implementation
public:
virtual ~CVisualADSView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CVisualADSView)
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnSize(UINT nType, int cx, int cy);
//}}AFX_MSG
afx_msg void OnContextMenu(CWnd*, CPoint point);
afx_msg void OnFilePrintPreview();
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in VisualADSView.cpp
inline CVisualADSDoc* CVisualADSView::GetDocument()
{ return (CVisualADSDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_VISUALADSVIEW_H__C51F58B0_3B0D_432D_89F0_526A93C78AE0__INCLUDED_)