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);
46 virtual
bool IsResizable() const;
57 virtual
void SetResizable(
bool bResizable = true);
70 virtual
void SetBackgroundImagePadding(int32_t i32PaddingX, int32_t i32PaddingY);
83 virtual
void GetBackgroundImagePadding(int32_t& i32PaddingX, int32_t& i32PaddingY) const;
96 virtual
void SetBackgroundImageIntervalSpacing(int32_t i32IntervalSpacingX, int32_t i32IntervalSpacingY);
109 virtual
void GetBackgroundImageIntervalSpacing(int32_t& i32IntervalSpacingX, int32_t& i32IntervalSpacingY) const;
120 virtual
void SetBackgroundColor(COLORREF clr);
131 virtual COLORREF GetBackgroundColor() const;
142 virtual
void SetBackgroundImage(const
wchar_t* pWcsImagePath);
155 virtual
void SetBackgroundImageLayout(EBackgroundImageLayout eMode = EBackgroundImageLayout_Tile);
168 virtual EBackgroundImageLayout GetBackgroundImageLayout() const;
179 virtual
void SetAppIcon(const
wchar_t* pWcsIconPath);
190 virtual
void SetMenuBarLogoImage(const
wchar_t* pWcsMenuBarLogoImagePath);
205 void EnableMenuBarButtons(
bool bMinimize = true,
bool bMaximize = true,
bool bClose = true);
216 void EnableMinimizeButton(
bool bEnable = true);
227 void EnableMaximizeButton(
bool bEnable = true);
238 void EnableCloseButton(
bool bEnable = true);
251 bool IsMinimizeButtonEnabled() const;
264 bool IsMaximizeButtonEnabled() const;
277 bool IsCloseButtonEnabled() const;
290 CGUIMenuBar* GetMenuBar();
303 CGUIPaneMenu* GetPaneMenu();
316 CGUIPaneExampleSNAP* GetPaneExampleSNAP();
329 CGUIPaneLog* GetPaneLog();
342 CGUIPaneCode* GetPaneCode();
355 CGUIPaneColorTable* GetPaneColorTable();
368 CGUIPaneViewGraph* GetPaneViewGraph();
381 CGUIPaneSheet* GetPaneSheet();
394 CGUIViewGraph* GetGraphViewInPane();
407 static const CResult EnableExitConfirmation(
bool bEnable = true);
418 static
bool IsExitConfirmationEnabled();
421 virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
422 virtual BOOL LoadFrame(UINT nIDResource, DWORD dwDefaultStyle = WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, CWnd* pParentWnd =
nullptr, CCreateContext* pContext =
nullptr);
425 CGUIPaneProperties* GetLastPaneProperties();
426 bool SetLastPaneProperties(CGUIPaneProperties* pPane);
428 virtual Base::CFLString<
wchar_t> GetTextInformationAbout() const;
429 virtual
void SetTextInformationAbout(const Base::CFLString<
wchar_t>& str);
430 virtual
void InitializeTextInformationAbout();
432 const CResult AddPane(CGUIPaneBase* pPane);
433 const CResult DeletePane(CGUIPaneBase* pPane);
435 void SetAppTheme(UINT nAppTheme);
437 void OnAppLook(UINT
id);
439 void SetViewBaseLastFocused(CGUIViewImageBase* pView);
440 CGUIViewImageBase* GetViewBaseLastFocused();
442 void SetMenuItemPropertyForActivateView(CGUIMenuItemProperty* pMIPActivateView);
444 bool IsSetRecalcLayout();
445 void SetRecalcLayout(
bool bSet);
446 void RecalcPaneSize();
447 std::vector<CGUIPaneProperties*>* GetVectorPaneProperties();
448 std::vector<CGUIPaneBase*>* GetVectorPanes();
450 const CResult ClearScreenSegmentationMode();
452 virtual
bool IsTerminateAppRequested() const;
453 virtual
void RequestTerminateApp(
bool bTerminate = true);
455 bool SwitchTabs(
bool bForwardDirection);
458 virtual ~CGUIMainFrame();
460 virtual void AssertValid()
const;
461 virtual void Dump(CDumpContext& dc)
const;
464 DeclareGetClassType();
469 CGUIMenuBar m_wndMenuBar;
470 CGUIPaneMenu m_wndPaneMenu;
471 CGUIPaneExampleSNAP m_wndPaneExampleSNAP;
472 CGUIPaneLog m_wndPaneLog;
473 CGUIPaneCode m_wndPaneCode;
474 CGUIPaneViewGraph m_wndPaneViewGraph;
475 CGUIPaneSheet m_wndPaneSheet;
476 CGUIPaneColorTable m_wndPaneColorTable;
478 CGUIViewImageBase* m_pViewBaseLastFocused;
479 CGUIPaneProperties* m_pLastPaneProperties;
480 CGUIMenuItemProperty* m_pMIPActivateView;
482 EScreenSegmentationMode m_eScreenSegmentationMode;
483 CRect m_rtSegmentationPrevWindow;
484 int32_t m_i32SegmentationPrevShowCmd;
486 std::vector<CGUIPaneBase*>& m_vctPPaneBase;
487 std::vector<CGUIPaneProperties*>& m_vctPPaneProperties;
490 CBitmap* m_pBmpBackground;
491 Base::TPoint<int32_t> m_tpBackgroundPicSize;
492 Base::TPoint<int32_t> m_tpBackgroundPadding;
493 Base::TPoint<int32_t> m_tpBackgroundIntervalSpacing;
494 COLORREF m_clrBackground;
496 Base::CFLString<wchar_t> m_strBackgroundImagePath;
497 bool m_bBackgroundImageDirty;
498 Base::CFLString<wchar_t> m_strAppIconPath;
499 bool m_bAppIconDirty;
502 Base::CFLString<wchar_t> m_strMenuBarLogoImagePath;
503 bool m_bMenuBarLogoImageDirty;
505 static bool g_bExitConfirmation;
508 virtual bool IsCloseEnabled()
const;
509 virtual void SetCloseEnabled(
bool bEnable);
511 virtual void InitializeBackgroundImageConfigurations();
512 virtual const CResult InternalLoadBackgroundImage();
514 virtual void OnReceiveBroadcast(
const Base::CBroadcastMessage* pMessage)
override;
515 afx_msg
int OnCreate(LPCREATESTRUCT lpCreateStruct);
516 afx_msg LRESULT OnAfxWmPressCloseButton(WPARAM wParam, LPARAM lParam);
517 void OnUpdateAppLook(CCmdUI* pCmdUI);
519 const CPoint GetMinWindowSize()
const;
521 HMENU GetWindowMenuPopup(HMENU hMenuBar);
522 virtual void GetMessageString(UINT nID, Base::CFLString<wchar_t>& rMessage)
const;
524 bool MoveInsideMonitor();
526 static int32_t GetResizingPosition(
const CPoint& point, CWnd* pWnd,
float f32AddTolerance = 0.f);
527 static wchar_t* GetResizingMouseCursor(int32_t i32ResizingPosition);
529 const CResult RunPropertyShortKeyDown(UINT uiKey);
530 CDockingManager* GetDockingManagerPointer();
533 volatile bool m_bTerminateApp;
536 bool m_bAppTitleDirty;
538 bool m_bCloseMsgActivated;
539 mutable bool m_bResizable;
541 Foundation::CFLPoint<int32_t> m_pointPrev;
542 int32_t m_i32PaneWidth;
543 int32_t m_i32PaneHeight;
544 int32_t m_i32WidthLimit;
545 int32_t m_i32HeightLimit;
547 CRect m_rtResizingOrgWindow;
548 CRect m_rtMaximizedWindow;
550 Base::CFLString<wchar_t> m_strInformationAbout;
551 Base::EOperatingSystemType m_eOperatingSystemType;
553 friend class CGUIManagerView;
554 friend class CGUIManagerPane;
555 friend class CGUIManager;
556 friend class CGUIMenuBar;
557 friend class CGUIMainFrameTabCtrl;
558 friend class CGUIMenuItemProperty;
559 friend class CGUIViewImageLoaderImageBase;
560 friend class CGUIViewImageLoaderImageRaw;
561 friend class CGUIViewImageSaverImage;
562 friend class CGUIView3DLoaderBase;
564 DECLARE_MESSAGE_MAP()
566 afx_msg
void OnFileNew();
567 afx_msg
void OnUpdateFileNew(CCmdUI* pCmdUI);
569 afx_msg
void OnFileOpen();
570 afx_msg
void OnUpdateFileOpen(CCmdUI* pCmdUI);
572 afx_msg
void OnCheckForUpdates();
573 afx_msg
void OnUpdateCheckForUpdates(CCmdUI* pCmdUI);
575 afx_msg
void OnInformationAbout();
576 afx_msg
void OnUpdateInformationAbout(CCmdUI* pCmdUI);
578 afx_msg
void OnInformationHelp();
579 afx_msg
void OnInformationLicenseFeatures();
581 afx_msg
void OnFindMenu();
582 afx_msg
void OnUpdateSetFindMenu(CCmdUI* pCmdUI);
584 afx_msg
void OnSetMenuFont();
585 afx_msg
void OnUpdateSetMenuFont(CCmdUI* pCmdUI);
587 afx_msg
void OnSetPropertyFont();
588 afx_msg
void OnUpdateSetPropertyFont(CCmdUI* pCmdUI);
590 afx_msg
void OnSetLogFont();
591 afx_msg
void OnUpdateSetLogFont(CCmdUI* pCmdUI);
593 afx_msg
void OnSetCodeFont();
594 afx_msg
void OnUpdateSetCodeFont(CCmdUI* pCmdUI);
596 afx_msg
void OnSetDefaultFont();
597 afx_msg
void OnUpdateSetDefaultFont(CCmdUI* pCmdUI);
599 afx_msg
void OnSetExampleSNAPFont();
600 afx_msg
void OnUpdateSetExampleSNAPFont(CCmdUI* pCmdUI);
602 afx_msg
void OnPaneMenu();
603 afx_msg
void OnUpdatePaneMenu(CCmdUI* pCmdUI);
605 afx_msg
void OnPaneExampleSNAP();
606 afx_msg
void OnUpdatePaneExampleSNAP(CCmdUI* pCmdUI);
608 afx_msg
void OnPaneLog();
609 afx_msg
void OnUpdatePaneLog(CCmdUI* pCmdUI);
611 afx_msg
void OnPaneCode();
612 afx_msg
void OnUpdatePaneCode(CCmdUI* pCmdUI);
614 afx_msg
void OnPaneColorTable();
615 afx_msg
void OnUpdatePaneColorTable(CCmdUI* pCmdUI);
617 afx_msg
void OnPaneViewGraph();
618 afx_msg
void OnUpdatePaneViewGraph(CCmdUI* pCmdUI);
620 afx_msg
void OnPaneSheet();
621 afx_msg
void OnUpdatePaneSheet(CCmdUI* pCmdUI);
623 afx_msg
void OnUpdateGenerateExampleCode(CCmdUI* pCmdUI);
624 afx_msg
void OnGenerateExampleCode();
626 afx_msg
void OnUpdateMenuUser(CCmdUI* pCmdUI);
627 afx_msg
void OnMenuUser(UINT uID);
629 afx_msg
void OnUpdateSetTheme(CCmdUI* pCmdUI);
630 afx_msg
void OnSetTheme(UINT uID);
632 afx_msg
void OnSysCommand(UINT nID, LPARAM lParam);
633 void GetClientArea(CRect& rtArea);
634 BOOL OnEraseMDIClientBackground(CDC* pDC);
635 virtual BOOL OnCloseDockingPane(CDockablePane* pWnd);
636 virtual BOOL OnCloseMiniFrame(CPaneFrameWnd* pWnd);
637 virtual
void AdjustDockingLayout(HDWP hdwp = NULL);
638 virtual
void RecalcLayout(BOOL bNotify = TRUE);
639 afx_msg
void OnClose();
640 afx_msg UINT OnPowerBroadcast(UINT nPowerEvent, LPARAM nEventData);
641 afx_msg
void OnFileSave();
642 afx_msg
void OnUpdateFileSave(CCmdUI* pCmdUI);
643 afx_msg
void OnFileSaveAs();
644 afx_msg
void OnUpdateFileClose(CCmdUI* pCmdUI);
645 afx_msg
void OnAppExit();
646 afx_msg
void OnUpdateAppExit(CCmdUI* pCmdUI);
647 afx_msg LRESULT OnThemeChanged();
648 afx_msg
void OnSysColorChange();
649 afx_msg
void OnGetMinMaxInfo(MINMAXINFO* lpMMI);
650 afx_msg LRESULT OnMessageRunOnMainThread(WPARAM wParam, LPARAM lParam);
651 afx_msg LRESULT OnMessageRunOnMainThreadPost(WPARAM wParam, LPARAM lParam);
652 afx_msg LRESULT OnMessageAppTitleChanged(WPARAM wParam, LPARAM lParam);
653 virtual BOOL PreTranslateMessage(MSG* pMsg);
654 afx_msg
void OnTimer(UINT_PTR nIDEvent);
655 afx_msg
void OnNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS* lpncsp);
656 afx_msg BOOL OnNcActivate(BOOL bActive);
657 afx_msg BOOL OnCopyData(CWnd* pWnd, COPYDATASTRUCT* pCopyDataStruct);
658 afx_msg BOOL OnEraseBkgnd(CDC* pDC);
659 afx_msg
void OnNcPaint();
660 afx_msg
void OnDestroy();
661 virtual BOOL OnSetMenu(HMENU hmenu) override;
A class of view base.
Definition GUIViewImageBase.h:44
Definition D2DObject.h:12
EBackgroundImageLayout
Enumeration for specifying how the background image is arranged.
Definition DefinitionsGUI.h:12723