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"
28 class FL_EXPORT CGUIMainFrame :
public CMDIFrameWndEx,
public Base::CFLBase
30 DECLARE_DYNAMIC(CGUIMainFrame)
33 CGUIMainFrame() noexcept;
34 CGUIMainFrame(const CGUIMainFrame& rh);
37 virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
38 virtual BOOL LoadFrame(UINT nIDResource, DWORD dwDefaultStyle = WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, CWnd* pParentWnd =
nullptr, CCreateContext* pContext =
nullptr);
41 virtual ~CGUIMainFrame();
43 virtual void AssertValid()
const;
44 virtual void Dump(CDumpContext& dc)
const;
48 CGUIPaneProperties* GetLastPaneProperties();
49 bool SetLastPaneProperties(CGUIPaneProperties* pPane);
51 virtual Base::CFLString<wchar_t> GetTextInformationAbout()
const;
52 virtual void SetTextInformationAbout(
const Base::CFLString<wchar_t>& str);
53 virtual void InitializeTextInformationAbout();
55 const CResult AddPane(CGUIPaneBase* pPane);
56 const CResult DeletePane(CGUIPaneBase* pPane);
58 void SetAppTheme(UINT nAppTheme);
60 void OnAppLook(UINT
id);
62 void SetViewBaseLastFocused(CGUIViewImageBase* pView);
63 CGUIViewImageBase* GetViewBaseLastFocused();
65 void SetMenuItemPropertyForActivateView(CGUIMenuItemProperty* pMIPActivateView);
67 bool IsSetRecalcLayout();
68 void SetRecalcLayout(
bool bSet);
69 void RecalcPaneSize();
70 std::vector<CGUIPaneProperties*>* GetVectorPaneProperties();
71 std::vector<CGUIPaneBase*>* GetVectorPanes();
73 const CResult ClearScreenSegmentationMode();
75 virtual bool IsTerminateAppRequested()
const;
76 virtual void RequestTerminateApp(
bool bTerminate =
true);
87 virtual bool IsCloseEnabled()
const;
98 virtual void SetCloseEnabled(
bool bEnable);
109 virtual bool IsResizable()
const;
120 virtual void SetResizable(
bool bResizable =
true);
133 virtual void SetBackgroundImagePadding(int32_t i32PaddingX, int32_t i32PaddingY);
146 virtual void GetBackgroundImagePadding(int32_t& i32PaddingX, int32_t& i32PaddingY)
const;
159 virtual void SetBackgroundImageIntervalSpacing(int32_t i32IntervalSpacingX, int32_t i32IntervalSpacingY);
172 virtual void GetBackgroundImageIntervalSpacing(int32_t& i32IntervalSpacingX, int32_t& i32IntervalSpacingY)
const;
183 virtual void SetBackgroundColor(COLORREF clr);
194 virtual COLORREF GetBackgroundColor()
const;
205 virtual void SetBackgroundImage(
const wchar_t* pWcsImagePath);
218 virtual void SetBackgroundImageLayout(EBackgroundImageLayout eMode = EBackgroundImageLayout_Tile);
242 virtual void SetAppIcon(
const wchar_t* pWcsIconPath);
253 virtual void SetMenuBarLogoImage(
const wchar_t* pWcsMenuBarLogoImagePath);
266 CGUIMenuBar* GetMenuBar();
279 CGUIPaneMenu* GetPaneMenu();
292 CGUIPaneExampleSNAP* GetPaneExampleSNAP();
305 CGUIPaneLog* GetPaneLog();
318 CGUIPaneCode* GetPaneCode();
331 CGUIPaneColorTable* GetPaneColorTable();
344 CGUIPaneViewGraph* GetPaneViewGraph();
357 CGUIPaneSheet* GetPaneSheet();
370 CGUIViewGraph* GetGraphViewInPane();
372 bool SwitchTabs(
bool bForwardDirection);
374 DeclareGetClassType();
379 CGUIMenuBar m_wndMenuBar;
380 CGUIPaneMenu m_wndPaneMenu;
381 CGUIPaneExampleSNAP m_wndPaneExampleSNAP;
382 CGUIPaneLog m_wndPaneLog;
383 CGUIPaneCode m_wndPaneCode;
384 CGUIPaneViewGraph m_wndPaneViewGraph;
385 CGUIPaneSheet m_wndPaneSheet;
386 CGUIPaneColorTable m_wndPaneColorTable;
388 CGUIViewImageBase* m_pViewBaseLastFocused;
389 CGUIPaneProperties* m_pLastPaneProperties;
390 CGUIMenuItemProperty* m_pMIPActivateView;
392 EScreenSegmentationMode m_eScreenSegmentationMode;
393 CRect m_rtSegmentationPrevWindow;
394 int32_t m_i32SegmentationPrevShowCmd;
396 std::vector<CGUIPaneBase*>& m_vctPPaneBase;
397 std::vector<CGUIPaneProperties*>& m_vctPPaneProperties;
400 CBitmap* m_pBmpBackground;
401 Base::TPoint<int32_t> m_tpBackgroundPicSize;
402 Base::TPoint<int32_t> m_tpBackgroundPadding;
403 Base::TPoint<int32_t> m_tpBackgroundIntervalSpacing;
404 COLORREF m_clrBackground;
406 Base::CFLString<wchar_t> m_strBackgroundImagePath;
407 bool m_bBackgroundImageDirty;
408 Base::CFLString<wchar_t> m_strAppIconPath;
409 bool m_bAppIconDirty;
412 Base::CFLString<wchar_t> m_strMenuBarLogoImagePath;
413 bool m_bMenuBarLogoImageDirty;
416 virtual void InitializeBackgroundImageConfigurations();
417 virtual const CResult InternalLoadBackgroundImage();
419 virtual void OnReceiveBroadcast(
const Base::CBroadcastMessage* pMessage)
override;
420 afx_msg
int OnCreate(LPCREATESTRUCT lpCreateStruct);
421 afx_msg LRESULT OnAfxWmPressCloseButton(WPARAM wParam, LPARAM lParam);
422 void OnUpdateAppLook(CCmdUI* pCmdUI);
424 const CPoint GetMinWindowSize()
const;
426 HMENU GetWindowMenuPopup(HMENU hMenuBar);
427 virtual void GetMessageString(UINT nID, Base::CFLString<wchar_t>& rMessage)
const;
429 bool MoveInsideMonitor();
431 static int32_t GetResizingPosition(
const CPoint& point, CWnd* pWnd,
float f32AddTolerance = 0.f);
432 static wchar_t* GetResizingMouseCursor(int32_t i32ResizingPosition);
434 const CResult RunPropertyShortKeyDown(UINT uiKey);
435 CDockingManager* GetDockingManagerPointer();
438 volatile bool m_bTerminateApp;
441 bool m_bAppTitleDirty;
443 bool m_bCloseMsgActivated;
444 mutable bool m_bResizable;
446 Foundation::CFLPoint<int32_t> m_pointPrev;
447 int32_t m_i32PaneWidth;
448 int32_t m_i32PaneHeight;
449 int32_t m_i32WidthLimit;
450 int32_t m_i32HeightLimit;
452 CRect m_rtResizingOrgWindow;
453 CRect m_rtMaximizedWindow;
455 Base::CFLString<wchar_t> m_strInformationAbout;
456 Base::EOperatingSystemType m_eOperatingSystemType;
458 friend class CGUIManagerView;
459 friend class CGUIManagerPane;
460 friend class CGUIManager;
461 friend class CGUIMenuBar;
462 friend class CGUIMainFrameTabCtrl;
463 friend class CGUIMenuItemProperty;
465 DECLARE_MESSAGE_MAP()
467 afx_msg
void OnFileNew();
468 afx_msg
void OnUpdateFileNew(CCmdUI* pCmdUI);
470 afx_msg
void OnFileOpen();
471 afx_msg
void OnUpdateFileOpen(CCmdUI* pCmdUI);
473 afx_msg
void OnCheckForUpdates();
474 afx_msg
void OnUpdateCheckForUpdates(CCmdUI* pCmdUI);
476 afx_msg
void OnInformationAbout();
477 afx_msg
void OnUpdateInformationAbout(CCmdUI* pCmdUI);
479 afx_msg
void OnInformationHelp();
480 afx_msg
void OnInformationLicenseFeatures();
482 afx_msg
void OnFindMenu();
483 afx_msg
void OnUpdateSetFindMenu(CCmdUI* pCmdUI);
485 afx_msg
void OnSetMenuFont();
486 afx_msg
void OnUpdateSetMenuFont(CCmdUI* pCmdUI);
488 afx_msg
void OnSetPropertyFont();
489 afx_msg
void OnUpdateSetPropertyFont(CCmdUI* pCmdUI);
491 afx_msg
void OnSetLogFont();
492 afx_msg
void OnUpdateSetLogFont(CCmdUI* pCmdUI);
494 afx_msg
void OnSetCodeFont();
495 afx_msg
void OnUpdateSetCodeFont(CCmdUI* pCmdUI);
497 afx_msg
void OnSetDefaultFont();
498 afx_msg
void OnUpdateSetDefaultFont(CCmdUI* pCmdUI);
500 afx_msg
void OnSetExampleSNAPFont();
501 afx_msg
void OnUpdateSetExampleSNAPFont(CCmdUI* pCmdUI);
503 afx_msg
void OnPaneMenu();
504 afx_msg
void OnUpdatePaneMenu(CCmdUI* pCmdUI);
506 afx_msg
void OnPaneExampleSNAP();
507 afx_msg
void OnUpdatePaneExampleSNAP(CCmdUI* pCmdUI);
509 afx_msg
void OnPaneLog();
510 afx_msg
void OnUpdatePaneLog(CCmdUI* pCmdUI);
512 afx_msg
void OnPaneCode();
513 afx_msg
void OnUpdatePaneCode(CCmdUI* pCmdUI);
515 afx_msg
void OnPaneColorTable();
516 afx_msg
void OnUpdatePaneColorTable(CCmdUI* pCmdUI);
518 afx_msg
void OnPaneViewGraph();
519 afx_msg
void OnUpdatePaneViewGraph(CCmdUI* pCmdUI);
521 afx_msg
void OnPaneSheet();
522 afx_msg
void OnUpdatePaneSheet(CCmdUI* pCmdUI);
524 afx_msg
void OnUpdateGenerateExampleCode(CCmdUI* pCmdUI);
525 afx_msg
void OnGenerateExampleCode();
527 afx_msg
void OnUpdateMenuUser(CCmdUI* pCmdUI);
528 afx_msg
void OnMenuUser(UINT uID);
530 afx_msg
void OnSysCommand(UINT nID, LPARAM lParam);
531 void GetClientArea(CRect& rtArea);
532 BOOL OnEraseMDIClientBackground(CDC* pDC);
533 virtual BOOL OnCloseDockingPane(CDockablePane* pWnd);
534 virtual BOOL OnCloseMiniFrame(CPaneFrameWnd* pWnd);
535 virtual
void AdjustDockingLayout(HDWP hdwp = NULL);
536 virtual
void RecalcLayout(BOOL bNotify = TRUE);
537 afx_msg
void OnClose();
538 afx_msg UINT OnPowerBroadcast(UINT nPowerEvent, LPARAM nEventData);
539 afx_msg
void OnFileSave();
540 afx_msg
void OnUpdateFileSave(CCmdUI* pCmdUI);
541 afx_msg
void OnFileSaveAs();
542 afx_msg
void OnUpdateFileClose(CCmdUI* pCmdUI);
543 afx_msg
void OnAppExit();
544 afx_msg LRESULT OnThemeChanged();
545 afx_msg
void OnSysColorChange();
546 afx_msg
void OnGetMinMaxInfo(MINMAXINFO* lpMMI);
547 afx_msg LRESULT OnMessageRunOnMainThread(WPARAM wParam, LPARAM lParam);
548 afx_msg LRESULT OnMessageRunOnMainThreadPost(WPARAM wParam, LPARAM lParam);
549 afx_msg LRESULT OnMessageAppTitleChanged(WPARAM wParam, LPARAM lParam);
550 virtual BOOL PreTranslateMessage(MSG* pMsg);
551 afx_msg
void OnTimer(UINT_PTR nIDEvent);
552 afx_msg
void OnNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS* lpncsp);
553 afx_msg BOOL OnNcActivate(BOOL bActive);
554 afx_msg BOOL OnCopyData(CWnd* pWnd, COPYDATASTRUCT* pCopyDataStruct);
555 afx_msg BOOL OnEraseBkgnd(CDC* pDC);
556 afx_msg
void OnNcPaint();
557 afx_msg
void OnDestroy();
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:11946