FLImaging 7.8.25.3
GUIManagerPane.h
1#pragma once
2
10
11#include "DefinitionsGUI.h"
12#include <list>
13#include <set>
14
16namespace FLImaging
17{
19 namespace GUI
20 {
21 class CGUIPaneMenu;
22 class CGUIPaneLog;
23 class CGUIPaneSystemInformation;
24 class CGUIPaneCode;
25 class CGUIPaneExampleSNAP;
26 class CGUIPaneViewGraph;
27 class CGUIPaneColorTable;
28 class CGUIPaneSheet;
29 class CGUIPaneBase;
30 class CGUIPaneProperties;
31 class CGUIMainFrame;
32 class CGUIMenuItemBase;
33 class CGUITabbedPane;
34 class CGUIPaneFrameWnd;
36
45 class FL_EXPORT CGUIManagerPane : public Base::CFLBase
46 {
47 CGUIManagerPane();
48 CGUIManagerPane(const CGUIManagerPane& rh);
49 public:
50 enum EQAMode
51 {
52 EQAMode_None = 0x00,
53
54 EQAMode_LastFocusedPane = 0x01,
55 EQAMode_Serialize = 0x02,
56
57 EQAMode_All = 0xff,
58 };
59
60 public:
61 typedef struct sStateDataAutoHideBar
62 {
63 sStateDataAutoHideBar();
64
66 DWORD dwCurrentAlignment;
67 bool bVisible;
68 CRect rcRectBar;
69 bool bFirstInGroup;
70 bool bLastInGroup;
71 bool bActiveInGroup;
72 int32_t i32Order;
73 }SStateDataAutoHideBar;
74
75 typedef struct sStateDataPaneContainer
76 {
77 sStateDataPaneContainer();
78 virtual ~sStateDataPaneContainer();
79
80 int32_t i32Level;
81 CRect rtPaneDivider;
82 CRect rtPaneContainer;
83 CRect rtLeft;
84 CRect rtRight;
85
86 bool bLeftPaneIsVisible;
87 bool bRightPaneIsVisible;
88
89 sStateDataPaneContainer* pLeftContainer;
90 sStateDataPaneContainer* pRightContainer;
91 CDockablePane* pLeftPane;
92 CDockablePane* pRightPane;
93
94 EDockPosition dockPosLeft;
95 EDockPosition dockPosRight;
96
97 }SStateDataPaneContainer;
98
99 typedef struct sStateDataPaneContainerManager
100 {
101 sStateDataPaneContainerManager();
102 virtual ~sStateDataPaneContainerManager();
103
104 int32_t i32ID;
105 int32_t i32Step;
106 int32_t i32Width;
107 int32_t i32MaxOffset;
108 int32_t i32MinOffset;
109 int32_t i32ControlBarCount;
110
111 bool bDefaultDivider;
112 DWORD dwDividerStyle;
113
114 SStateDataPaneContainer* pRootContainer;
115 EDockPosition dockPosRootContainer; // parent 에 대한 docking position
116 }SStateDataPaneContainerManager;
117
118 public:
119 virtual ~CGUIManagerPane();
120
121 public:
122 static const CResult Initialize();
123
139 static CGUIPaneBase* GetPane(EPaneType ePaneType);
140
152 static CGUIPaneMenu* GetPaneMenu();
153
167 static const CResult ShowPaneMenu(bool bShow);
168
181
195 static const CResult ShowPaneLog(bool bShow);
196
208 static CGUIPaneSystemInformation* GetPaneSystemInformation();
209
223 static const CResult ShowPaneSystemInformation(bool bShow);
224
236 static CGUIPaneCode* GetPaneCode();
237
251 static const CResult ShowPaneCode(bool bShow);
252
264 static CGUIPaneExampleSNAP* GetPaneExampleSNAP();
265
279 static const CResult ShowPaneExampleSNAP(bool bShow);
280
293 static CGUIPaneViewGraph* GetPaneViewGraph(int32_t i32Index = 0);
294
308 static int32_t GetPaneViewGraphIndex(CGUIPaneViewGraph* pPane);
309
321 static int32_t GetPaneViewGraphCount();
322
338 static const CResult ShowPaneViewGraph(bool bShow, int32_t i32Index = 0);
339
357 static const CResult ShowPaneViewGraph(bool bShow, CGUIPaneViewGraph* pPaneViewGraph);
358
370 static CGUIPaneViewGraph* CreatePaneViewGraph();
371
387 static const CResult DestroyPaneViewGraph(int32_t i32Index);
388
406 static const CResult DestroyPaneViewGraph(CGUIPaneViewGraph* pPaneViewGraph);
407
419 static CGUIPaneColorTable* GetPaneColorTable();
420
434 static const CResult ShowPaneColorTable(bool bShow);
435
447 static CGUIPaneSheet* GetPaneSheet();
448
462 static const CResult ShowPaneSheet(bool bShow);
463
479 static const CResult ShowPane(EPaneType ePaneType, bool bShow);
480
496 static const CResult AttachPaneAsTab(CDockablePane* pPane, CDockablePane* pPaneDst);
497
521 static const CResult DockPane(CDockablePane* pPane, CDockablePane* pPaneDst, EDockPosition eDockPosition, int32_t i32Width, int32_t i32Height);
522
544 static const CResult DockPaneToMainFrame(CDockablePane* pPane, EDockPosition eDockPosition, int32_t i32Width, int32_t i32Height);
545
563 static const CResult FloatPane(CDockablePane* pPane, CRect rt, bool bShow = true);
564
576 static bool IsPaneActive(CDockablePane* pPane);
577
587 static CPane* GetLastFocusedPane();
588
601 static CGUIPaneProperties* GetLastFocusedPaneProperties();
602
616 static const CResult SetLastFocusedPane(CPane* pPane);
617
627 static std::list<CPane*>* GetFocusedPaneList();
628
667 static const CResult GetTopAlignPanes(std::vector<CDockablePane*>& vctPanes, ESortOrderRect eSortOrder = ESortOrderRect_Top_Asc_Left_Asc);
668
692 static const CResult GetBottomAlignPanes(std::vector<CDockablePane*>& vctPanes, ESortOrderRect eSortOrder = ESortOrderRect_Bottom_Desc_Left_Asc);
693
713 static const CResult GetLeftAlignPanes(std::vector<CDockablePane*>& vctPanes, ESortOrderRect eSortOrder = ESortOrderRect_Left_Asc_Top_Asc);
714
734 static const CResult GetRightAlignPanes(std::vector<CDockablePane*>& vctPanes, ESortOrderRect eSortOrder = ESortOrderRect_Right_Desc_Top_Asc);
735
751 static const CResult GetExactClassPanes(CDockablePane* pPane, std::vector<CDockablePane*>& vctPanes);
752
768 static CGUIPaneBase* FindPaneByName(const Base::CFLString<wchar_t>& strPaneName);
769
789 static const CResult FindPanesByName(const Base::CFLString<wchar_t>& strPaneName, std::vector<CGUIPaneBase*>& vctResult);
790
804 static DWORD GetAlignmentLocal(const CRect& rtDestination, const CRect& rt);
805 static const CResult SetPlacement(CDockablePane* pPane, const CGUIPanePlacementBase& panePlacement);
806 static const CResult SetPlacement(CDockablePane* pPane, const CGUIPanePlacementBase* pPanePlacement);
807
808 static EDockPosition ConvertAlignmentToDockPosition(DWORD dwAlignment);
809 static DWORD ConvertDockPositionToAlignment(EDockPosition eDockPos);
810
811 static CPaneContainer* GetPaneContainer(const CDockablePane* pPane, bool* pBIsLeftPane = nullptr);
812
813 // for FL developers
814 static const CResult SetQAMode(EQAMode eQAMode);
815 static bool IsQAMode(EQAMode eQAMode);
816 static bool IsPrintLogMode();
817
818 static const CResult LoadStateAll();
819 static const CResult SaveStateAll();
820 DeclareGetClassType();
821
822 protected:
823 static const CResult AddUserPane(uint32_t uID, const CGUIPaneBase* pPane);
824 static CGUIPaneBase* FindUserPaneByCommandID(uint32_t uID);
825
826 static CGUIManagerPane* GetObject();
827 static const CResult SetPrintLog(bool bPrintLog);
828
829 static Base::CFLString<wchar_t> GetPaneNameToDistinguish(const CBasePane* pPane, bool bReplaceBracket, CGUIMenuItemBase** pMI = nullptr);
830 static Base::CFLString<wchar_t> GetSectionNameOfPane(const Base::CFLString<wchar_t>& strPaneNameToDistinguish, bool bReplaceBracket, const CGUIMenuItemBase* pMI);
831 static CGUIMenuItemBase* FindParentMenuItemBySectionName(const Base::CFLString<wchar_t>& str, int32_t* pI32Idx = nullptr);
832 static CGUITabbedPane* FindTabbedPaneBySerialNumber(int32_t i32SerialNum);
833 static CGUIPaneFrameWnd* FindMiniFrameBySerialNumber(int32_t i32SerialNum);
834 static CDockablePane* FindPaneBySectionName(const Base::CFLString<wchar_t>& str);
835
836 static const CResult LoadStateAutoHideBars();
837 static const CResult LoadPanesWithoutDeploying();
838 static const CResult LoadTabbedPane();
839 static const CResult LoadStatePaneContainer();
840 static const CResult LoadStatePaneContainerForMiniFrame();
841 static const CResult LoadPaneContainer(CWnd* pParent, CRect rtParent, int32_t i32Level, const Base::CFLString<wchar_t>& strSectionName);
842
843 static const CResult SavePaneContainerRootStruct(sStateDataPaneContainerManager* pSPaneContainerRoot, const Base::CFLString<wchar_t>& strSectionNamePre, const Base::CFLString<wchar_t>& strFilePath);
844 static const CResult SavePaneContainerStruct(sStateDataPaneContainer* pSPaneContainer, const Base::CFLString<wchar_t>& strSectionNamePre, EDockPosition& eParentDocPos, CRect& rtParent, const Base::CFLString<wchar_t>& strFilePath);
845 static const CResult SavePaneContainer(CPaneContainer* pPaneContainer, CWnd* pParent, CRect rtParent, int32_t i32Level, const Base::CFLString<wchar_t>& strSectionName);
846 static const CResult SaveMainFramePaneContainers();
847
848 static const CResult GetStateDataPaneContainerManager(CPaneDivider* pSlider, SStateDataPaneContainerManager& sSDPaneDivider);
849 static const CResult GetStateDataPaneContainer(CPaneContainer* pSlider, SStateDataPaneContainer& sSDPaneContainer, EDockPosition eDockPosParent);
850
851 static const CResult SaveMiniFrames(const std::set<CGUIPaneFrameWnd*>& setMiniFrames);
852 static const CResult SavePanes(const std::set<CGUIPaneBase*>& setPanes);
853 static const CResult SaveTabCtrls(const std::set<CGUITabbedPane*>& setTabbedPanes);
854
855 static const CResult SerializeAutoHideBars(bool bLoad, std::vector<SStateDataAutoHideBar*>* pVctItems = nullptr);
856 static const CResult SerializeAutoHideInfo(CDockablePane* pPane, const Base::CFLString<wchar_t>& strSectionName, bool bLoad, SStateDataAutoHideBar* pStruct = nullptr);
857
858
859 static const CResult SetMainFrame(CGUIMainFrame* pMF);
860 // Pane 컨테이너에서 pane 을 제거
861 static const CResult RemovePane(CPane* pPane);
862 static const CResult PreClosePane(CDockablePane* pPane);
863
864 friend class CGUIMainFrame;
865 friend class CGUIPaneBase;
866 friend class CGUITabbedPane;
867 friend class CGUIPaneFrameWnd;
868 friend class CGUIManager;
869 friend class CGUIMenuItemPaneDialogCustomEmbedded;
870 friend class CGUIViewSNAP;
871 friend class CInternalManagerPane;
872 friend class CGUIMenuItemProperty;
873 friend class CGUIMenuItemAttributePane;
874
875 protected:
876 std::list<CPane*> m_listPaneFocused;
877 std::map<uint32_t, CGUIPaneBase*> m_mapUserPane;
878
879 CGUIMainFrame* m_pMainFrame;
881 Base::CFLArray<Base::CFLString<wchar_t>> m_flaSectionsForIndividualPane;
882
883 bool m_bInitialized;
884 EQAMode m_eQAMode;
885 bool m_bPrintLogMode;
886
887 };
888 }
889}
Template type array class.
Definition FLArray.h:71
Top-level base class of FLImaging.
Definition FLBase.h:36
Template type string class.
Definition FLString.h:34
FLImaging module execution result object.
Definition ResultsDef.h:1704
static const CResult ShowPaneMenu(bool bShow)
Displays or disappears CGUIPaneMenu on the screen.
static CGUIPaneViewGraph * GetPaneViewGraph(int32_t i32Index=0)
Returns a pointer to the Graph View pane.
static CGUIPaneLog * GetPaneLog()
Returns a pointer to the Log Pane.
static int32_t GetPaneViewGraphCount()
Returns the count of Graph View panes.
static const CResult FloatPane(CDockablePane *pPane, CRect rt, bool bShow=true)
Floats a specific pane (pPane).
static const CResult GetLeftAlignPanes(std::vector< CDockablePane * > &vctPanes, ESortOrderRect eSortOrder=ESortOrderRect_Left_Asc_Top_Asc)
Returns the panes whose current alignment includes CBRS_ALIGN_LEFT.
static const CResult ShowPane(EPaneType ePaneType, bool bShow)
Displays or disappears specific pane on the screen.
static const CResult ShowPaneSheet(bool bShow)
Displays or disappears CGUIPaneSheet on the screen.
static const CResult DestroyPaneViewGraph(CGUIPaneViewGraph *pPaneViewGraph)
Destroys the specified Graph View pane. The 0-th Graph View pane belongs to the basic MainFrame and c...
static const CResult ShowPaneSystemInformation(bool bShow)
Displays or disappears CGUIPaneSystemInformation on the screen.
static const CResult ShowPaneExampleSNAP(bool bShow)
Displays or disappears CGUIPaneExampleSNAP on the screen.
static CGUIPaneBase * GetPane(EPaneType ePaneType)
Returns the pane corresponding to the specified pane type.
static const CResult GetTopAlignPanes(std::vector< CDockablePane * > &vctPanes, ESortOrderRect eSortOrder=ESortOrderRect_Top_Asc_Left_Asc)
Returns the panes whose current alignment includes CBRS_ALIGN_TOP.
static const CResult ShowPaneColorTable(bool bShow)
Displays or disappears CGUIPaneColorTable on the screen.
static const CResult ShowPaneCode(bool bShow)
Displays or disappears CGUIPaneCode on the screen.
static CGUIPaneProperties * GetLastFocusedPaneProperties()
Returns the pointer to the most recently focused CGUIPaneProperties.
static const CResult ShowPaneViewGraph(bool bShow, CGUIPaneViewGraph *pPaneViewGraph)
Displays or disappears the specified CGUIPaneViewGraph on the screen.
static CGUIPaneCode * GetPaneCode()
Returns the pointer of the code pane.
static CGUIPaneSheet * GetPaneSheet()
Returns the pointer of CGUIPaneSheet.
static const CResult GetRightAlignPanes(std::vector< CDockablePane * > &vctPanes, ESortOrderRect eSortOrder=ESortOrderRect_Right_Desc_Top_Asc)
Returns the panes whose current alignment includes CBRS_ALIGN_RIGHT.
static const CResult AttachPaneAsTab(CDockablePane *pPane, CDockablePane *pPaneDst)
Attaches a specific pane (pPane) as a tab above another pane (pPaneDst).
static const CResult DockPaneToMainFrame(CDockablePane *pPane, EDockPosition eDockPosition, int32_t i32Width, int32_t i32Height)
Docks a specified pane (pPane) at a specific position of another pane (pPaneDst).
static const CResult FindPanesByName(const Base::CFLString< wchar_t > &strPaneName, std::vector< CGUIPaneBase * > &vctResult)
Finds and returns all panes by their name.
static std::list< CPane * > * GetFocusedPaneList()
Returns the list of CPane pointers stored in the order of most recently focused.
static const CResult DockPane(CDockablePane *pPane, CDockablePane *pPaneDst, EDockPosition eDockPosition, int32_t i32Width, int32_t i32Height)
Docks a specified pane (pPane) at a specific position of another pane (pPaneDst).
static const CResult ShowPaneViewGraph(bool bShow, int32_t i32Index=0)
Displays or disappears the i32Index-th CGUIPaneViewGraph on the screen.
static CGUIPaneMenu * GetPaneMenu()
Returns a pointer to the Menu Pane.
static const CResult ShowPaneLog(bool bShow)
Displays or disappears CGUIPaneLog on the screen.
static const CResult GetExactClassPanes(CDockablePane *pPane, std::vector< CDockablePane * > &vctPanes)
Retrieves panes that exactly match the class type of the specified pane.
static int32_t GetPaneViewGraphIndex(CGUIPaneViewGraph *pPane)
Returns the index of the specified Graph View pane.
static CGUIPaneViewGraph * CreatePaneViewGraph()
Creates a new Graph View pane and returns its pointer.
static CGUIPaneExampleSNAP * GetPaneExampleSNAP()
Returns the pointer of the SNAP Sample Pane.
static DWORD GetAlignmentLocal(const CRect &rtDestination, const CRect &rt)
Returns the relative position of rt with respect to rtDestination. For example, if rt is positioned t...
static CGUIPaneColorTable * GetPaneColorTable()
Returns the pointer of CGUIPaneColorTable.
static CPane * GetLastFocusedPane()
Returns the pointer to the most recently focused pane.
static const CResult GetBottomAlignPanes(std::vector< CDockablePane * > &vctPanes, ESortOrderRect eSortOrder=ESortOrderRect_Bottom_Desc_Left_Asc)
Returns the panes whose current alignment includes CBRS_ALIGN_BOTTOM.
static const CResult SetLastFocusedPane(CPane *pPane)
Sets the most recently focused CPane pointer.
static const CResult DestroyPaneViewGraph(int32_t i32Index)
Destroys the i32Index-th Graph View pane. The 0-th Graph View pane belongs to the basic MainFrame and...
static CGUIPaneBase * FindPaneByName(const Base::CFLString< wchar_t > &strPaneName)
Finds and returns a pane by its name.
static bool IsPaneActive(CDockablePane *pPane)
Returns whether the pane is in an active state. This function considers the pane to be visible if it ...
static CGUIPaneSystemInformation * GetPaneSystemInformation()
Returns a pointer to the SystemInformation Pane.
A class of log pane.
Definition GUIPaneLog.h:33
A base class for managing pane placement configurations such as docking and floating within the GUI f...
Definition GUIPanePlacement.h:27
The CGUITabbedPane class is a specialized implementation of a tabbed pane control in a GUI applicatio...
Definition GUITabbedPane.h:29
Definition D2DObject.h:12
ESortOrderRect
Definition DefinitionsGUI.h:14251
@ ESortOrderRect_Left_Asc_Top_Asc
Definition DefinitionsGUI.h:14352
@ ESortOrderRect_Right_Desc_Top_Asc
Definition DefinitionsGUI.h:14412
@ ESortOrderRect_Top_Asc_Left_Asc
Definition DefinitionsGUI.h:14256
@ ESortOrderRect_Bottom_Desc_Left_Asc
Definition DefinitionsGUI.h:14310
EDockPosition
Dock position.
Definition DefinitionsGUI.h:14147
EPaneType
Pane type.
Definition DefinitionsGUI.h:13634