UiList_2类参考

List control 更多...

#include <UiList_2.h>

继承自UiWin

所有成员的列表。

公有成员

void AddItem (ListItem &item)
 add an item to the list
virtual int CalcIndexOfPos (int xPos, int yPos)
virtual int CalcItemHeight (int index)
virtual bool CalcItemRect (int index, __in RECT *prcWin, __out RECT *pRect)
 calc and get the item's rectangle
int CalcTotalItemsHeight ()
 get all items' height
virtual void DrawItem (HDC hdcDst, int nIndex, RECT *prcItem, RECT *prcWin, RECT *prcUpdate)
 called when an item needed to be drawn. override to do owner drawings.
void EnableGridlines (bool bEnable)
 Enable grid lines drawings
void EnableUltraGridlines (bool bEnable)
 Enable ultra grid lines. even when items are not enough to full fill the control, grid lines will full fill the control)
void EnableVaryItemHeight (bool bEnable)
 Enable that items could have different item-height
int GetFirstVisibleItemIndex (int &nItemTopPos, RECT *prcWin, RECT *prcUpdate)
MZFC_INLINE COLORREF GetGridlineColor_GradientBottomLeft ()
MZFC_INLINE COLORREF GetGridlineColor_GradientBottomrRight ()
MZFC_INLINE COLORREF GetGridlineColor_GradientTopLeft ()
MZFC_INLINE COLORREF GetGridlineColor_GradientTopRight ()
ListItemGetItem (int index)
 Get an item
virtual int GetItemCount ()
 get total count of items
int GetMinHeight ()
int GetOriginOffset ()
int GetSelectedIndex ()
bool GetVisibleRange (int *nIndex, int *nCount, RECT *prcWin, RECT *prcUpdate)
void InsertItem (ListItem &item, int nPos=-1)
 insert an item to the list: nPos: 0:front, -1:last
void InvalidateItem (int nIndex)
bool IsEnableVaryItemHeight ()
 Is Enable that items could have different item-height
bool IsGridlinesEnabled ()
bool IsUltraGridlinesEnabled ()
virtual int OnLButtonDown (UINT fwKeys, int xPos, int yPos)
 mouse message handlers
virtual int OnLButtonUp (UINT fwKeys, int xPos, int yPos)
 called when the mouse left button is is released on the control
virtual int OnMouseMove (UINT fwKeys, int xPos, int yPos)
 called when the control has mouse move message.
virtual void OnRemoveItem (int nIndex)
 called when an item is to be removed
virtual void OnSelectItem (int nIndex, UINT fwKeys, int xPos, int yPos)
 called when an item is set selected
void PaintWin (HDC hdc, RECT *prcWin, RECT *prcUpdate)
 Draw the control on the destinate DC.
void RemoveAll ()
 remove all items of the list
void RemoveItem (int nIndex)
 remove an item of the list
void SetGridlineColor_GradientBottomLeft (COLORREF clrGridline)
 set color of bottom the grid line's left gradient
void SetGridlineColor_GradientBottomRight (COLORREF clrGridline)
 set color of bottom the grid line's middle gradient
void SetGridlineColor_GradientTopLeft (COLORREF clrGridline)
 set color of top the grid line's left gradient
void SetGridlineColor_GradientTopRight (COLORREF clrGridline)
 set color of top the grid line's middle gradient
void SetItemHeight (int nHeight)
 set item height
void SetMinHeight (int nHeight)
void SetOriginOffset (int offset)
 the offset of the content top position to the control's origin
void SetSelectedIndex (int index)
 set the selected item:
 UiList_2 (void)
void UpdateList ()
 update the list's height (when items are changed, you should call this member to update the list control's height)
 ~UiList_2 (void)

保护属性

bool m_bEnableVaryItemHeight
bool m_bIsInDragH
bool m_bIsVertDragDisabled
bool m_bMouseDown
ListItems m_Items
 items of the list
int m_nItemHeight
int m_nOriginOffset
int m_nSelectedIndex


详细描述

List control

构造及析构函数文档

UiList_2::UiList_2 ( void   ) 

UiList_2::~UiList_2 ( void   ) 


成员函数文档

void UiList_2::AddItem ( ListItem item  ) 

add an item to the list

operations to items

virtual int UiList_2::CalcIndexOfPos ( int  xPos,
int  yPos 
) [virtual]

calc and get the index of item of a specify position relative to the control: return: -1: none

virtual int UiList_2::CalcItemHeight ( int  index  )  [virtual]

get the specify item's height override to redefine the item's height. index: -1:return the default height of items; >=0:return the item's height this member will be called when IsEnableVaryItemHeight() is true

virtual bool UiList_2::CalcItemRect ( int  index,
__in RECT *  prcWin,
__out RECT *  pRect 
) [virtual]

calc and get the item's rectangle

int UiList_2::CalcTotalItemsHeight (  ) 

get all items' height

virtual void UiList_2::DrawItem ( HDC  hdcDst,
int  nIndex,
RECT *  prcItem,
RECT *  prcWin,
RECT *  prcUpdate 
) [virtual]

called when an item needed to be drawn. override to do owner drawings.

void UiList_2::EnableGridlines ( bool  bEnable  ) 

Enable grid lines drawings

void UiList_2::EnableUltraGridlines ( bool  bEnable  ) 

Enable ultra grid lines. even when items are not enough to full fill the control, grid lines will full fill the control)

void UiList_2::EnableVaryItemHeight ( bool  bEnable  ) 

Enable that items could have different item-height

int UiList_2::GetFirstVisibleItemIndex ( int &  nItemTopPos,
RECT *  prcWin,
RECT *  prcUpdate 
)

MZFC_INLINE COLORREF UiList_2::GetGridlineColor_GradientBottomLeft (  ) 

MZFC_INLINE COLORREF UiList_2::GetGridlineColor_GradientBottomrRight (  ) 

MZFC_INLINE COLORREF UiList_2::GetGridlineColor_GradientTopLeft (  ) 

MZFC_INLINE COLORREF UiList_2::GetGridlineColor_GradientTopRight (  ) 

ListItem* UiList_2::GetItem ( int  index  ) 

Get an item

virtual int UiList_2::GetItemCount (  )  [virtual]

get total count of items

int UiList_2::GetMinHeight (  ) 

int UiList_2::GetOriginOffset (  ) 

int UiList_2::GetSelectedIndex (  ) 

get the selected item: return: -1:none, >=0: index of selected item

bool UiList_2::GetVisibleRange ( int *  nIndex,
int *  nCount,
RECT *  prcWin,
RECT *  prcUpdate 
)

void UiList_2::InsertItem ( ListItem item,
int  nPos = -1 
)

insert an item to the list: nPos: 0:front, -1:last

void UiList_2::InvalidateItem ( int  nIndex  ) 

invalidate an item's rect. nIndex: the index of the item, >=0

bool UiList_2::IsEnableVaryItemHeight (  ) 

Is Enable that items could have different item-height

bool UiList_2::IsGridlinesEnabled (  ) 

bool UiList_2::IsUltraGridlinesEnabled (  ) 

virtual int UiList_2::OnLButtonDown ( UINT  fwKeys,
int  xPos,
int  yPos 
) [virtual]

mouse message handlers

重载UiWin

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

called when the mouse left button is is released on the control

重载UiWin

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

called when the control has mouse move message.

重载UiWin

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

called when an item is to be removed

virtual void UiList_2::OnSelectItem ( int  nIndex,
UINT  fwKeys,
int  xPos,
int  yPos 
) [virtual]

called when an item is set selected

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

Draw the control on the destinate DC.

Override this member function to define your own drawings of the control

参数:
hdcDst Destinate device contact
prcWin The Rect of the control(hdc 's left-top is the origin)
prcUpdate Rect of the hdc that need to be update(hdc 's left-top is the origin)

重载UiWin

void UiList_2::RemoveAll (  ) 

remove all items of the list

void UiList_2::RemoveItem ( int  nIndex  ) 

remove an item of the list

void UiList_2::SetGridlineColor_GradientBottomLeft ( COLORREF  clrGridline  ) 

set color of bottom the grid line's left gradient

void UiList_2::SetGridlineColor_GradientBottomRight ( COLORREF  clrGridline  ) 

set color of bottom the grid line's middle gradient

void UiList_2::SetGridlineColor_GradientTopLeft ( COLORREF  clrGridline  ) 

set color of top the grid line's left gradient

void UiList_2::SetGridlineColor_GradientTopRight ( COLORREF  clrGridline  ) 

set color of top the grid line's middle gradient

void UiList_2::SetItemHeight ( int  nHeight  ) 

set item height

void UiList_2::SetMinHeight ( int  nHeight  ) 

void UiList_2::SetOriginOffset ( int  offset  ) 

the offset of the content top position to the control's origin

void UiList_2::SetSelectedIndex ( int  index  ) 

set the selected item:

void UiList_2::UpdateList (  ) 

update the list's height (when items are changed, you should call this member to update the list control's height)


成员数据文档

bool UiList_2::m_bIsInDragH [protected]

重载UiWin

重载UiWin

bool UiList_2::m_bMouseDown [protected]

items of the list

int UiList_2::m_nItemHeight [protected]

int UiList_2::m_nOriginOffset [protected]

int UiList_2::m_nSelectedIndex [protected]


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

Generated at Fri Feb 20 15:17:30 2009 for Meizu M8 MZFC Documentation by 魅族手机