UIOption.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #ifndef __UIOPTION_H__
  2. #define __UIOPTION_H__
  3. #pragma once
  4. namespace DuiLib
  5. {
  6. class UILIB_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 GetSelectBkColor();
  24. LPCTSTR GetForeImage();
  25. void SetForeImage(LPCTSTR pStrImage);
  26. LPCTSTR GetGroup() const;
  27. void SetGroup(LPCTSTR pStrGroupName = NULL);
  28. bool IsSelected() const;
  29. virtual void Selected(bool bSelected, bool bTriggerEvent=true);
  30. SIZE EstimateSize(SIZE szAvailable);
  31. void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);
  32. void PaintStatusImage(HDC hDC);
  33. void PaintText(HDC hDC);
  34. protected:
  35. bool m_bSelected;
  36. CDuiString m_sGroupName;
  37. DWORD m_dwSelectedBkColor;
  38. DWORD m_dwSelectedTextColor;
  39. TDrawInfo m_diSelected;
  40. TDrawInfo m_diSelectedHot;
  41. TDrawInfo m_diFore;
  42. };
  43. } // namespace DuiLib
  44. #endif // __UIOPTION_H__