图片控件类 More...
#include <SCmnCtrl.h>
Public Member Functions | |
SImageWnd () | |
构造函数 | |
virtual | ~SImageWnd () |
析构函数 | |
BOOL | SetSkin (ISkinObj *pSkin, int iFrame=0, BOOL bAutoFree=TRUE) OVERRIDE |
设置skin | |
ISkinObj * | GetSkin () OVERRIDE |
获取资源 | |
void | SetImage (IBitmapS *pBitmap, FilterLevel fl=kNone_FilterLevel) OVERRIDE |
设置绘制图片 | |
IBitmapS * | GetImage () OVERRIDE |
获取当前设置的IBitmapS对象 | |
BOOL | SetIcon (int nSubID) OVERRIDE |
设置图标 | |
Protected Member Functions | |
virtual void | OnColorize (COLORREF cr) |
处理颜色化事件 | |
virtual void | OnScaleChanged (int scale) |
处理缩放变化事件 | |
virtual SIZE | MeasureContent (int nParentWid, int nParentHei) |
测量内容大小 | |
virtual HRESULT | SetAttribute (const SNS::SStringW &amp;amp;amp;strAttribName, const SNS::SStringW &amp;amp;amp;strValue, BOOL bLoading=FALSE) |
void | OnPaint (IRenderTarget *pRT) |
绘制控件 | |
Protected Attributes | |
int | m_iTile |
绘制是否平铺, 0–位伸(默认),1–不变常规绘制, 2–平铺 | |
BOOL | m_bManaged |
是否要自动释放当前的m_pSkin对象 | |
int | m_iIcon |
绘制状态索引 | |
SAutoRefPtr< ISkinObj > | m_pSkin |
ISkinObj对象 | |
SAutoRefPtr< IBitmapS > | m_pImg |
使用代码设定的图片 | |
FilterLevel | m_fl |
绘制图片的放大精度 | |
bool | m_bKeepAspect |
保持纵横比 | |
SImageWnd::SImageWnd | ( | ) |
构造函数
Definition at line 571 of file SCmnCtrl.cpp.
|
virtual |
析构函数
Definition at line 582 of file SCmnCtrl.cpp.
IBitmapS * SImageWnd::GetImage | ( | ) |
ISkinObj * SImageWnd::GetSkin | ( | ) |
|
protectedvirtual |
测量内容大小
nParentWid | 父容器宽度 |
nParentHei | 父容器高度 |
Reimplemented from SWindow.
Definition at line 696 of file SCmnCtrl.cpp.
|
protectedvirtual |
|
protected |
|
protectedvirtual |
处理缩放变化事件
scale | 缩放比例 |
Reimplemented from SWindow.
Definition at line 716 of file SCmnCtrl.cpp.
|
inlineprotectedvirtual |
Reimplemented from SWindow.
Definition at line 498 of file SCmnCtrl.h.
BOOL SImageWnd::SetIcon | ( | int | nSubID | ) |
设置图标
nSubID | 子图在Skin中的索引号 |
Definition at line 685 of file SCmnCtrl.cpp.
void SImageWnd::SetImage | ( | IBitmapS * | pBitmap, |
FilterLevel | fl = kNone_FilterLevel ) |
BOOL SImageWnd::SetSkin | ( | ISkinObj * | pSkin, |
int | iFrame = 0, | ||
BOOL | bAutoFree = TRUE ) |
设置skin
pSkin | skin对象 |
iFrame | skin的子图索引 |
bAutoFree | 控件管理pSkin标志,为TRUE时调用方可以释放该Skin |
Definition at line 636 of file SCmnCtrl.cpp.
|
protected |
保持纵横比
Definition at line 496 of file SCmnCtrl.h.
|
protected |
是否要自动释放当前的m_pSkin对象
Definition at line 471 of file SCmnCtrl.h.
|
protected |
绘制图片的放大精度
Definition at line 491 of file SCmnCtrl.h.
|
protected |
绘制状态索引
Definition at line 476 of file SCmnCtrl.h.
|
protected |
绘制是否平铺, 0–位伸(默认),1–不变常规绘制, 2–平铺
Definition at line 466 of file SCmnCtrl.h.
|
protected |
使用代码设定的图片
Definition at line 486 of file SCmnCtrl.h.
|
protected |
ISkinObj对象
Definition at line 481 of file SCmnCtrl.h.