3#include "GUIFixedViewPlacementSet.h"
4#include "DefinitionsGUI.h"
22 class CGUIViewImageObjectFigure;
23 class CGUIChildFrameBase;
24 class CInternalViewManager;
25 class CGUIDialogCreateStencil;
28 class FL_EXPORT CGUIManagerView :
public Base::CFLBase
31 CGUIManagerView(
const CGUIManagerView& rh);
34 virtual ~CGUIManagerView();
36 static const CResult CreateView(CGUIViewImageBase* pView, int32_t i32L, int32_t i32T, int32_t i32R, int32_t i32B,
size_t stParentWindowHandle);
37 static const CResult CreateViewImage(CGUIViewImage* pView, int32_t i32L, int32_t i32T, int32_t i32R, int32_t i32B,
size_t stParentWindowHandle);
38 static const CResult CreateViewGraph(CGUIViewGraph* pView, int32_t i32L, int32_t i32T, int32_t i32R, int32_t i32B,
size_t stParentWindowHandle);
39 static const CResult CreateView3D(CGUIView3D* pView, int32_t i32L, int32_t i32T, int32_t i32R, int32_t i32B,
size_t stParentWindowHandle);
40 static const CResult CreateView3DPathEditor(CGUIView3DPathEditor* pView, int32_t i32L, int32_t i32T, int32_t i32R, int32_t i32B,
size_t stParentWindowHandle);
41 static const CResult CreateViewDrawing(CGUIViewDrawing* pView, int32_t i32L, int32_t i32T, int32_t i32R, int32_t i32B,
size_t stParentWindowHandle);
43 static const CResult CloseView(CGUIViewImageBase* pView);
44 static const CResult DestroyView(CGUIViewImageBase* pView);
45 static const CResult DestroyAllViews();
47 static void RemoveViewThread(CUIThread* pThread);
49 static bool IsAvailableView(CGUIViewImageBase* pView);
51 static bool IsUsedUIMultiThread();
52 static void UseUIMultiThread(
bool bUse);
54 static void SetThumbnailDraggingMode(
bool bSet);
55 static bool IsThumbnailDraggingMode();
57 static void UpdateClipboardViewImage();
59 static const CResult SetCopySourceImage(Base::CFLImage* pFliSource, int32_t i32PageIndex = -1,
double f64MinVal = 0.,
double f64MaxVal = 1.);
60 static const Base::CFLImage* GetCopySourceImage();
61 static const Base::CFLImage* GetIntrinsicCopySourceImage();
62 static int64_t GetCopySourcePageIndex();
64 static void SetViewImageThumbnailDraggingSource(CGUIViewImage* pViewSource);
65 static CGUIViewImage* GetViewImageThumbnailDraggingSource();
66 static CGUIViewImage* GetViewImageCopyFigureSource();
68 static void SetThumbnailDraggingImageSource(Base::CFLImage* pFliSource, int32_t i32SelectedPageIndex = -1);
69 static void SetThumbnailDraggingImageSource(Base::CFLImage* pFliSource, Base::CFLArray<int32_t>& flaSelectedThumbnailIndex);
70 static const Base::CFLImage* GetThumbnailDraggingImageSource();
71 static void GetSelectedThumbnailIndex(Base::CFLArray<int32_t>& flaSelectedThumbnailIndex);
73 static void CopyFigureObject(CGUIViewImageBase* pViewSource,
const std::vector<const Foundation::CFLFigure*>* pVctFigureSrc);
74 static void PasteFigureObject(CGUIViewImageBase* pViewTarget);
76 static void ShowHelpDialogViewImage(CGUIViewImage* pView);
77 static void ShowHelpDialogViewGraph(CGUIViewGraph* pView);
78 static void ShowHelpDialogView3D(CGUIView3D* pView);
79 static void ShowHelpDialogViewSNAP(CGUIViewSNAP* pView);
80 static void ShowHelpDialogViewDrawing(CGUIViewDrawing* pView);
81 static void ShowHelpDialogMainFrame(CGUIMainFrame* pMF);
83 static void InitializeClassContainer();
84 static std::string ExtractClassName(
const type_info& rhs);
85 static std::string ExtractClassNameWithNamespace(
const type_info& rhs);
86 static void CommonExtractClassName(std::string& strResult,
size_t stInitialPosition);
88 static bool AddMultiDocTemplate(UINT uIDResource, CRuntimeClass* pDoc, CRuntimeClass* pFrame, CRuntimeClass* pView);
89 static bool AddWindow(CDocument* pDoc, CFrameWnd* pFrame, CView* pView);
91 static bool DeleteWindow(CDocument* pDoc);
92 static bool DeleteWindow(CFrameWnd* pFrame);
93 static bool DeleteWindow(CView* pView);
95 static int64_t GetMultiDocTemplateCount();
97 static CMultiDocTemplate* GetMultiDocTemplate(
size_t stIndex);
98 static CMultiDocTemplate* GetMultiDocTemplate(std::string strMultiDocTemplateName);
100 static std::string GetMultiDocTemplateName(
size_t stIndex);
101 static std::string GetMultiDocTemplateName(CRuntimeClass* pDoc, CRuntimeClass* pFrame, CRuntimeClass* pView);
102 static std::string GetMultiDocTemplateName(CMultiDocTemplate* pMultiDocTemplate);
104 static size_t GetViewCount();
105 static CGUIViewBase* FindViewByIndex(
size_t stIndex);
106 static CGUIViewBase* FindViewByIndex(CRuntimeClass* pRtcView,
size_t stIndex);
107 static CGUIViewBase* FindViewByIndexDerivedFrom(CRuntimeClass* pRtcView,
size_t stIndex);
109 static CGUIViewBase* FindViewByViewNumber(
size_t stViewNumber);
110 static CGUIViewBase* FindViewByViewNumber(
const Base::CFLString<wchar_t>& strTitle);
111 static CGUIViewBase* FindViewByViewNumber(CRuntimeClass* pRtcView,
size_t stViewNumber);
112 static CGUIViewBase* FindViewByViewNumber(CRuntimeClass* pRtcView,
const Base::CFLString<wchar_t>& strTitle);
113 static CGUIViewBase* FindViewByViewNumberDerivedFrom(CRuntimeClass* pRtcView,
size_t stViewNumber);
114 static CGUIViewBase* FindViewByViewNumberDerivedFrom(CRuntimeClass* pRtcView,
const Base::CFLString<wchar_t>& strTitle);
116 static std::vector<CGUIViewBase*> FindView(
const Base::CFLString<wchar_t>& strTitle);
117 static std::vector<CGUIViewBase*> FindView(CRuntimeClass* pRtcView);
118 static std::vector<CGUIViewBase*> FindViewDerivedFrom(CRuntimeClass* pRtcView);
119 static std::vector<CGUIViewBase*> FindView(CRuntimeClass* pRtcView,
const Base::CFLString<wchar_t>& strTitle);
120 static std::vector<CGUIViewBase*> FindViewDerivedFrom(CRuntimeClass* pRtcView,
const Base::CFLString<wchar_t>& strTitle);
121 static std::vector<CGUIViewImage*> FindViewImage();
123 static const CResult FindView(
const Base::CFLString<wchar_t>& strTitle, std::vector<CGUIViewBase*>& vctResult);
124 static const CResult FindView(CRuntimeClass* pRtcView, std::vector<CGUIViewBase*>& vctResult);
125 static const CResult FindViewDerivedFrom(CRuntimeClass* pRtcView, std::vector<CGUIViewBase*>& vctResult);
126 static const CResult FindView(CRuntimeClass* pRtcView,
const Base::CFLString<wchar_t>& strTitle, std::vector<CGUIViewBase*>& vctResult);
127 static const CResult FindViewDerivedFrom(CRuntimeClass* pRtcView,
const Base::CFLString<wchar_t>& strTitle, std::vector<CGUIViewBase*>& vctResult);
128 static const CResult FindViewImage(std::vector<CGUIViewImage*>& vctResult);
130 static bool DoesViewImageExist();
131 static bool DoesViewGraphExist();
132 static bool DoesView3DExist();
133 static bool DoesView3DPathEditorExist();
134 static bool DoesViewDrawingExist();
135 static bool DoesViewSNAPExist();
137 static bool DoesVisibleViewImageExist();
138 static bool DoesVisibleViewGraphExist();
139 static bool DoesVisibleView3DExist();
140 static bool DoesVisibleView3DPathEditorExist();
141 static bool DoesVisibleViewDrawingExist();
142 static bool DoesVisibleViewSNAPExist();
146 static std::vector<CGUIViewBase*> FindViewAnyOf(
const Base::CFLString<wchar_t>& strTitle);
148 static CDocument* FindWindowVDocument(
size_t stIndex);
149 static std::vector<CDocument*> FindWindowVDocument(
const Base::CFLString<wchar_t>& strTitle);
150 static CFrameWnd* FindWindowFrame(
size_t stIndex);
151 static std::vector <CFrameWnd*> FindWindowFrame(
const Base::CFLString<wchar_t>& strTitle);
152 static CView* FindWindowView(
size_t stIndex);
153 static std::vector <CView*>FindWindowView(
const Base::CFLString<wchar_t>& strTitle);
156 static bool AddFixedViewDeclaration(CGUIFixedViewDeclaration* pFixedViewDeclaration);
157 static int64_t GetFixedViewDeclarationCount();
158 static int64_t GetFixedViewDeclarationIndex(
const CGUIFixedViewDeclaration* pFVD);
159 static const CResult RemoveFixedViewDeclaration(
size_t stIndex);
160 static const CResult RemoveFixedViewDeclaration(CGUIFixedViewDeclaration* pFixedViewDeclaration);
161 static CGUIFixedViewDeclaration* GetFixedViewDeclaration(int64_t i64Index);
163 static const CResult AddFixedViewPlacementSet(CGUIFixedViewPlacementSet& fvpSet,
bool bAddMenuItem =
true);
164 static const CResult AddFixedViewPlacementSet(CGUIFixedViewPlacementSet* pFvpSet,
bool bAddMenuItem =
true);
165 static const CResult RemoveFixedViewPlacementSet(
size_t stIndex);
166 static int64_t GetFixedViewPlacementSetCount();
167 static CGUIFixedViewPlacementSet* GetFixedViewPlacementSet(
size_t stIndex);
168 static CGUIFixedViewPlacementSet* GetFixedViewPlacementSet(
const Base::CFLString<wchar_t>& strFvpSetName);
169 static int64_t GetFixedViewPlacementSetIndex(
const CGUIFixedViewPlacementSet* pFvpSet);
171 static int64_t GetSelectedFixedViewPlacementSetIndex();
172 static CGUIFixedViewPlacementSet* GetSelectedFixedViewPlacementSet();
174 static bool SelectFixedViewPlacementSet(
const Base::CFLString<wchar_t>& strFvpSetName);
175 static bool SelectFixedViewPlacementSet(
size_t stIndex);
177 static bool CreateFixedView(
size_t stIndex,
bool bLoadFixedViewSetting =
true);
178 static bool RelocateFixedView();
180 static bool PreDestroyViewImage();
181 static bool PreDestroyViewGraph();
182 static bool PreDestroyView3D();
183 static bool PreDestroyView3DPathEditor();
184 static bool PreDestroyViewDrawing();
185 static bool PreDestroyViewSNAP();
186 static bool PreDestroyViewImageBase();
188 static void LButtonDownOnNcHitView(
const Base::TPoint<int>& tpScreen);
189 static void LButtonUpOnNcHitView(
const Base::TPoint<int>& tpScreen);
190 static void MouseMoveOnNcHitView(Base::TPoint<int>& tpScreen);
191 static bool InitializeLayoutGrip(CWnd* pWndParent);
192 static void HideLayoutGrip();
193 static void ViewNcHitTest(
const Base::TPoint<int>& tpScreen);
195 static bool IsInitialized();
197 static int64_t GetSNAPViewSerialNumber();
199 DeclareGetClassType();
202 static Foundation::CStencil* GetInternalStencilPtr();
205 static bool Initialize();
206 static bool Terminate();
208 static bool CreateFixedView();
209 static bool ShowOnlySelectedFixedViews();
211 static void SetInitialize(
bool bSet);
213 virtual void OnReceiveBroadcast(
const Base::CBroadcastMessage* pMessage)
override;
214 static CGUIManagerView* GetObject();
217 CInternalViewManager* m_pInternal;
218 Base::CFLImage* m_pFliCopySource;
219 Base::CFLImage m_fliIntrinsicCopySource;
220 int64_t m_i64FliCopySourcePageNum;
221 CGUIViewImage* m_pViewCopyFigureSource;
223 CGUIViewImage* m_pViewImageThumbnailDraggingSource;
224 Base::CFLImage* m_pFliThumbnailDraggingSource;
225 Base::CFLArray<int32_t> m_flaSelectedThumbnailIdx;
226 bool m_bThumbnailDraggingMode;
228 bool m_bUsedUIMultiThread;
229 std::map<CGUIViewImageBase*, CUIThread*>& m_mapThreads;
230 DWORD m_dwClipboardSequenceNumber;
232 volatile bool m_bInitialized;
234 CGUIWndGrip* m_pLayoutGripVert;
235 CGUIWndGrip* m_pLayoutGripHorz;
236 Base::TPoint<int> m_tpScreenPrev;
237 Base::TRect<int> m_trScreenVertRect;
238 Base::TRect<int> m_trScreenHorzRect;
239 int32_t m_i32MFOffsetX;
240 int32_t m_i32MFOffsetY;
242 bool m_bHorzRectVisible;
243 bool m_bVertRectVisible;
244 bool m_bLButtonDownOnNcHitView;
246 std::vector<CMultiDocTemplate*>& m_vctMultiDocTemplates;
247 std::map<std::string, CMultiDocTemplate*>& m_mapMultiDocTemplates;
248 std::map<CMultiDocTemplate*, std::string>& m_mapMultiDocTemplatesReverse;
250 std::vector<CGUIFixedViewDeclaration*>& m_vctFixedViewDeclaration;
251 std::vector<CGUIFixedViewPlacementSet*>& m_vctFixedViewPlacementSet;
253 std::vector<CDocument*>& m_vctDoc;
254 std::vector<CFrameWnd*>& m_vctFrame;
255 std::vector<CView*>& m_vctView;
257 std::vector <CGUIChildFrameBase*>& m_vctFrameToResize;
258 std::set <int32_t>& m_setI32FrameX;
259 std::set <int32_t>& m_setI32FrameY;
261 size_t m_stSelectedPlacementSet;
263 friend class CGUIManager;
265 friend class CInternalViewManager;
266 friend class CGUIDialogCreateStencil;
3D 뷰 클래스
Definition GUIView3D.h:118
3D 경로 편집기 클래스
Definition GUIView3DPathEditor.h:29
도면 뷰 클래스
Definition GUIViewDrawing.h:52
그래프 뷰 클래스
Definition GUIViewGraph.h:45
뷰의 기반 클래스
Definition GUIViewImageBase.h:43
이미지 뷰 클래스
Definition GUIViewImage.h:319
SNAP 뷰 클래스
Definition GUIViewSNAP.h:35
Definition D2DObject.h:12