UILoading.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #ifndef __UILoadingCircle_H
  2. #define __UILoadingCircle_H
  3. namespace DuiLib
  4. {
  5. enum StylePresets
  6. {
  7. Custom,
  8. MacOSX,
  9. Firefox,
  10. IE7
  11. };
  12. class UILIB_API CLoadingUI : public CControlUI
  13. {
  14. DECLARE_DUICONTROL(CControlUI)
  15. enum TIMEID
  16. {
  17. kTimerLoadingId = 100,
  18. };
  19. public:
  20. CLoadingUI();
  21. virtual ~CLoadingUI();
  22. LPCTSTR GetClass() const;
  23. LPVOID GetInterface(LPCTSTR pstrName);
  24. virtual void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);
  25. void Start();
  26. void Stop();
  27. protected:
  28. virtual void PaintBkImage(HDC hDC);
  29. virtual void DoEvent(TEventUI& event);
  30. virtual void Init();
  31. Gdiplus::Color* GenerateColorsPallet(Gdiplus::Color _objColor, bool _blnShadeColor, int _intNbSpoke);
  32. protected:
  33. int m_nNumber;
  34. int m_nTime;
  35. bool m_bStop;
  36. int m_NumberOfSpoke;//辐条数量
  37. int m_SpokeThickness;//辐条粗细
  38. int m_ProgressValue;//------------------------
  39. int m_OuterCircleRadius;//外圈
  40. int m_InnerCircleRadius;//内圈
  41. Gdiplus::PointF m_CenterPoint;//二维平面的点
  42. Gdiplus::Color m_Color;
  43. Gdiplus::Color* m_Colors;
  44. double* m_Angles;
  45. };
  46. CControlUI* CreateLoadingControl(LPCTSTR pstrType);
  47. }
  48. #endif //__UILoadingCircle_H