FLImaging 6.11.25.2
GUIMainFrame.h
1
2// MainFrm.h: CGUIMainFrame 클래스의 인터페이스
3//
4
5#pragma once
6
7#include "Resource.h"
8#include "GUIDialog.h"
9#include "GUIPaneLog.h"
10#include "GUIPaneCode.h"
11#include "GUIPaneProperties.h"
12#include "GUIPaneExampleSNAP.h"
13#include "GUIPaneColorTable.h"
14#include "GUIPaneViewGraph.h"
15#include "GUIPaneSheet.h"
16#include "GUIMenuBar.h"
17#include "DefinitionsGUI.h"
18#include <map>
19
20namespace FLImaging
21{
22 namespace GUI
23 {
26 class CGUIManager;
27
28 class FL_EXPORT CGUIMainFrame : public CMDIFrameWndEx, public Base::CFLBase
29 {
30 DECLARE_DYNAMIC(CGUIMainFrame)
31
32 public:
33 CGUIMainFrame() noexcept;
34 CGUIMainFrame(const CGUIMainFrame& rh);
35
36 public:
37 virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
38 virtual BOOL LoadFrame(UINT nIDResource, DWORD dwDefaultStyle = WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, CWnd* pParentWnd = nullptr, CCreateContext* pContext = nullptr);
39
40 public:
41 virtual ~CGUIMainFrame();
42 #ifdef _DEBUG
43 virtual void AssertValid() const;
44 virtual void Dump(CDumpContext& dc) const;
45 #endif
46
47 public:
48 CGUIPaneProperties* GetLastPaneProperties();
49 bool SetLastPaneProperties(CGUIPaneProperties* pPane);
50
51 virtual Base::CFLString<wchar_t> GetTextInformationAbout() const;
52 virtual void SetTextInformationAbout(const Base::CFLString<wchar_t>& str);
53 virtual void InitializeTextInformationAbout();
54
55 const CResult AddPane(CGUIPaneBase* pPane);
56 const CResult DeletePane(CGUIPaneBase* pPane);
57
58 void SetAppTheme(UINT nAppTheme);
59 UINT GetAppTheme();
60
61 void SetViewBaseLastFocused(CGUIViewImageBase* pView);
62 CGUIViewImageBase* GetViewBaseLastFocused();
63
64 void SetMenuItemPropertyForActivateView(CGUIMenuItemProperty* pMIPActivateView);
65
66 void OnAppLook(UINT id);
67
68 bool IsSetRecalcLayout();
69 void SetRecalcLayout(bool bSet);
70 void RecalcPaneSize();
71 std::vector<CGUIPaneProperties*>* GetVectorPaneProperties();
72 std::vector<CGUIPaneBase*>* GetVectorPanes();
73
74 const CResult ClearScreenSegmentationMode();
75
76 virtual bool IsTerminateAppRequested() const;
77 virtual void RequestTerminateApp(bool bTerminate = true);
78
88 virtual bool IsCloseEnabled() const;
89
99 virtual void SetCloseEnabled(bool bEnable);
100
110 virtual bool IsResizable() const;
111
121 virtual void SetResizable(bool bResizable = true);
122
134 virtual void SetBackgroundImagePadding(int32_t i32PaddingX, int32_t i32PaddingY);
135
147 virtual void GetBackgroundImagePadding(int32_t& i32PaddingX, int32_t& i32PaddingY) const;
148
160 virtual void SetBackgroundImageIntervalSpacing(int32_t i32IntervalSpacingX, int32_t i32IntervalSpacingY);
161
173 virtual void GetBackgroundImageIntervalSpacing(int32_t& i32IntervalSpacingX, int32_t& i32IntervalSpacingY) const;
174
184 virtual void SetBackgroundColor(COLORREF clr);
185
195 virtual COLORREF GetBackgroundColor() const;
196
206 virtual void SetBackgroundImage(const wchar_t* pWcsImagePath);
207
219 virtual void SetBackgroundImageLayout(EBackgroundImageLayout eMode = EBackgroundImageLayout_Tile);
220
232 virtual EBackgroundImageLayout GetBackgroundImageLayout() const;
233
243 virtual void SetAppIcon(const wchar_t* pWcsIconPath);
244
254 virtual void SetMenuBarLogoImage(const wchar_t* pWcsMenuBarLogoImagePath);
255
267 CGUIMenuBar* GetMenuBar();
268
280 CGUIPaneMenu* GetPaneMenu();
281
293 CGUIPaneExampleSNAP* GetPaneExampleSNAP();
294
306 CGUIPaneLog* GetPaneLog();
307
319 CGUIPaneCode* GetPaneCode();
320
332 CGUIPaneColorTable* GetPaneColorTable();
333
345 CGUIPaneViewGraph* GetPaneViewGraph();
346
358 CGUIPaneSheet* GetPaneSheet();
359
371 CGUIViewGraph* GetGraphViewInPane();
372
373 bool SwitchTabs(bool bForwardDirection);
374
375 DeclareGetClassType();
376
377 protected: // 컨트롤 모음이 포함된 멤버입니다.
378 UINT m_nAppTheme;
379
380 CGUIMenuBar m_wndMenuBar;
381 CGUIPaneMenu m_wndPaneMenu;
382 CGUIPaneExampleSNAP m_wndPaneExampleSNAP;
383 CGUIPaneLog m_wndPaneLog;
384 CGUIPaneCode m_wndPaneCode;
385 CGUIPaneViewGraph m_wndPaneViewGraph;
386 CGUIPaneSheet m_wndPaneSheet;
387 CGUIPaneColorTable m_wndPaneColorTable;
388
389 CGUIViewImageBase* m_pViewBaseLastFocused;
390 CGUIPaneProperties* m_pLastPaneProperties;
391 CGUIMenuItemProperty* m_pMIPActivateView;
392
393 EScreenSegmentationMode m_eScreenSegmentationMode;
394 CRect m_rtSegmentationPrevWindow;
395 int32_t m_i32SegmentationPrevShowCmd;
396
397 std::vector<CGUIPaneBase*>& m_vctPPaneBase;
398 std::vector<CGUIPaneProperties*>& m_vctPPaneProperties;
399
400 /* Background */
401 CBitmap* m_pBmpBackground;
402 Base::TPoint<int32_t> m_tpBackgroundPicSize;
403 Base::TPoint<int32_t> m_tpBackgroundPadding;
404 Base::TPoint<int32_t> m_tpBackgroundIntervalSpacing;
405 COLORREF m_clrBackground;
406 EBackgroundImageLayout m_eBackgroundImageLayout;
407 Base::CFLString<wchar_t> m_strBackgroundImagePath;
408 bool m_bBackgroundImageDirty;
409 Base::CFLString<wchar_t> m_strAppIconPath;
410 bool m_bAppIconDirty;
411 HICON m_hIconBig;
412 HICON m_hIconSmall;
413 Base::CFLString<wchar_t> m_strMenuBarLogoImagePath;
414 bool m_bMenuBarLogoImageDirty;
415
416 protected:
417 virtual void InitializeBackgroundImageConfigurations();
418 virtual const CResult InternalLoadBackgroundImage();
419
420 virtual void OnReceiveBroadcast(const Base::CBroadcastMessage* pMessage) override;
421 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
422 afx_msg LRESULT OnAfxWmPressCloseButton(WPARAM wParam, LPARAM lParam);
423 void OnUpdateAppLook(CCmdUI* pCmdUI);
424
425 const CPoint GetMinWindowSize() const;
426
427 HMENU GetWindowMenuPopup(HMENU hMenuBar);
428 virtual void GetMessageString(UINT nID, Base::CFLString<wchar_t>& rMessage) const;
429
430 bool MoveInsideMonitor();
431
432 static int32_t GetResizingPosition(const CPoint& point, CWnd* pWnd, const float f32AddTolerance = 0.f);
433 static wchar_t* GetResizingMouseCursor(int32_t i32ResizingPosition);
434
435 const CResult RunPropertyShortKeyDown(UINT uiKey);
436 CDockingManager* GetDockingManagerPointer();
437
438 protected:
439 volatile bool m_bTerminateApp;
440 bool m_bEnableClose;
441 bool m_bRecalc;
442 bool m_bAppTitleDirty;
443 bool m_bAdjust;
444 bool m_bCloseMsgActivated;
445 mutable bool m_bResizable;
446
447 Foundation::CFLPoint<int32_t> m_pointPrev;
448 int32_t m_i32PaneWidth;
449 int32_t m_i32PaneHeight;
450 int32_t m_i32WidthLimit;
451 int32_t m_i32HeightLimit;
452
453 CRect m_rtResizingOrgWindow;
454 CRect m_rtMaximizedWindow;
455
456 Base::CFLString<wchar_t> m_strInformationAbout;
457 Base::EOperatingSystemType m_eOperatingSystemType;
458
459 friend class CGUIManagerView;
460 friend class CGUIManagerPane;
461 friend class CGUIManager;
462 friend class CGUIMenuBar;
463 friend class CGUIMainFrameTabCtrl;
464 friend class CGUIMenuItemProperty;
465
466 DECLARE_MESSAGE_MAP()
467 public:
468 afx_msg void OnFileNew();
469 afx_msg void OnUpdateFileNew(CCmdUI* pCmdUI);
470
471 afx_msg void OnFileOpen();
472 afx_msg void OnUpdateFileOpen(CCmdUI* pCmdUI);
473
474 afx_msg void OnCheckForUpdates();
475 afx_msg void OnUpdateCheckForUpdates(CCmdUI* pCmdUI);
476
477 afx_msg void OnInformationAbout();
478 afx_msg void OnUpdateInformationAbout(CCmdUI* pCmdUI);
479
480 afx_msg void OnInformationHelp();
481 afx_msg void OnInformationLicenseFeatures();
482
483 afx_msg void OnFindMenu();
484 afx_msg void OnUpdateSetFindMenu(CCmdUI* pCmdUI);
485
486 afx_msg void OnSetMenuFont();
487 afx_msg void OnUpdateSetMenuFont(CCmdUI* pCmdUI);
488
489 afx_msg void OnSetPropertyFont();
490 afx_msg void OnUpdateSetPropertyFont(CCmdUI* pCmdUI);
491
492 afx_msg void OnSetLogFont();
493 afx_msg void OnUpdateSetLogFont(CCmdUI* pCmdUI);
494
495 afx_msg void OnSetCodeFont();
496 afx_msg void OnUpdateSetCodeFont(CCmdUI* pCmdUI);
497
498 afx_msg void OnSetDefaultFont();
499 afx_msg void OnUpdateSetDefaultFont(CCmdUI* pCmdUI);
500
501 afx_msg void OnSetExampleSNAPFont();
502 afx_msg void OnUpdateSetExampleSNAPFont(CCmdUI* pCmdUI);
503
504 afx_msg void OnPaneMenu();
505 afx_msg void OnUpdatePaneMenu(CCmdUI* pCmdUI);
506
507 afx_msg void OnPaneExampleSNAP();
508 afx_msg void OnUpdatePaneExampleSNAP(CCmdUI* pCmdUI);
509
510 afx_msg void OnPaneLog();
511 afx_msg void OnUpdatePaneLog(CCmdUI* pCmdUI);
512
513 afx_msg void OnPaneCode();
514 afx_msg void OnUpdatePaneCode(CCmdUI* pCmdUI);
515
516 afx_msg void OnPaneColorTable();
517 afx_msg void OnUpdatePaneColorTable(CCmdUI* pCmdUI);
518
519 afx_msg void OnPaneViewGraph();
520 afx_msg void OnUpdatePaneViewGraph(CCmdUI* pCmdUI);
521
522 afx_msg void OnPaneSheet();
523 afx_msg void OnUpdatePaneSheet(CCmdUI* pCmdUI);
524
525 afx_msg void OnUpdateGenerateExampleCode(CCmdUI* pCmdUI);
526 afx_msg void OnGenerateExampleCode();
527
528 afx_msg void OnUpdateMenuUser(CCmdUI* pCmdUI);
529 afx_msg void OnMenuUser(UINT uID);
530
531 afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
532 void GetClientArea(CRect& rtArea);
533 BOOL OnEraseMDIClientBackground(CDC* pDC);
534 virtual BOOL OnCloseDockingPane(CDockablePane* pWnd);
535 virtual BOOL OnCloseMiniFrame(CPaneFrameWnd* pWnd);
536 virtual void AdjustDockingLayout(HDWP hdwp = NULL);
537 virtual void RecalcLayout(BOOL bNotify = TRUE);
538 afx_msg void OnClose();
539 afx_msg UINT OnPowerBroadcast(UINT nPowerEvent, LPARAM nEventData);
540 afx_msg void OnFileSave();
541 afx_msg void OnUpdateFileSave(CCmdUI* pCmdUI);
542 afx_msg void OnFileSaveAs();
543 afx_msg void OnUpdateFileClose(CCmdUI* pCmdUI);
544 afx_msg void OnAppExit();
545 afx_msg LRESULT OnThemeChanged();
546 afx_msg void OnSysColorChange();
547 afx_msg void OnGetMinMaxInfo(MINMAXINFO* lpMMI);
548 afx_msg LRESULT OnMessageRunOnMainThread(WPARAM wParam, LPARAM lParam);
549 afx_msg LRESULT OnMessageRunOnMainThreadPost(WPARAM wParam, LPARAM lParam);
550 afx_msg LRESULT OnMessageAppTitleChanged(WPARAM wParam, LPARAM lParam);
551 virtual BOOL PreTranslateMessage(MSG* pMsg);
552 afx_msg void OnTimer(UINT_PTR nIDEvent);
553 afx_msg void OnNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS* lpncsp);
554 afx_msg BOOL OnNcActivate(BOOL bActive);
555 afx_msg BOOL OnCopyData(CWnd* pWnd, COPYDATASTRUCT* pCopyDataStruct);
556 afx_msg BOOL OnEraseBkgnd(CDC* pDC);
557 afx_msg void OnNcPaint();
558 afx_msg void OnDestroy();
559};
560 }
561}
The menu item class associated with the property pane.
Definition GUIMenuItemProperty.h:48
A class of view base.
Definition GUIViewImageBase.h:43
Definition D2DObject.h:12
EBackgroundImageLayout
Enumeration for specifying how the background image is arranged.
Definition DefinitionsGUI.h:11673