#pragma once
|
#include "stdafx.h"
|
|
#include "SRadioBox2.h"
|
|
namespace SOUI
|
{
|
|
class AFX_EXT_CLASS CMBAutoRadio: public SRadioBox
|
{
|
SOUI_CLASS_NAME(CMBAutoRadio,L"mbautoradio")
|
public:
|
CMBAutoRadio(void);
|
~CMBAutoRadio(void);
|
private:
|
bool m_bAutoSize;
|
protected:
|
virtual void DrawText(IRenderTarget *pRT,LPCTSTR pszBuf,int cchText,LPRECT pRect,UINT uFormat);
|
protected:
|
virtual CSize GetDesiredSize(LPCRECT pRcContainer)
|
{
|
if(m_pSkin) return m_pSkin->GetSkinSize();
|
else return SWindow::GetDesiredSize(pRcContainer);
|
}
|
virtual void GetTextRect(LPRECT pRect)
|
{
|
SWindow::GetTextRect(pRect);
|
pRect->left+=m_nTextOffset;
|
}
|
virtual void DrawFocus(IRenderTarget *pRT)
|
{
|
}
|
|
protected:
|
void OnPaint(IRenderTarget *pRT);
|
|
SOUI_MSG_MAP_BEGIN()
|
MSG_WM_PAINT_EX(OnPaint)
|
SOUI_MSG_MAP_END()
|
|
ISkinObj * m_pIcon;
|
CPoint m_ptIcon;
|
int m_nTextOffset;
|
SOUI_ATTRS_BEGIN()
|
ATTR_SKIN(L"iconSkin",m_pIcon,TRUE)
|
ATTR_POINT(L"iconPos",m_ptIcon,TRUE)
|
ATTR_INT(L"textOffset",m_nTextOffset,TRUE)
|
SOUI_ATTRS_END()
|
};
|
|
|
}
|