1#ifndef __SLISTVIEWITEMLOCATOR__H__
2#define __SLISTVIEWITEMLOCATOR__H__
4#include "interface/SListViewItemLocator-i.h"
27 STDMETHOD_(
void,
SetAdapter)(THIS_ ILvAdapter *pAdapter) OVERRIDE;
40 STDMETHOD_(BOOL, IsFixHeight)(THIS) SCONST OVERRIDE;
47 STDMETHOD_(
int, GetItemHeight)(THIS_
int iItem) SCONST OVERRIDE;
54 STDMETHOD_(
void, SetItemHeight)(THIS_
int iItem,
int nHeight) OVERRIDE;
60 STDMETHOD_(
int, GetTotalHeight)(THIS) OVERRIDE;
67 STDMETHOD_(
int, Item2Position)(THIS_
int iItem) OVERRIDE;
74 STDMETHOD_(
int, Position2Item)(THIS_
int position) OVERRIDE;
80 STDMETHOD_(
int, GetScrollLineSize)(THIS) SCONST OVERRIDE;
86 STDMETHOD_(
int, GetDividerSize)(THIS) SCONST OVERRIDE;
92 STDMETHOD_(
void, SetScale)(THIS_
int nScale) OVERRIDE;
99 int GetFixItemHeight()
const;
129 STDMETHOD_(
void,
SetAdapter)(THIS_ ILvAdapter *pAdapter) OVERRIDE;
140 STDMETHOD_(BOOL,
IsFixHeight)(THIS) SCONST OVERRIDE;
147 STDMETHOD_(
int,
GetItemHeight)(THIS_
int iItem) SCONST OVERRIDE;
154 STDMETHOD_(
void,
SetItemHeight)(THIS_
int iItem,
int nHeight) OVERRIDE;
192 STDMETHOD_(
void,
SetScale)(THIS_
int nScale) OVERRIDE;
201 void InitIndex(HSTREEITEM hParent,
int nItems,
int nSubBranchSize);
Tree template for general data types.
Template class for a tree structure.
Smart pointer class for managing COM-style reference-counted objects.
void OnDataSetChanged() OVERRIDE
数据集发生变化时调用
SListViewItemLocatorFix(SLayoutSize nItemHei, SLayoutSize nDividerSize=SLayoutSize())
构造函数
SAutoRefPtr< ILvAdapter > m_adapter
列表适配器对象指针
void SetAdapter(ILvAdapter *pAdapter) OVERRIDE
设置适配器
SLayoutSize m_nDividerSize
分隔符的高度
SLayoutSize m_nItemHeight
每个项的高度
SegmentInfo(int nItems, HSTREEITEM hBranch)
构造函数
int * pItemHeight
段中每一个项的高度
int GetDividerSize() SCONST OVERRIDE
获取分隔符大小
SAutoRefPtr< ILvAdapter > m_adapter
列表适配器对象指针
void SetAdapter(ILvAdapter *pAdapter) OVERRIDE
设置适配器
SListViewItemLocatorFlex(SLayoutSize nItemHei, SLayoutSize nDividerSize=SLayoutSize())
构造函数
void InitIndex(HSTREEITEM hParent, int nItems, int nSubBranchSize)
初始化索引
int Position2Item(int position) OVERRIDE
将位置转换为项索引
int GetIndexDeep() const
获取索引深度
BOOL IsFixHeight() SCONST OVERRIDE
检查是否为固定高度
SLayoutSize m_nItemHeight
每个项的高度
int Item2Position(int iItem) OVERRIDE
将项索引转换为位置
int GetTotalHeight() OVERRIDE
获取总高度
int Branch2Offset(HSTREEITEM hBranch) const
将分支转换为偏移量
void OnDataSetChanged() OVERRIDE
数据集发生变化时调用
int GetFixItemHeight() const
获取固定项的高度
HSTREEITEM Offset2Branch(HSTREEITEM hParent, int nOffset)
将偏移量转换为分支
SArray< SegmentInfo * > m_segments
段信息数组
void SetItemHeight(int iItem, int nHeight) OVERRIDE
设置指定项的高度
SLayoutSize m_nDividerSize
分隔符的高度
void SetScale(int nScale) OVERRIDE
设置缩放比例
int GetScrollLineSize() SCONST OVERRIDE
获取滚动行大小
int Branch2Index(HSTREEITEM hBranch) const
将分支转换为索引
CSTree< BranchInfo > m_itemPosIndex
记录分支高度
int GetItemHeight(int iItem) SCONST OVERRIDE
获取指定项的高度
int nBranchSize
分支中包含的节点数量