UiWheel类参考

滚轮控件 更多...

#include <UiWheel.h>

继承自UiWin

所有成员的列表。

公有成员

void AddItem (WheelItem &item)
 添加项目
void AddItem (LPCTSTR strItem)
 添加项目
virtual void DrawItem (HDC hdcDst, int nIndex, RECT *prcItem)
void EnableGridlines (bool bEnable)
WheelItemGetItem (int nIndex)
int GetItemCount ()
int GetItemHeight ()
LPCTSTR GetItemText (int nIndex)
int GetRoadLength ()
int GetSelectedIndex ()
int GetWheelMode ()
void InsertItem (WheelItem &item, int nPos=-1)
 插入项: nPos: 0最前,-1最后
bool IsGridlinesEnabled ()
virtual int OnLButtonDown (UINT fwKeys, int xPos, int yPos)
 当控件被左键按下时,此函数会被调用.
virtual int OnLButtonUp (UINT fwKeys, int xPos, int yPos)
 当控件被左键放开时,此函数会被调用.
virtual int OnMouseMove (UINT fwKeys, int xPos, int yPos)
 当控件上鼠标移动时,此函数会被调用.
virtual void OnRemoveItem (int nIndex)
int OnTimer (UINT_PTR nIDEvent)
 当Timer到达时,此函数会被调用.
void PaintWin (HDC hdc, RECT *prcWin, RECT *prcUpdate)
 绘制控件
void RemoveAll ()
 删除所有的项
void RemoveItem (int nIndex)
 删除项
void ScrollStart (double fScrollSpeed)
 开始滚动
void ScrollStop ()
 结束滚动
void SetItemHeight (int nHeight)
void SetSelectedIndex (int nIndex)
void SetSelectedItemTextColor (COLORREF clr)
void SetWheelMode (int nWheelMode)
 设置滚轮的运动模式, ( UI_WHEEL_MODE_NORMAL , UI_WHEEL_MODE_SPRING )
 UiWheel (void)
 ~UiWheel (void)

详细描述

滚轮控件


构造及析构函数文档

UiWheel::UiWheel ( void   ) 
UiWheel::~UiWheel ( void   ) 

成员函数文档

void UiWheel::AddItem ( WheelItem item  ) 

添加项目

void UiWheel::AddItem ( LPCTSTR  strItem  ) 

添加项目

virtual void UiWheel::DrawItem ( HDC  hdcDst,
int  nIndex,
RECT *  prcItem 
) [virtual]
void UiWheel::EnableGridlines ( bool  bEnable  ) 
WheelItem* UiWheel::GetItem ( int  nIndex  ) 
int UiWheel::GetItemCount (  ) 
int UiWheel::GetItemHeight (  ) 
LPCTSTR UiWheel::GetItemText ( int  nIndex  ) 
int UiWheel::GetRoadLength (  ) 
int UiWheel::GetSelectedIndex (  ) 
int UiWheel::GetWheelMode (  ) 
void UiWheel::InsertItem ( WheelItem item,
int  nPos = -1 
)

插入项: nPos: 0最前,-1最后

bool UiWheel::IsGridlinesEnabled (  ) 
virtual int UiWheel::OnLButtonDown ( UINT  fwKeys,
int  xPos,
int  yPos 
) [virtual]

当控件被左键按下时,此函数会被调用.

重载UiWin

virtual int UiWheel::OnLButtonUp ( UINT  fwKeys,
int  xPos,
int  yPos 
) [virtual]

当控件被左键放开时,此函数会被调用.

重载UiWin

virtual int UiWheel::OnMouseMove ( UINT  fwKeys,
int  xPos,
int  yPos 
) [virtual]

当控件上鼠标移动时,此函数会被调用.

重载UiWin

virtual void UiWheel::OnRemoveItem ( int  nIndex  )  [virtual]

假如你重载了此函数,则必须在你的派生列表类的析构函数中调用RemoveAll(),这样才能保证OnRemoveItem被调用。 此虚函数在删除项之前会被调用 nIndex==-1:表示将要删除全部的项 nIndex>=0: 表示将要删除的项的索引

int UiWheel::OnTimer ( UINT_PTR  nIDEvent  )  [virtual]

当Timer到达时,此函数会被调用.

重载UiWin

void UiWheel::PaintWin ( HDC  hdcDst,
RECT *  prcWin,
RECT *  prcUpdate 
) [virtual]

绘制控件

重载此函数可以自定义控件的绘制

参数:
hdcDst 目的DC
prcWin 控件所在区域(以HDC的左上角为原点)
prcUpdate 需要更新的区域(以HDC的左上角为原点)

重载UiWin

void UiWheel::RemoveAll (  ) 

删除所有的项

void UiWheel::RemoveItem ( int  nIndex  ) 

删除项

void UiWheel::ScrollStart ( double  fScrollSpeed  )  [virtual]

开始滚动

重载UiWin

void UiWheel::ScrollStop (  )  [virtual]

结束滚动

重载UiWin

void UiWheel::SetItemHeight ( int  nHeight  ) 
void UiWheel::SetSelectedIndex ( int  nIndex  ) 
void UiWheel::SetSelectedItemTextColor ( COLORREF  clr  ) 
void UiWheel::SetWheelMode ( int  nWheelMode  ) 

设置滚轮的运动模式, ( UI_WHEEL_MODE_NORMAL , UI_WHEEL_MODE_SPRING )


该类的文档由以下文件生成:

Generated at Tue Feb 9 15:10:03 2010 for Meizu M8 SDK Documentation by  doxygen 1.6.1