FLImaging 7.8.25.3
GUIDialogProgress.h
1#pragma once
2
3#include "GUIDialog.h"
4#include "DefinitionsGUI.h"
5#include "GUIManagerProgressBar.h"
6
19
21namespace FLImaging
22{
24 namespace GUI
25 {
26 class CGUIProgressCtrl;
27 class CGUILayoutBase;
28
46 class FL_EXPORT CGUIDialogProgress : public CGUIDialog
47 {
48 friend class CGUIManagerProgressBar;
49 DECLARE_DYNAMIC(CGUIDialogProgress)
50
51 public:
52 CGUIDialogProgress(CWnd* pParent = nullptr);
53 virtual ~CGUIDialogProgress();
65 static CGUIDialogProgress* CreateModelessDialog(CWnd* pParent = nullptr);
66
67 virtual BOOL OnInitDialog() override;
68 virtual bool AdjustLayout() override;
69 virtual void UpdateTheme() override;
70 virtual void ShowCaption(bool bShow = true) override;
71
83 virtual void SetElapsedTimePosition(CGUIBoxLayout* pBoxLayout, int32_t i32Index);
84
98 virtual void SetElapsedTimePosition(CGUIGridLayout* pGridLayout, int32_t i32Row, int32_t i32Col);
99
110
120 void KeepPreviousMaximumWidth(bool bKeep = false);
121
132
142 void KeepPreviousMaximumHeight(bool bKeep = false);
143
154
168 virtual void SetResizeWindowPivot(EGUIAlignment eAlignment);
169
182
196 virtual void SetMainProgressCtrl(CGUIProgressCtrl* pProgressCtrl);
197
211 virtual CGUIProgressCtrl* GetMainProgressCtrl() const;
212
213 protected:
214 virtual void DrawTitleRect(CDC* pDC) override;
215 virtual BOOL PreTranslateMessage(MSG* pMsg);
216 virtual void SetFillColor(CGUILayoutBase* pLayout, COLORREF clrFill);
217 virtual void GetResizePivot(const CRect& rcWindowPrev, int32_t i32WndWidth, int32_t i32WndHeight, int32_t& i32WndL, int32_t& i32WndT)const;
218
219 protected:
220 CPoint m_ptPrev;
221
223 CGUILayoutBase* m_pLayoutOfElapsedTime;
224 CGUIProgressCtrl* m_pProgressCtrlMain;
225 int32_t m_i32IndexOfElapsedTime;
226
227 bool m_bKeepPreviousMaximumWidth;
228 bool m_bKeepPreviousMaximumHeight;
229 EGUIAlignment m_eResizePivot;
230
231 public:
232 DeclareGetClassType();
233 DECLARE_MESSAGE_MAP()
234 afx_msg void OnNcPaint();
235 afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
236 afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
237 afx_msg void OnMouseMove(UINT nFlags, CPoint point);
238 afx_msg void OnPaint();
239 afx_msg BOOL OnEraseBkgnd(CDC* pDC);
240 afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
241 };
242 }
243}
Performance counter class.
Definition PerformanceCounter.h:29
CGUIDialog(CWnd *pParent=nullptr)
Default constructor.
virtual Base::CPerformanceCounter & GetPerformanceCounter()
Returns the performance counter used by the progress dialog.
static CGUIDialogProgress * CreateModelessDialog(CWnd *pParent=nullptr)
Creates and returns a modeless progress dialog.
virtual void SetElapsedTimePosition(CGUIGridLayout *pGridLayout, int32_t i32Row, int32_t i32Col)
Sets the position where the elapsed time control will be inserted in a grid layout.
void KeepPreviousMaximumWidth(bool bKeep=false)
The width of the progress window changes depending on the size of the internal controls,...
bool DoesKeepPreviousMaximumHeight() const
Returns whether the window to be updated is set to retain its current window height if the height of ...
virtual void SetMainProgressCtrl(CGUIProgressCtrl *pProgressCtrl)
Sets the primary progress control when multiple progress controls are contained within this dialog....
virtual void SetResizeWindowPivot(EGUIAlignment eAlignment)
Sets the pivot position that remains fixed when the progress dialog is resized. For example,...
virtual CGUIProgressCtrl * GetMainProgressCtrl() const
Returns the primary progress control when multiple progress controls are contained within this dialog...
void KeepPreviousMaximumHeight(bool bKeep=false)
The height of the progress window changes depending on the size of the internal controls,...
virtual void SetElapsedTimePosition(CGUIBoxLayout *pBoxLayout, int32_t i32Index)
Sets the position where the elapsed time control will be inserted in a box layout.
virtual EGUIAlignment GetResizeWindowPivot() const
Returns the pivot position that remains fixed when the progress dialog is resized.
bool DoesKeepPreviousMaximumWidth() const
Returns whether the window to be updated is set to retain its current window width if the width of th...
Definition D2DObject.h:12
EGUIAlignment
Alignment information.
Definition DefinitionsGUI.h:13858