FLImaging 7.8.25.3
GUITabbedPane.h
1#pragma once
2
10
12namespace FLImaging
13{
15 namespace GUI
16 {
17 class CGUIPaneBase;
18 class CGUIMainFrame;
19
28 class CGUITabbedPane : public CTabbedPane, public Base::CFLBase
29 {
30 public:
37 CGUITabbedPane(BOOL bAutoDestroy = FALSE);
38
45 virtual ~CGUITabbedPane();
46 DECLARE_SERIAL(CGUITabbedPane)
47
48 public:
49
61 bool IsTabVisible(CWnd* pWndPane) const;
62
74 int32_t GetTabIndex(CWnd* pWndPane) const;
75
76
88 bool DeleteTab(int32_t i32TabNum);
89
100
111
122
134 bool HideTab(int32_t i32TabNum);
135
146
157
168
169 bool HideAllTabsExceptOne(CGUIPaneBase* pActivePane);
170
171 virtual void OnPressCloseButton()override;
172 virtual void RecalcLayout()override;
173 virtual void ShowPane(BOOL bShow, BOOL bDelay, BOOL bActivate/* = TRUE*/)override;
174 virtual BOOL FloatPane(CRect rectFloat, AFX_DOCK_METHOD dockMethod = DM_UNKNOWN, bool bShow = true) override;
175
176 DeclareGetClassType();
177
178 protected:
179 typedef struct sStateData
180 {
181 sStateData();
182 void Assign(const sStateData& rhs);
183
184 int32_t i32SerialNum;
185 int32_t i32TabCount;
186 int32_t i32ActiveTab;
187 int32_t i32ParentMiniFrameSerialNum;
188 DWORD dwCurrentAlignment;
189 CRect rtRect;
190 CMFCBaseTabCtrl::Location loc;
191 Base::CFLArray<Base::CFLString<wchar_t>> flaStrTabPaneSectionNames;
192 }
193 SStateData;
194
195 protected:
196 virtual bool CanSave() const;
197 virtual const SStateData& GetStateData() const;
198
199 static const CResult Read(SStateData& sdOut, Base::CFLArray<Base::CFLString<wchar_t>>& flaKey, Base::CFLArray<Base::CFLString<wchar_t>>& flaVal, const Base::CFLString<wchar_t>& strFilePath, const Base::CFLString<wchar_t>& strSectionName);
200 static const CResult Load(CGUITabbedPane* pTabbedPane, const SStateData& sSD, const Base::CFLArray<Base::CFLString<wchar_t>>& flaKey, const Base::CFLArray<Base::CFLString<wchar_t>>& flaVal);
201 static const CResult Write(CGUITabbedPane* pTabbedPane, const Base::CFLString<wchar_t>& strFilePath);
202
203 virtual bool IsLoadComplete() const;
204 virtual void MarkLoadComplete(bool bComplete);
205
206 virtual bool IsSaveComplete() const;
207 virtual void MarkSaveComplete(bool bComplete);
208
209 virtual void SetSerialNumber(int32_t i32Num);
210 virtual int32_t GetSerialNumber() const;
211
212 virtual CDockablePane* AttachToTabWnd(CDockablePane* pTabControlBarAttachTo, AFX_DOCK_METHOD dockMethod, BOOL bSetActive = TRUE, CDockablePane** ppTabbedControlBar = NULL) override;
213 virtual CTabbedPane* CreateTabbedPane() override;
214 virtual CPaneFrameWnd* CreateDefaultMiniframe(CRect rectInitial) override;
215 virtual void DrawCaption(CDC* pDC, CRect rectCaption)override;
216 virtual BOOL DockToWindow(CDockablePane* pTargetWindow, DWORD dwAlignment, LPCRECT lpRect = NULL) override;
217
218 protected:
219 CGUIPaneBase* m_pActivePanePrev;
220 CGUIMainFrame* m_pParentMainFrame;
221 int32_t m_i32SerialNum;
222
223 bool m_bSaveDone;
224 bool m_bLoadDone;
225 SStateData m_sStateData;
226
227 friend class CGUIManagerPane;
228 friend class CGUIPaneBase;
229
230 protected:
231 virtual void OnPressButtons(UINT nHit);
232 DECLARE_MESSAGE_MAP()
233 afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
234 afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
235 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
236 afx_msg void OnDestroy();
237 afx_msg BOOL OnEraseBkgnd(CDC* pDC);
238 afx_msg LRESULT OnChangeActiveTab(WPARAM wp, LPARAM lp);
239 afx_msg void OnSetFocus(CWnd* pOldWnd);
240 };
241 }
242}
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
Provides global management utilities for panes.
Definition GUIManagerPane.h:46
The CGUITabbedPane class is a specialized implementation of a tabbed pane control in a GUI applicatio...
Definition GUITabbedPane.h:29
bool DeleteAllTabsExceptActiveOne()
Deletes all tabs except the currently active one.
bool DeleteAllTabs()
Deletes all tabs.
bool DeleteTab(int32_t i32TabNum)
Deletes the tab at the specified index.
CGUITabbedPane(BOOL bAutoDestroy=FALSE)
Default constructor.
bool HideActiveTab()
Hides the currently active tab.
bool HideAllTabsExceptActiveOne()
Hides all tabs except the currently active one.
bool HideAllTabs()
Hides all tabs.
bool IsTabVisible(CWnd *pWndPane) const
Indicates whether the specified tab is visible.
bool DeleteActiveTab()
Deletes the currently active tab.
bool HideTab(int32_t i32TabNum)
Hides the tab at the specified index.
int32_t GetTabIndex(CWnd *pWndPane) const
Searches for the index of the tab containing the specified CWnd object.
virtual ~CGUITabbedPane()
Default destructor.
Definition D2DObject.h:12