00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef _GGWaitDlg_H_
00016 #define _GGWaitDlg_H_
00017
00018 #include "CATGUIInternal.h"
00019 #include "CATWindow.h"
00020 #include "CATSignal.h"
00021 #include "CATProgress.h"
00022 #include "CATMutex.h"
00023
00024
00025
00026
00027 class CATWaitDlg : private CATWindow
00028 {
00029 public:
00030 CATWaitDlg( CATINSTANCE instance,
00031 CATInt32 backgroundBmpId,
00032 CATRect& textRect,
00033 CATInt32 progressBmpOnId = 0,
00034 CATInt32 progressBmpOffId = 0,
00035 CATInt32 progressLeft = 0,
00036 CATInt32 progressTop = 0);
00037
00038 virtual ~CATWaitDlg();
00039
00040 virtual void StartWait( const CATString& waitMsg,
00041 CATWindow* parent = 0,
00042 bool disableParent = false);
00043
00044 virtual void EndWait(bool force = false);
00045 virtual bool OnClose();
00046 virtual void OnDestroy();
00047 virtual void SetProgress( CATFloat32 percent );
00048
00049 virtual void SetWaitLabelText( const CATString& waitStr );
00050 virtual CATResult OnEvent ( const CATEvent& event,
00051 CATInt32& retVal);
00052
00053 CATUInt32 GetDepth();
00054 bool IsShowing();
00055
00056
00057
00058
00059
00060 virtual void Draw ( CATImage* background,
00061 const CATRect& dirtyRect);
00062
00063 protected:
00064 static unsigned int _stdcall WindowThread(void* param);
00065 HANDLE fHandle;
00066
00067 CATInt32 fBmpId;
00068 CATUInt32 fDepth;
00069
00070 CATLabel* fWaitLabel;
00071
00072 CATInt32 fProgBmpOnId;
00073 CATInt32 fProgBmpOffId;
00074 CATProgress* fProgressBar;
00075 CATMutex fUpdateLock;
00076 CATSignal fDlgReady;
00077 CATWindow* fParent;
00078 bool fDisableParent;
00079 bool fAllowClose;
00080 };
00081
00082
00083 #endif // _GGWaitDlg_H_