FLImaging 6.8.12.1
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 virtual void OnPressCloseButton()override;
170 virtual void RecalcLayout()override;
171 virtual void ShowPane(BOOL bShow, BOOL bDelay, BOOL bActivate/* = TRUE*/)override;
172 virtual BOOL FloatPane(CRect rectFloat, AFX_DOCK_METHOD dockMethod = DM_UNKNOWN, bool bShow = true) override;
173
174 DeclareGetClassType();
175
176 protected:
177 typedef struct sStateData
178 {
179 sStateData();
180 void Assign(const sStateData& rhs);
181
182 int32_t i32SerialNum;
183 int32_t i32TabCount;
184 int32_t i32ActiveTab;
185 int32_t i32ParentMiniFrameSerialNum;
186 DWORD dwCurrentAlignment;
187 CRect rtRect;
188 CMFCBaseTabCtrl::Location loc;
189 Base::CFLArray<Base::CFLString<wchar_t>> flaStrTabPaneSectionNames;
190 }
191 SStateData;
192
193 protected:
194 virtual bool CanSave() const;
195 virtual const SStateData& GetStateData() const;
196
197 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);
198 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);
199 static const CResult Write(CGUITabbedPane* pTabbedPane, const Base::CFLString<wchar_t>& strFilePath);
200
201 virtual bool IsLoadComplete() const;
202 virtual void MarkLoadComplete(bool bComplete);
203
204 virtual bool IsSaveComplete() const;
205 virtual void MarkSaveComplete(bool bComplete);
206
207 virtual void SetSerialNumber(int32_t i32Num);
208 virtual int32_t GetSerialNumber() const;
209
210 virtual CDockablePane* AttachToTabWnd(CDockablePane* pTabControlBarAttachTo, AFX_DOCK_METHOD dockMethod, BOOL bSetActive = TRUE, CDockablePane** ppTabbedControlBar = NULL) override;
211 virtual CTabbedPane* CreateTabbedPane() override;
212 virtual CPaneFrameWnd* CreateDefaultMiniframe(CRect rectInitial) override;
213 virtual void DrawCaption(CDC* pDC, CRect rectCaption)override;
214 virtual BOOL DockToWindow(CDockablePane* pTargetWindow, DWORD dwAlignment, LPCRECT lpRect = NULL) override;
215
216 protected:
217 CGUIPaneBase* m_pActivePanePrev;
218 CGUIMainFrame* m_pParentMainFrame;
219 int32_t m_i32SerialNum;
220
221 bool m_bSaveDone;
222 bool m_bLoadDone;
223 SStateData m_sStateData;
224
225 friend class CGUIManagerPane;
226 friend class CGUIPaneBase;
227
228 protected:
229 virtual void OnPressButtons(UINT nHit);
230 DECLARE_MESSAGE_MAP()
231 afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
232 afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
233 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
234 afx_msg void OnDestroy();
235 afx_msg BOOL OnEraseBkgnd(CDC* pDC);
236 afx_msg LRESULT OnChangeActiveTab(WPARAM wp, LPARAM lp);
237 afx_msg void OnSetFocus(CWnd* pOldWnd);
238 };
239 }
240}
Template type array class.
Definition FLArray.h:53
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:1596
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