UIOption.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #ifndef __UIOPTION_H__
  2. #define __UIOPTION_H__
  3. #pragma once
  4. namespace DuiLib
  5. {
  6. class DUILIB_API COptionUI : public CButtonUI
  7. {
  8. public:
  9. COptionUI();
  10. ~COptionUI();
  11. LPCTSTR GetClass() const;
  12. LPVOID GetInterface(LPCTSTR pstrName);
  13. void SetManager(CPaintManagerUI* pManager, CControlUI* pParent, bool bInit = true);
  14. bool Activate();
  15. void SetEnabled(bool bEnable = true);
  16. LPCTSTR GetSelectedImage();
  17. void SetSelectedImage(LPCTSTR pStrImage);
  18. LPCTSTR GetSelectedHotImage();
  19. void SetSelectedHotImage(LPCTSTR pStrImage);
  20. void SetSelectedTextColor(DWORD dwTextColor);
  21. DWORD GetSelectedTextColor();
  22. void SetSelectedBkColor(DWORD dwBkColor);
  23. DWORD GetSelectedBkColor();
  24. DUI_DEPRECATED DWORD GetSelectBkColor(); // deprecated, use GetSelectedBkColor instead
  25. LPCTSTR GetForeImage();
  26. void SetForeImage(LPCTSTR pStrImage);
  27. LPCTSTR GetGroup() const;
  28. void SetGroup(LPCTSTR pStrGroupName = NULL);
  29. bool IsSelected() const;
  30. virtual void Selected(bool bSelected, bool bTriggerEvent=true);
  31. SIZE EstimateSize(SIZE szAvailable);
  32. void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);
  33. void PaintStatusImage(HDC hDC);
  34. void PaintText(HDC hDC);
  35. protected:
  36. bool m_bSelected;
  37. CDuiString m_sGroupName;
  38. DWORD m_dwSelectedBkColor;
  39. DWORD m_dwSelectedTextColor;
  40. TDrawInfo m_diSelected;
  41. TDrawInfo m_diSelectedHot;
  42. TDrawInfo m_diFore;
  43. };
  44. } // namespace DuiLib
  45. #endif // __UIOPTION_H__