可变高度的列表视图项定位器 More...
#include <SListViewItemLocator.h>
Classes | |
| struct | BranchInfo |
| 分支信息结构 More... | |
| class | SegmentInfo |
| 段信息类 More... | |
Public Member Functions | |
| SListViewItemLocatorFlex (SLayoutSize nItemHei, SLayoutSize nDividerSize=SLayoutSize()) | |
| 构造函数 | |
| ~SListViewItemLocatorFlex () | |
| 析构函数 | |
| void | SetAdapter (ILvAdapter *pAdapter) OVERRIDE |
| 设置适配器 | |
| void | OnDataSetChanged () OVERRIDE |
| 数据集发生变化时调用 | |
| BOOL | IsFixHeight () SCONST OVERRIDE |
| 检查是否为固定高度 | |
| int | GetItemHeight (int iItem) SCONST OVERRIDE |
| 获取指定项的高度 | |
| void | SetItemHeight (int iItem, int nHeight) OVERRIDE |
| 设置指定项的高度 | |
| int | GetTotalHeight () OVERRIDE |
| 获取总高度 | |
| int | Item2Position (int iItem) OVERRIDE |
| 将项索引转换为位置 | |
| int | Position2Item (int position) OVERRIDE |
| 将位置转换为项索引 | |
| int | GetScrollLineSize () SCONST OVERRIDE |
| 获取滚动行大小 | |
| int | GetDividerSize () SCONST OVERRIDE |
| 获取分隔符大小 | |
| void | SetScale (int nScale) OVERRIDE |
| 设置缩放比例 | |
Public Member Functions inherited from TObjRefImpl< IListViewItemLocator > | |
| TObjRefImpl () | |
| Constructor that initializes the reference count to 1. | |
| virtual | ~TObjRefImpl () |
| Virtual destructor. | |
| long | AddRef () override |
| Increments the reference count. | |
| long | Release () override |
| Decrements the reference count and deletes the object if the count reaches zero. | |
| void | OnFinalRelease () override |
| Deletes the object. | |
Protected Member Functions | |
| void | InitIndex (HSTREEITEM hParent, int nItems, int nSubBranchSize) |
| 初始化索引 | |
| int | GetFixItemHeight () const |
| 获取固定项的高度 | |
| int | GetIndexDeep () const |
| 获取索引深度 | |
| void | Clear () |
| 清除索引 | |
| int | Branch2Offset (HSTREEITEM hBranch) const |
| 将分支转换为偏移量 | |
| int | Branch2Index (HSTREEITEM hBranch) const |
| 将分支转换为索引 | |
| HSTREEITEM | Offset2Branch (HSTREEITEM hParent, int nOffset) |
| 将偏移量转换为分支 | |
Protected Attributes | |
| SLayoutSize | m_nItemHeight |
| 每个项的高度 | |
| SLayoutSize | m_nDividerSize |
| 分隔符的高度 | |
| int | m_nScale |
| 缩放比例 | |
| CSTree< BranchInfo > | m_itemPosIndex |
| 记录分支高度 | |
| SArray< SegmentInfo * > | m_segments |
| 段信息数组 | |
| SAutoRefPtr< ILvAdapter > | m_adapter |
| 列表适配器对象指针 | |
Protected Attributes inherited from TObjRefImpl< IListViewItemLocator > | |
| LONG | m_cRef |
| Reference count. | |
可变高度的列表视图项定位器
Definition at line 111 of file SListViewItemLocator.h.
| SListViewItemLocatorFlex::SListViewItemLocatorFlex | ( | SLayoutSize | nItemHei, |
| SLayoutSize | nDividerSize = SLayoutSize() ) |
构造函数
| nItemHei | 每个项的高度 |
| nDividerSize | 分隔符的高度(默认为0) |
Definition at line 93 of file SListViewItemLocator.cpp.
| SListViewItemLocatorFlex::~SListViewItemLocatorFlex | ( | ) |
析构函数
Definition at line 100 of file SListViewItemLocator.cpp.
|
protected |
|
protected |
将分支转换为偏移量
| hBranch | 分支句柄 |
Definition at line 295 of file SListViewItemLocator.cpp.
|
protected |
清除索引
Definition at line 285 of file SListViewItemLocator.cpp.
| int SListViewItemLocatorFlex::GetDividerSize | ( | ) |
|
protected |
|
protected |
| int SListViewItemLocatorFlex::GetItemHeight | ( | int | iItem | ) |
| int SListViewItemLocatorFlex::GetScrollLineSize | ( | ) |
| int SListViewItemLocatorFlex::GetTotalHeight | ( | ) |
|
protected |
初始化索引
| hParent | 父项句柄 |
| nItems | 项数量 |
| nSubBranchSize | 子分支大小 |
Definition at line 245 of file SListViewItemLocator.cpp.
| BOOL SListViewItemLocatorFlex::IsFixHeight | ( | ) |
| int SListViewItemLocatorFlex::Item2Position | ( | int | iItem | ) |
|
protected |
将偏移量转换为分支
| hParent | 父项句柄 |
| nOffset | 偏移量 |
Definition at line 329 of file SListViewItemLocator.cpp.
| void SListViewItemLocatorFlex::OnDataSetChanged | ( | ) |
数据集发生变化时调用
Definition at line 231 of file SListViewItemLocator.cpp.
| int SListViewItemLocatorFlex::Position2Item | ( | int | position | ) |
| void SListViewItemLocatorFlex::SetAdapter | ( | ILvAdapter * | pAdapter | ) |
| void SListViewItemLocatorFlex::SetItemHeight | ( | int | iItem, |
| int | nHeight ) |
| void SListViewItemLocatorFlex::SetScale | ( | int | nScale | ) |
|
protected |
列表适配器对象指针
Definition at line 292 of file SListViewItemLocator.h.
|
protected |
记录分支高度
Definition at line 256 of file SListViewItemLocator.h.
|
protected |
分隔符的高度
Definition at line 243 of file SListViewItemLocator.h.
|
protected |
每个项的高度
Definition at line 242 of file SListViewItemLocator.h.
|
protected |
缩放比例
Definition at line 244 of file SListViewItemLocator.h.
|
protected |
段信息数组
Definition at line 291 of file SListViewItemLocator.h.