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);
61 void SetViewBaseLastFocused(CGUIViewImageBase* pView);
62 CGUIViewImageBase* GetViewBaseLastFocused();
64 void SetMenuItemPropertyForActivateView(CGUIMenuItemProperty* pMIPActivateView);
66 void OnAppLook(UINT
id);
68 bool IsSetRecalcLayout();
69 void SetRecalcLayout(
bool bSet);
70 void RecalcPaneSize();
71 std::vector<CGUIPaneProperties*>* GetVectorPaneProperties();
72 std::vector<CGUIPaneBase*>* GetVectorPanes();
74 const CResult ClearScreenSegmentationMode();
76 virtual bool IsTerminateAppRequested()
const;
77 virtual void RequestTerminateApp(
bool bTerminate =
true);
88 virtual bool IsCloseEnabled()
const;
99 virtual void SetCloseEnabled(
bool bEnable);
110 virtual bool IsResizable()
const;
121 virtual void SetResizable(
bool bResizable =
true);
134 virtual void SetBackgroundImagePadding(int32_t i32PaddingX, int32_t i32PaddingY);
147 virtual void GetBackgroundImagePadding(int32_t& i32PaddingX, int32_t& i32PaddingY)
const;
160 virtual void SetBackgroundImageIntervalSpacing(int32_t i32IntervalSpacingX, int32_t i32IntervalSpacingY);
173 virtual void GetBackgroundImageIntervalSpacing(int32_t& i32IntervalSpacingX, int32_t& i32IntervalSpacingY)
const;
184 virtual void SetBackgroundColor(COLORREF clr);
195 virtual COLORREF GetBackgroundColor()
const;
206 virtual void SetBackgroundImage(
const wchar_t* pWcsImagePath);
219 virtual void SetBackgroundImageLayout(EBackgroundImageLayout eMode = EBackgroundImageLayout_Tile);
243 virtual void SetAppIcon(
const wchar_t* pWcsIconPath);
254 virtual void SetMenuBarLogoImage(
const wchar_t* pWcsMenuBarLogoImagePath);
267 CGUIMenuBar* GetMenuBar();
280 CGUIPaneMenu* GetPaneMenu();
293 CGUIPaneExampleSNAP* GetPaneExampleSNAP();
306 CGUIPaneLog* GetPaneLog();
319 CGUIPaneCode* GetPaneCode();
332 CGUIPaneColorTable* GetPaneColorTable();
345 CGUIPaneViewGraph* GetPaneViewGraph();
358 CGUIPaneSheet* GetPaneSheet();
371 CGUIViewGraph* GetGraphViewInPane();
373 bool SwitchTabs(
bool bForwardDirection);
375 DeclareGetClassType();
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;
389 CGUIViewImageBase* m_pViewBaseLastFocused;
390 CGUIPaneProperties* m_pLastPaneProperties;
391 CGUIMenuItemProperty* m_pMIPActivateView;
393 EScreenSegmentationMode m_eScreenSegmentationMode;
394 CRect m_rtSegmentationPrevWindow;
395 int32_t m_i32SegmentationPrevShowCmd;
397 std::vector<CGUIPaneBase*>& m_vctPPaneBase;
398 std::vector<CGUIPaneProperties*>& m_vctPPaneProperties;
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;
407 Base::CFLString<wchar_t> m_strBackgroundImagePath;
408 bool m_bBackgroundImageDirty;
409 Base::CFLString<wchar_t> m_strAppIconPath;
410 bool m_bAppIconDirty;
413 Base::CFLString<wchar_t> m_strMenuBarLogoImagePath;
414 bool m_bMenuBarLogoImageDirty;
417 virtual void InitializeBackgroundImageConfigurations();
418 virtual const CResult InternalLoadBackgroundImage();
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);
425 const CPoint GetMinWindowSize()
const;
427 HMENU GetWindowMenuPopup(HMENU hMenuBar);
428 virtual void GetMessageString(UINT nID, Base::CFLString<wchar_t>& rMessage)
const;
430 bool MoveInsideMonitor();
432 static int32_t GetResizingPosition(
const CPoint& point, CWnd* pWnd,
const float f32AddTolerance = 0.f);
433 static wchar_t* GetResizingMouseCursor(int32_t i32ResizingPosition);
435 const CResult RunPropertyShortKeyDown(UINT uiKey);
436 CDockingManager* GetDockingManagerPointer();
439 volatile bool m_bTerminateApp;
442 bool m_bAppTitleDirty;
444 bool m_bCloseMsgActivated;
445 mutable bool m_bResizable;
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;
453 CRect m_rtResizingOrgWindow;
454 CRect m_rtMaximizedWindow;
456 Base::CFLString<wchar_t> m_strInformationAbout;
457 Base::EOperatingSystemType m_eOperatingSystemType;
459 friend class CGUIManagerView;
460 friend class CGUIManagerPane;
461 friend class CGUIManager;
462 friend class CGUIMenuBar;
463 friend class CGUIMainFrameTabCtrl;
464 friend class CGUIMenuItemProperty;
466 DECLARE_MESSAGE_MAP()
468 afx_msg
void OnFileNew();
469 afx_msg
void OnUpdateFileNew(CCmdUI* pCmdUI);
471 afx_msg
void OnFileOpen();
472 afx_msg
void OnUpdateFileOpen(CCmdUI* pCmdUI);
474 afx_msg
void OnCheckForUpdates();
475 afx_msg
void OnUpdateCheckForUpdates(CCmdUI* pCmdUI);
477 afx_msg
void OnInformationAbout();
478 afx_msg
void OnUpdateInformationAbout(CCmdUI* pCmdUI);
480 afx_msg
void OnInformationHelp();
481 afx_msg
void OnInformationLicenseFeatures();
483 afx_msg
void OnFindMenu();
484 afx_msg
void OnUpdateSetFindMenu(CCmdUI* pCmdUI);
486 afx_msg
void OnSetMenuFont();
487 afx_msg
void OnUpdateSetMenuFont(CCmdUI* pCmdUI);
489 afx_msg
void OnSetPropertyFont();
490 afx_msg
void OnUpdateSetPropertyFont(CCmdUI* pCmdUI);
492 afx_msg
void OnSetLogFont();
493 afx_msg
void OnUpdateSetLogFont(CCmdUI* pCmdUI);
495 afx_msg
void OnSetCodeFont();
496 afx_msg
void OnUpdateSetCodeFont(CCmdUI* pCmdUI);
498 afx_msg
void OnSetDefaultFont();
499 afx_msg
void OnUpdateSetDefaultFont(CCmdUI* pCmdUI);
501 afx_msg
void OnSetExampleSNAPFont();
502 afx_msg
void OnUpdateSetExampleSNAPFont(CCmdUI* pCmdUI);
504 afx_msg
void OnPaneMenu();
505 afx_msg
void OnUpdatePaneMenu(CCmdUI* pCmdUI);
507 afx_msg
void OnPaneExampleSNAP();
508 afx_msg
void OnUpdatePaneExampleSNAP(CCmdUI* pCmdUI);
510 afx_msg
void OnPaneLog();
511 afx_msg
void OnUpdatePaneLog(CCmdUI* pCmdUI);
513 afx_msg
void OnPaneCode();
514 afx_msg
void OnUpdatePaneCode(CCmdUI* pCmdUI);
516 afx_msg
void OnPaneColorTable();
517 afx_msg
void OnUpdatePaneColorTable(CCmdUI* pCmdUI);
519 afx_msg
void OnPaneViewGraph();
520 afx_msg
void OnUpdatePaneViewGraph(CCmdUI* pCmdUI);
522 afx_msg
void OnPaneSheet();
523 afx_msg
void OnUpdatePaneSheet(CCmdUI* pCmdUI);
525 afx_msg
void OnUpdateGenerateExampleCode(CCmdUI* pCmdUI);
526 afx_msg
void OnGenerateExampleCode();
528 afx_msg
void OnUpdateMenuUser(CCmdUI* pCmdUI);
529 afx_msg
void OnMenuUser(UINT uID);
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();
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