SRadioBox2.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #pragma once
  2. #include <control/SCmnCtrl.h>
  3. namespace SOUI
  4. {
  5. class SRadioBox2 : public SRadioBox
  6. {
  7. SOUI_CLASS_NAME(SRadioBox2,L"radio2")
  8. public:
  9. SRadioBox2(void);
  10. ~SRadioBox2(void);
  11. protected:
  12. virtual CSize GetDesiredSize(LPCRECT pRcContainer)
  13. {
  14. if(m_pSkin) return m_pSkin->GetSkinSize();
  15. else return SWindow::GetDesiredSize(pRcContainer);
  16. }
  17. virtual void GetTextRect(LPRECT pRect)
  18. {
  19. SWindow::GetTextRect(pRect);
  20. pRect->left+=m_nTextOffset;
  21. }
  22. virtual void DrawFocus(IRenderTarget *pRT)
  23. {
  24. }
  25. protected:
  26. void OnPaint(IRenderTarget *pRT);
  27. SOUI_MSG_MAP_BEGIN()
  28. MSG_WM_PAINT_EX(OnPaint)
  29. SOUI_MSG_MAP_END()
  30. ISkinObj * m_pIcon;
  31. CPoint m_ptIcon;
  32. int m_nTextOffset;
  33. SOUI_ATTRS_BEGIN()
  34. ATTR_SKIN(L"iconSkin",m_pIcon,TRUE)
  35. ATTR_POINT(L"iconPos",m_ptIcon,TRUE)
  36. ATTR_INT(L"textOffset",m_nTextOffset,TRUE)
  37. SOUI_ATTRS_END()
  38. };
  39. }