#include <UiCustomList.h>
继承自UiWin。
被UiCustomDragList继承.
公有成员 | |
| virtual int | CalcContentHeight () |
| 计算(返回)控件的内容总高度 | |
| virtual int | CalcContentTopPosV () |
| 计算(返回)控件的内容竖直方向的位置 | |
| virtual int | CalcIndexOfPos (int xPos, int yPos) |
| virtual int | CalcItemHeight (int index) |
| 获得(计算)某一项的高度。 | |
| virtual bool | CalcItemRect (int index, __in RECT *prcWin, __out RECT *pRect) |
| 计算某一项的矩形 | |
| virtual int | CalcItemTopPos (int index) |
| int | CalcTotalItemsHeight () |
| 返回所有项的总高度 | |
| ItemAttribute | CreateItemAttribute (UINT itemType) |
| virtual void | DrawItem (HDC hdcDst, int nIndex, RECT *prcItem, RECT *prcWin, RECT *prcUpdate) |
| void | EnableGridlines (bool bEnable) |
| 启用、关闭列表线的绘制 | |
| void | EnableInsideScroll (bool bEnable) |
| void | EnablePartitionMultiSelect (bool bEnable) |
| 是否启用点击多选按钮区域才选中 | |
| void | EnableSelectBg (bool bEnable) |
| 设置是否画选择背景 | |
| void | EnableUltraGridlines (bool bEnable) |
| 启用、关闭额外列表线的绘制. 启用后,即使项的数量不足以填满整个控件区域,表格线仍然会绘制被整个控件区域。 | |
| void | EnableVaryItemHeight (bool bEnable) |
| 启用、关闭“不同项高度”支持,即每一项的高度都可以不同。 | |
| IItemCollection * | GetCustomItemCollection () |
| BOOL | GetExtendedProperty_UiList (int nPropertyType, void *pValue, int nBufSize) |
| 获取或设置对象的扩展属性值 | |
| bool | GetFirstImageRect (ItemAttribute itemAttr, int index, __in RECT rcItem, __out RECT *pRcImg) |
| 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 () |
| UINT | GetGridlineType () |
| UINT | GetGridlineType_Highlight () |
| virtual ItemAttribute | GetItemAttribute () |
| virtual ItemAttribute | GetItemAttribute_Del () |
| virtual ItemAttribute | GetItemAttribute_mulSelect () |
| virtual int | GetItemCount () |
| 获得列表项的总数 | |
| int | GetItemHeight () |
| 获得m_nItemHeight 的值 | |
| ItemAttribute | GetListItemAttribute () |
| ItemAttribute | GetListItemAttribute_Del () |
| int | GetMinHeight () |
| CMouseTracker * | GetMouseTracker () |
| WORD | GetMultiSelectMode () |
| int | GetOriginOffset () |
| bool | GetSecondImageRect (ItemAttribute itemAttr, int index, __in RECT rcItem, __out RECT *pRcImg) |
| int | GetSelectedIndex () |
| UINT | GetSelectMode () |
| WORD | GetSplitLineMode () |
| bool | GetVisibleRange (int *nIndex, int *nCount) |
| void | InvalidateItem (int nIndex) |
| bool | IsEnableInsideScroll () |
| bool | IsEnableSelectBg () |
| bool | IsEnableVaryItemHeight () |
| 是否启用了“不同项高度”支持 | |
| bool | IsGridlinesEnabled () |
| virtual bool | IsPointInDeleteRect (int index, int xPos, int yPos) |
| 点(xPos,yPos)是否在index项的删除按钮内.仅当启用EnableDragDelete时有效 | |
| virtual bool | IsPointInFirstImage (int index, int xPos, int yPos) |
| virtual bool | IsPointInSecondImage (int index, int xPos, int yPos) |
| bool | IsUltraGridlinesEnabled () |
| void | MoveTopPos (int nOffset) |
| 移动内容顶部位置 | |
| virtual void | OnDrawDeleteBg (HDC hdcDst, RECT *prcItem) |
| virtual int | OnDrawGradlines (HDC hdcDst, int nIndex, RECT *prcItem, bool bOuter=false, DWORD dwType=NULL) |
| virtual void | OnDrawItemBg (HDC hdcDst, int index, RECT *prcItem) |
| virtual void | OnDrawSelectedBg (HDC hdcDst, int nIndex, __inout RECT *prcSelect, __inout ItemAttribute *pItemAttr) |
| virtual int | OnLButtonDown (UINT fwKeys, int xPos, int yPos) |
| 当控件被左键按下时,此函数会被调用. | |
| virtual int | OnLButtonDown_DelControl (int index, UINT fwKeys, int xPos, int yPos) |
| virtual int | OnLButtonDown_FirstImage (int index, UINT fwKeys, int xPos, int yPos) |
| virtual int | OnLButtonDown_SecondImage (int index, 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 | OnPressedHoldTimeup () |
| 当 pressed-hold 结束时,此函数会被调用,可重载以自定义处理 | |
| virtual void | OnSelectItem (int index, UINT fwKeys, int xPos, int yPos) |
| 列表项被选中时,会调用此函数 | |
| virtual void | OnSetSpecialItem (int index, ItemAttribute *pItemAttr) |
| 重载此项用来设定自定义项的格式 | |
| virtual int | OnTimer (UINT_PTR nIDEvent) |
| 当Timer到达时,此函数会被调用. | |
| virtual void | PaintWin (HDC hdc, RECT *prcWin, RECT *prcUpdate) |
| 绘制控件 | |
| void | RevokeDeleteItem () |
| 撤销某项的删除状态 | |
| void | ScrollStart (double fScrollSpeed) |
| 开始滚动 | |
| void | ScrollStop () |
| 结束滚动 | |
| void | ScrollTo (int nScrollToType=UI_SCROLLTO_TOP, int nDstTopPos=0, bool bAnimate=true) |
| 滚动控件内容至某个位置 | |
| void | SetCustomItemCollection (IItemCollection *pCollection) |
| void | SetDeleteControl (UINT delControlType) |
| void | SetDeleteControl (ImagingHelper *pImgDelete) |
| void | SetDelTextColor (COLORREF color) |
| BOOL | SetExtendedProperty_UiList (int nPropertyType, void *pValue, int nBufSize) |
| 获取或设置对象的扩展属性值 | |
| void | SetGridlineColor_GradientBottomLeft (COLORREF clrGridline) |
| 设置列表线的渐变色(底部左边) | |
| void | SetGridlineColor_GradientBottomRight (COLORREF clrGridline) |
| 设置列表线的渐变色(底部中间) | |
| void | SetGridlineColor_GradientTopLeft (COLORREF clrGridline) |
| void | SetGridlineColor_GradientTopRight (COLORREF clrGridline) |
| 设置列表线的渐变色(顶部中间) | |
| void | SetGridlineType (UINT type) |
| void | SetGridlineType_Highlight (UINT type) |
| virtual void | SetItemAttribute (ItemAttribute &itemAttr) |
| 设置公共列表项样式的属性。 | |
| virtual void | SetItemAttribute (UINT itemType) |
| 设置公共列表项样式的属性。取值为UILISTEX_ITEMTYPE_DEFAULT等之一 | |
| virtual void | SetItemAttribute_Del (ItemAttribute &itemAttr) |
| 设置要删除的列表项样式的属性。 | |
| virtual void | SetItemAttribute_mulSelect (ItemAttribute &itemAttr) |
| 设置多选列表项样式的属性 | |
| void | SetItemHeight (int nHeight) |
| 设置列表项的默认高度 | |
| void | SetMinHeight (int height) |
| void | SetMultiSelectMode (WORD state=UILISTEX_MULTISELECT_CLOSE) |
| void | SetOriginOffset (int offset) |
| 设置当GetTopPos为零时,内容顶部与控件顶部的偏移值 | |
| void | SetSelectedIndex (int index) |
| 设置选中项: | |
| void | SetSelectMode (UINT mode) |
| 设置列表项被选择的模式,mode: UILISTEX_SELECT_DEL,UILISTEX_SELECT_DEL_PRESS,UILISTEX_SELECT_SEL之一 | |
| void | SetSplitLineMode (WORD mode=UILISTEX_SPLITLINE_NONE) |
| void | SetTopPos (int nTopPos) |
| 设置内容顶部位置 | |
| UiCustomList () | |
| virtual void | UpdateItemAttribute_Del () |
| virtual void | UpdateItemAttribute_mulSelect () |
| void | UpdateList () |
| ~UiCustomList () | |
保护属性 | |
| int | m_deletedItem |
| int | m_deleteTopPos |
| ImagingHelper * | m_pImgMultiNoSelected |
| 多选框未被选中图标 当列表启用多选功能时生效 | |
| ImagingHelper * | m_pImgMultiSelected |
| 多选框被选中图标 当列表启用多选功能时生效 | |
| UiCustomList::UiCustomList | ( | ) |
| UiCustomList::~UiCustomList | ( | ) |
| virtual int UiCustomList::CalcContentHeight | ( | ) | [virtual] |
计算(返回)控件的内容总高度
重载UiWin。
| virtual int UiCustomList::CalcContentTopPosV | ( | ) | [virtual] |
计算(返回)控件的内容竖直方向的位置
重载UiWin。
| virtual int UiCustomList::CalcIndexOfPos | ( | int | xPos, | |
| int | yPos | |||
| ) | [virtual] |
计算某个坐标所在的列表项的索引: 返回值: -1:无, >=0: 项索引
| virtual int UiCustomList::CalcItemHeight | ( | int | index | ) | [virtual] |
获得(计算)某一项的高度。
重载此函数以自定义每一项的高度. 此成员函数只当 UiList::IsEnableVaryItemHeight() 为true时被调用。
| index | >=0:返回指定项的高度 |
| virtual bool UiCustomList::CalcItemRect | ( | int | index, | |
| __in RECT * | prcWin, | |||
| __out RECT * | pRect | |||
| ) | [virtual] |
计算某一项的矩形
| virtual int UiCustomList::CalcItemTopPos | ( | int | index | ) | [virtual] |
| int UiCustomList::CalcTotalItemsHeight | ( | ) |
返回所有项的总高度
| ItemAttribute UiCustomList::CreateItemAttribute | ( | UINT | itemType | ) |
| virtual void UiCustomList::DrawItem | ( | HDC | hdcDst, | |
| int | nIndex, | |||
| RECT * | prcItem, | |||
| RECT * | prcWin, | |||
| RECT * | prcUpdate | |||
| ) | [virtual] |
被UiCustomDragList重载。
| void UiCustomList::EnableGridlines | ( | bool | bEnable | ) |
启用、关闭列表线的绘制
| void UiCustomList::EnableInsideScroll | ( | bool | bEnable | ) |
| void UiCustomList::EnablePartitionMultiSelect | ( | bool | bEnable | ) |
是否启用点击多选按钮区域才选中
| void UiCustomList::EnableSelectBg | ( | bool | bEnable | ) |
设置是否画选择背景
| void UiCustomList::EnableUltraGridlines | ( | bool | bEnable | ) |
启用、关闭额外列表线的绘制. 启用后,即使项的数量不足以填满整个控件区域,表格线仍然会绘制被整个控件区域。
| void UiCustomList::EnableVaryItemHeight | ( | bool | bEnable | ) |
| IItemCollection* UiCustomList::GetCustomItemCollection | ( | ) |
| BOOL UiCustomList::GetExtendedProperty_UiList | ( | int | nPropertyType, | |
| void * | pValue, | |||
| int | nBufSize | |||
| ) |
获取或设置对象的扩展属性值
| nPropertyType | 要获取或设置的属性类型 | |
| pValue | 要获取或设置的属性值的指针 | |
| nBufSize | pValue所指向的变量的size大小(单位: 字节) |
| bool UiCustomList::GetFirstImageRect | ( | ItemAttribute | itemAttr, | |
| int | index, | |||
| __in RECT | rcItem, | |||
| __out RECT * | pRcImg | |||
| ) |
| int UiCustomList::GetFirstVisibleItemIndex | ( | int & | nItemTopPos, | |
| RECT * | prcWin, | |||
| RECT * | prcUpdate | |||
| ) |
获得第一个可见项
获得第一个可见项
| nItemTopPos | 输出值,是第一个可见项的顶部与控件的顶部的相对偏移值 | |
| prcWin | 控件的矩形 |
| MZFC_INLINE COLORREF UiCustomList::GetGridlineColor_GradientBottomLeft | ( | ) |
| MZFC_INLINE COLORREF UiCustomList::GetGridlineColor_GradientBottomrRight | ( | ) |
| MZFC_INLINE COLORREF UiCustomList::GetGridlineColor_GradientTopLeft | ( | ) |
| MZFC_INLINE COLORREF UiCustomList::GetGridlineColor_GradientTopRight | ( | ) |
| UINT UiCustomList::GetGridlineType | ( | ) |
| UINT UiCustomList::GetGridlineType_Highlight | ( | ) |
| virtual ItemAttribute UiCustomList::GetItemAttribute | ( | ) | [virtual] |
| virtual ItemAttribute UiCustomList::GetItemAttribute_Del | ( | ) | [virtual] |
| virtual ItemAttribute UiCustomList::GetItemAttribute_mulSelect | ( | ) | [virtual] |
| virtual int UiCustomList::GetItemCount | ( | ) | [virtual] |
获得列表项的总数
| int UiCustomList::GetItemHeight | ( | ) |
获得m_nItemHeight 的值
| ItemAttribute UiCustomList::GetListItemAttribute | ( | ) |
| ItemAttribute UiCustomList::GetListItemAttribute_Del | ( | ) |
| int UiCustomList::GetMinHeight | ( | ) |
| CMouseTracker* UiCustomList::GetMouseTracker | ( | ) |
| WORD UiCustomList::GetMultiSelectMode | ( | ) |
| int UiCustomList::GetOriginOffset | ( | ) |
| bool UiCustomList::GetSecondImageRect | ( | ItemAttribute | itemAttr, | |
| int | index, | |||
| __in RECT | rcItem, | |||
| __out RECT * | pRcImg | |||
| ) |
| int UiCustomList::GetSelectedIndex | ( | ) |
获得选中项的索引: 返回值: -1:无, >=0: 项索引
| UINT UiCustomList::GetSelectMode | ( | ) |
| WORD UiCustomList::GetSplitLineMode | ( | ) |
| bool UiCustomList::GetVisibleRange | ( | int * | nIndex, | |
| int * | nCount | |||
| ) |
| void UiCustomList::InvalidateItem | ( | int | nIndex | ) |
无效某一项所在的区域. nIndex: 项的索引,大于小于零
| bool UiCustomList::IsEnableInsideScroll | ( | ) |
| bool UiCustomList::IsEnableSelectBg | ( | ) |
| bool UiCustomList::IsEnableVaryItemHeight | ( | ) |
是否启用了“不同项高度”支持
| bool UiCustomList::IsGridlinesEnabled | ( | ) |
| virtual bool UiCustomList::IsPointInDeleteRect | ( | int | index, | |
| int | xPos, | |||
| int | yPos | |||
| ) | [virtual] |
点(xPos,yPos)是否在index项的删除按钮内.仅当启用EnableDragDelete时有效
| virtual bool UiCustomList::IsPointInFirstImage | ( | int | index, | |
| int | xPos, | |||
| int | yPos | |||
| ) | [virtual] |
| virtual bool UiCustomList::IsPointInSecondImage | ( | int | index, | |
| int | xPos, | |||
| int | yPos | |||
| ) | [virtual] |
| bool UiCustomList::IsUltraGridlinesEnabled | ( | ) |
| void UiCustomList::MoveTopPos | ( | int | nOffset | ) | [virtual] |
移动内容顶部位置
重载UiWin。
| virtual void UiCustomList::OnDrawDeleteBg | ( | HDC | hdcDst, | |
| RECT * | prcItem | |||
| ) | [virtual] |
| virtual int UiCustomList::OnDrawGradlines | ( | HDC | hdcDst, | |
| int | nIndex, | |||
| RECT * | prcItem, | |||
| bool | bOuter = false, |
|||
| DWORD | dwType = NULL | |||
| ) | [virtual] |
| virtual void UiCustomList::OnDrawItemBg | ( | HDC | hdcDst, | |
| int | index, | |||
| RECT * | prcItem | |||
| ) | [virtual] |
| virtual void UiCustomList::OnDrawSelectedBg | ( | HDC | hdcDst, | |
| int | nIndex, | |||
| __inout RECT * | prcSelect, | |||
| __inout ItemAttribute * | pItemAttr | |||
| ) | [virtual] |
| virtual int UiCustomList::OnLButtonDown | ( | UINT | fwKeys, | |
| int | xPos, | |||
| int | yPos | |||
| ) | [virtual] |
| virtual int UiCustomList::OnLButtonDown_DelControl | ( | int | index, | |
| UINT | fwKeys, | |||
| int | xPos, | |||
| int | yPos | |||
| ) | [virtual] |
| virtual int UiCustomList::OnLButtonDown_FirstImage | ( | int | index, | |
| UINT | fwKeys, | |||
| int | xPos, | |||
| int | yPos | |||
| ) | [virtual] |
| virtual int UiCustomList::OnLButtonDown_SecondImage | ( | int | index, | |
| UINT | fwKeys, | |||
| int | xPos, | |||
| int | yPos | |||
| ) | [virtual] |
| virtual int UiCustomList::OnLButtonUp | ( | UINT | fwKeys, | |
| int | xPos, | |||
| int | yPos | |||
| ) | [virtual] |
| virtual int UiCustomList::OnMouseMove | ( | UINT | fwKeys, | |
| int | xPos, | |||
| int | yPos | |||
| ) | [virtual] |
| virtual void UiCustomList::OnPressedHoldTimeup | ( | ) | [virtual] |
当 pressed-hold 结束时,此函数会被调用,可重载以自定义处理
重载UiWin。
| virtual void UiCustomList::OnSelectItem | ( | int | index, | |
| UINT | fwKeys, | |||
| int | xPos, | |||
| int | yPos | |||
| ) | [virtual] |
列表项被选中时,会调用此函数
| virtual void UiCustomList::OnSetSpecialItem | ( | int | index, | |
| ItemAttribute * | pItemAttr | |||
| ) | [virtual] |
重载此项用来设定自定义项的格式
| virtual int UiCustomList::OnTimer | ( | UINT_PTR | nIDEvent | ) | [virtual] |
| virtual void UiCustomList::PaintWin | ( | HDC | hdcDst, | |
| RECT * | prcWin, | |||
| RECT * | prcUpdate | |||
| ) | [virtual] |
绘制控件
重载此函数可以自定义控件的绘制
| hdcDst | 目的DC | |
| prcWin | 控件所在区域(以HDC的左上角为原点) | |
| prcUpdate | 需要更新的区域(以HDC的左上角为原点) |
重载UiWin。
被UiCustomDragList重载。
| void UiCustomList::RevokeDeleteItem | ( | ) |
撤销某项的删除状态
| void UiCustomList::ScrollStart | ( | double | fScrollSpeed | ) | [virtual] |
开始滚动
重载UiWin。
| void UiCustomList::ScrollStop | ( | ) | [virtual] |
结束滚动
重载UiWin。
| void UiCustomList::ScrollTo | ( | int | nScrollToType = UI_SCROLLTO_TOP, |
|
| int | nDstTopPos = 0, |
|||
| bool | bAnimate = true | |||
| ) | [virtual] |
滚动控件内容至某个位置
| nScrollToType | UI_SCROLLTO_TOP, UI_SCROLLTO_BOTTOM, UI_SCROLLTO_POS | |
| nDstTopPos | 目的位置,只当 nScrollToType==UI_SCROLLTO_POS 时有效 | |
| bAnimate | 是否显示滚动过程 |
重载UiWin。
| void UiCustomList::SetCustomItemCollection | ( | IItemCollection * | pCollection | ) |
| void UiCustomList::SetDeleteControl | ( | UINT | delControlType | ) |
| void UiCustomList::SetDeleteControl | ( | ImagingHelper * | pImgDelete | ) |
| void UiCustomList::SetDelTextColor | ( | COLORREF | color | ) |
| BOOL UiCustomList::SetExtendedProperty_UiList | ( | int | nPropertyType, | |
| void * | pValue, | |||
| int | nBufSize | |||
| ) |
获取或设置对象的扩展属性值
| nPropertyType | 要获取或设置的属性类型 | |
| pValue | 要设置的属性值的指针 | |
| nBufSize | pValue所指向的变量的size大小(单位: 字节) |
| void UiCustomList::SetGridlineColor_GradientBottomLeft | ( | COLORREF | clrGridline | ) |
设置列表线的渐变色(底部左边)
| void UiCustomList::SetGridlineColor_GradientBottomRight | ( | COLORREF | clrGridline | ) |
设置列表线的渐变色(底部中间)
| void UiCustomList::SetGridlineColor_GradientTopLeft | ( | COLORREF | clrGridline | ) |
旧UI,不再使用 设置列表线的渐变色(顶部左边)
| void UiCustomList::SetGridlineColor_GradientTopRight | ( | COLORREF | clrGridline | ) |
设置列表线的渐变色(顶部中间)
| void UiCustomList::SetGridlineType | ( | UINT | type | ) |
新UI 新UI 定制表格线样式. type取值UILISTEX_GRIDLINE_TYPE_NORMAL,UILISTEX_GRIDLINE_TYPE_IMAGE之一
| void UiCustomList::SetGridlineType_Highlight | ( | UINT | type | ) |
| virtual void UiCustomList::SetItemAttribute | ( | ItemAttribute & | itemAttr | ) | [virtual] |
设置公共列表项样式的属性。
| virtual void UiCustomList::SetItemAttribute | ( | UINT | itemType | ) | [virtual] |
设置公共列表项样式的属性。取值为UILISTEX_ITEMTYPE_DEFAULT等之一
| virtual void UiCustomList::SetItemAttribute_Del | ( | ItemAttribute & | itemAttr | ) | [virtual] |
设置要删除的列表项样式的属性。
| virtual void UiCustomList::SetItemAttribute_mulSelect | ( | ItemAttribute & | itemAttr | ) | [virtual] |
设置多选列表项样式的属性
| void UiCustomList::SetItemHeight | ( | int | nHeight | ) |
设置列表项的默认高度
| void UiCustomList::SetMinHeight | ( | int | height | ) |
新方法
| void UiCustomList::SetMultiSelectMode | ( | WORD | state = UILISTEX_MULTISELECT_CLOSE |
) |
| void UiCustomList::SetOriginOffset | ( | int | offset | ) |
设置当GetTopPos为零时,内容顶部与控件顶部的偏移值
| void UiCustomList::SetSelectedIndex | ( | int | index | ) |
设置选中项:
| void UiCustomList::SetSelectMode | ( | UINT | mode | ) |
设置列表项被选择的模式,mode: UILISTEX_SELECT_DEL,UILISTEX_SELECT_DEL_PRESS,UILISTEX_SELECT_SEL之一
| void UiCustomList::SetSplitLineMode | ( | WORD | mode = UILISTEX_SPLITLINE_NONE |
) |
| void UiCustomList::SetTopPos | ( | int | nTopPos | ) | [virtual] |
设置内容顶部位置
重载UiWin。
| virtual void UiCustomList::UpdateItemAttribute_Del | ( | ) | [virtual] |
| virtual void UiCustomList::UpdateItemAttribute_mulSelect | ( | ) | [virtual] |
| void UiCustomList::UpdateList | ( | ) |
int UiCustomList::m_deletedItem [protected] |
int UiCustomList::m_deleteTopPos [protected] |
ImagingHelper* UiCustomList::m_pImgMultiNoSelected [protected] |
多选框未被选中图标 当列表启用多选功能时生效
ImagingHelper* UiCustomList::m_pImgMultiSelected [protected] |
多选框被选中图标 当列表启用多选功能时生效
1.6.1