soui 5.0.0.1
Soui5 Doc
 
Loading...
Searching...
No Matches
SListViewItemLocatorFlex Class Reference

可变高度的列表视图项定位器 More...

#include <SListViewItemLocator.h>

Inheritance diagram for SListViewItemLocatorFlex:
TObjRefImpl< IListViewItemLocator >

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< BranchInfom_itemPosIndex
 记录分支高度
 
SArray< SegmentInfo * > m_segments
 段信息数组
 
SAutoRefPtr< ILvAdapter > m_adapter
 列表适配器对象指针
 
- Protected Attributes inherited from TObjRefImpl< IListViewItemLocator >
LONG m_cRef
 Reference count.
 

Detailed Description

可变高度的列表视图项定位器

Definition at line 111 of file SListViewItemLocator.h.

Constructor & Destructor Documentation

◆ SListViewItemLocatorFlex()

SListViewItemLocatorFlex::SListViewItemLocatorFlex ( SLayoutSize nItemHei,
SLayoutSize nDividerSize = SLayoutSize() )

构造函数

Parameters
nItemHei每个项的高度
nDividerSize分隔符的高度(默认为0)

Definition at line 93 of file SListViewItemLocator.cpp.

◆ ~SListViewItemLocatorFlex()

SListViewItemLocatorFlex::~SListViewItemLocatorFlex ( )

析构函数

Definition at line 100 of file SListViewItemLocator.cpp.

Member Function Documentation

◆ Branch2Index()

int SListViewItemLocatorFlex::Branch2Index ( HSTREEITEM hBranch) const
protected

将分支转换为索引

Parameters
hBranch分支句柄
Returns
索引

Definition at line 312 of file SListViewItemLocator.cpp.

◆ Branch2Offset()

int SListViewItemLocatorFlex::Branch2Offset ( HSTREEITEM hBranch) const
protected

将分支转换为偏移量

Parameters
hBranch分支句柄
Returns
偏移量

Definition at line 295 of file SListViewItemLocator.cpp.

◆ Clear()

void SListViewItemLocatorFlex::Clear ( )
protected

清除索引

Definition at line 285 of file SListViewItemLocator.cpp.

◆ GetDividerSize()

int SListViewItemLocatorFlex::GetDividerSize ( )

获取分隔符大小

Returns
分隔符大小

Definition at line 116 of file SListViewItemLocator.cpp.

◆ GetFixItemHeight()

int SListViewItemLocatorFlex::GetFixItemHeight ( ) const
protected

获取固定项的高度

Returns
固定项的高度

Definition at line 271 of file SListViewItemLocator.cpp.

◆ GetIndexDeep()

int SListViewItemLocatorFlex::GetIndexDeep ( ) const
protected

获取索引深度

Returns
索引深度

Definition at line 276 of file SListViewItemLocator.cpp.

◆ GetItemHeight()

int SListViewItemLocatorFlex::GetItemHeight ( int iItem)

获取指定项的高度

Parameters
iItem项索引
Returns
项的高度

Definition at line 206 of file SListViewItemLocator.cpp.

◆ GetScrollLineSize()

int SListViewItemLocatorFlex::GetScrollLineSize ( )

获取滚动行大小

Returns
滚动行大小

Definition at line 111 of file SListViewItemLocator.cpp.

◆ GetTotalHeight()

int SListViewItemLocatorFlex::GetTotalHeight ( )

获取总高度

Returns
总高度

Definition at line 168 of file SListViewItemLocator.cpp.

◆ InitIndex()

void SListViewItemLocatorFlex::InitIndex ( HSTREEITEM hParent,
int nItems,
int nSubBranchSize )
protected

初始化索引

Parameters
hParent父项句柄
nItems项数量
nSubBranchSize子分支大小

Definition at line 245 of file SListViewItemLocator.cpp.

◆ IsFixHeight()

BOOL SListViewItemLocatorFlex::IsFixHeight ( )

检查是否为固定高度

Returns
固定高度返回TRUE,否则返回FALSE

Definition at line 220 of file SListViewItemLocator.cpp.

◆ Item2Position()

int SListViewItemLocatorFlex::Item2Position ( int iItem)

将项索引转换为位置

Parameters
iItem项索引
Returns
位置

Definition at line 152 of file SListViewItemLocator.cpp.

◆ Offset2Branch()

HSTREEITEM SListViewItemLocatorFlex::Offset2Branch ( HSTREEITEM hParent,
int nOffset )
protected

将偏移量转换为分支

Parameters
hParent父项句柄
nOffset偏移量
Returns
分支句柄

Definition at line 329 of file SListViewItemLocator.cpp.

◆ OnDataSetChanged()

void SListViewItemLocatorFlex::OnDataSetChanged ( )

数据集发生变化时调用

Definition at line 231 of file SListViewItemLocator.cpp.

◆ Position2Item()

int SListViewItemLocatorFlex::Position2Item ( int position)

将位置转换为项索引

Parameters
position位置
Returns
项索引

Definition at line 121 of file SListViewItemLocator.cpp.

◆ SetAdapter()

void SListViewItemLocatorFlex::SetAdapter ( ILvAdapter * pAdapter)

设置适配器

Parameters
pAdapter列表适配器对象指针

Definition at line 225 of file SListViewItemLocator.cpp.

◆ SetItemHeight()

void SListViewItemLocatorFlex::SetItemHeight ( int iItem,
int nHeight )

设置指定项的高度

Parameters
iItem项索引
nHeight新的高度

Definition at line 179 of file SListViewItemLocator.cpp.

◆ SetScale()

void SListViewItemLocatorFlex::SetScale ( int nScale)

设置缩放比例

Parameters
nScale缩放比例

Definition at line 105 of file SListViewItemLocator.cpp.

Member Data Documentation

◆ m_adapter

SAutoRefPtr<ILvAdapter> SListViewItemLocatorFlex::m_adapter
protected

列表适配器对象指针

Definition at line 292 of file SListViewItemLocator.h.

◆ m_itemPosIndex

CSTree<BranchInfo> SListViewItemLocatorFlex::m_itemPosIndex
protected

记录分支高度

Definition at line 256 of file SListViewItemLocator.h.

◆ m_nDividerSize

SLayoutSize SListViewItemLocatorFlex::m_nDividerSize
protected

分隔符的高度

Definition at line 243 of file SListViewItemLocator.h.

◆ m_nItemHeight

SLayoutSize SListViewItemLocatorFlex::m_nItemHeight
protected

每个项的高度

Definition at line 242 of file SListViewItemLocator.h.

◆ m_nScale

int SListViewItemLocatorFlex::m_nScale
protected

缩放比例

Definition at line 244 of file SListViewItemLocator.h.

◆ m_segments

SArray<SegmentInfo *> SListViewItemLocatorFlex::m_segments
protected

段信息数组

Definition at line 291 of file SListViewItemLocator.h.


The documentation for this class was generated from the following files: