FLImaging 6.5.8.1
GUIManagerProgressBar.h
1#pragma once
2#include "GUIProgressCtrl.h"
3#include "GUIDefinitions.h"
4
12namespace FLImaging
13{
15 namespace GUI
16 {
17 class CGUIButton;
18
25 class FL_EXPORT CGUIManagerProgressBar : public Base::CFLBase
26 {
27 public:
28
30
39 {
46 EGUIManagerProgressBar_Button_None = 0x00000000,
47
54 EGUIManagerProgressBar_Button_Stop = 0x00000002,
55 };
56
58
66 void Stop();
67
77 bool IsStopped();
78
89
105 const CResult ShowDialog(bool bModal = true, CWnd* pParent = nullptr);
106
119
132
149
162
179
192
209
222
239
250
264 const CResult SetProgressRatio(double f64ProgressRatio);
265
272 virtual void SetProgressTextAlignment(EGUIAlignment eAlignment);
273
280 virtual EGUIAlignment GetProgressTextAlignment();
281
287 virtual void ShowProgressText(bool bShow);
288
294 virtual bool IsProgressTextVisible();
295
301 virtual void SetDecimalPlaceOfPercentageText(uint8_t u8DecimalPlace);
302
308 virtual uint8_t GetDecimalPlaceOfPercentageText() const;
309
316 virtual void SetProgressTextMode(EProgressCtrlTextMode eMode);
317
324 virtual EProgressCtrlTextMode GetProgressTextMode()const;
325
335 void ShowElapsedTime(bool bShow);
336
347
357 void KeepPreviousMaximumWidth(bool bKeep = false);
358
369
379 void KeepPreviousMaximumHeight(bool bKeep = false);
380
391
398 virtual void SetResizeWindowPivot(EGUIAlignment eAlignment);
399
406 virtual EGUIAlignment GetResizeWindowPivot();
407
420
437
454
473
484
495
496 protected:
497 virtual void OnReceiveBroadcast(const Base::CBroadcastMessage* pMessage) override;
498
499 DeclareGetClassType();
500
501 private:
502 CWnd* m_pProgressDlg;
503
504 Base::CFLString<wchar_t> m_strMessage;
505 Base::CFLString<wchar_t> m_strPauseButtonCaption;
506 Base::CFLString<wchar_t> m_strResumeButtonCaption;
507 Base::CFLString<wchar_t> m_strStopButtonCaption;
508
509 double m_f64ProgressRatio;
510 bool m_bShowElapsedTime;
511 bool m_bKeepPreviousMaximumWidth;
512 bool m_bKeepPreviousMaximumHeight;
513
514 bool m_bShowProgressText;
515 uint8_t m_u8DecimalPlace;
516 EGUIAlignment m_eProgressTextAlignment;
517 EGUIAlignment m_eResizePivot;
518 EProgressCtrlTextMode m_eProgressCtrlTextMode;
519 EGUIManagerProgressBar_Button m_eActiveButton;
520 std::map<EGUIManagerProgressBar_Button, bool>& m_mapEnableButton;
521 };
522 }
523}
Broadcast message class.
Definition BroadcastMessage.h:27
Top-level base class of FLImaging.
Definition FLBase.h:36
Template type string class.
Definition INIUtilities.h:20
FLImaging module execution result object.
Definition ResultsDef.h:1514
Button class.
Definition GUIButton.h:31
A manager class for progress window.
Definition GUIManagerProgressBar.h:26
const CResult SetMessage(const Base::CFLString< wchar_t > &strMessage)
Set the message in the progress window. The length of this message changes the size of the progress w...
bool DoesKeepPreviousMaximumWidth() const
Returns whether the window to be updated is set to retain its current window width if the width of th...
const Base::CFLString< wchar_t > GetPauseButtonCaption()
Gets the string set in the Pause button caption in the progress window.
bool IsElapsedTimeVisible()
Gets the progress time indication.
const Base::CFLString< wchar_t > GetResumeButtonCaption()
Gets the string set in the Resume button caption in the progress window.
const CResult SetResumeButtonCaption(const Base::CFLString< wchar_t > &strButtonCaption)
Sets the string for the Resume button caption in the progress window.
CWnd * GetProgressDialog()
Get progress window pointer.
bool DoesKeepPreviousMaximumHeight() const
Returns whether the window to be updated is set to retain its current window height if the height of ...
bool IsDialogVisible()
Returns the visibility status of the progress window.
bool PeekAndPump()
Message pump function of progress window.
const Base::CFLString< wchar_t > GetStopButtonCaption()
Gets the string set in the Stop button caption of the progress window.
double GetProgressRatio()
Gets the progress set in the progress window. This value is greater than or equal to 0,...
const CResult SetPauseButtonCaption(const Base::CFLString< wchar_t > &strButtonCaption)
Sets the string for the Pause button caption in the progress window.
void Stop()
Set the progress stopped.
void ShowElapsedTime(bool bShow)
Set whether to display progress time.
EGUIManagerProgressBar_Button
Button identifier of Progress Window.
Definition GUIManagerProgressBar.h:39
const CResult ShowDialog(bool bModal=true, CWnd *pParent=nullptr)
Displays a progress window on the screen.
void KeepPreviousMaximumWidth(bool bKeep=false)
The width of the progress window changes depending on the size of the internal controls,...
virtual void OnReceiveBroadcast(const Base::CBroadcastMessage *pMessage) override
Callback function. A function that receives a BroadcastMessage.
const CResult EnableButton(EGUIManagerProgressBar_Button eButton, bool bEnable)
Enable or disable the button displayed in the progress window.
const Base::CFLString< wchar_t > & GetMessage()
Gets the message you set in the progress window.
bool IsStopped()
Gets whether the Stop button is clicked in the progress window.
const CResult CloseDialog()
Close the progress window.
EGUIManagerProgressBar_Button GetButtonConfiguration()
Gets the button option that appears in the progress window.
CGUIButton * GetButton(EGUIManagerProgressBar_Button eButton)
Get the button displayed in the progress window.
const CResult SetButtonConfiguration(EGUIManagerProgressBar_Button eButton)
Set the button to display in the progress window.
const CResult SetStopButtonCaption(const Base::CFLString< wchar_t > &strButtonCaption)
Sets the string for the Stop button caption in the progress window.
const CResult SetProgressRatio(double f64ProgressRatio)
Set the progress in the progress window.
void KeepPreviousMaximumHeight(bool bKeep=false)
The height of the progress window changes depending on the size of the internal controls,...
EProgressCtrlTextMode
String display mode for ProgressCtrl.
Definition GUIDefinitions.h:9418
EGUIAlignment
Alignment information.
Definition GUIDefinitions.h:9222