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

瓷砖视图项定位器类 More...

#include <STileViewItemLocator.h>

Inheritance diagram for STileViewItemLocator:
TObjRefImpl< ITileViewItemLocator >

Public Member Functions

 STileViewItemLocator (SWindow *owner, int nItemHei, int nItemWid, int nMarginSize=0)
 构造函数
 
 STileViewItemLocator (SWindow *owner, LPCWSTR szItemHei, LPCWSTR szItemWid, SLayoutSize marginSize=SLayoutSize())
 构造函数
 
void SetAdapter (ILvAdapter *pAdapter) OVERRIDE
 设置适配器
 
void OnDataSetChanged () OVERRIDE
 数据集改变时调用
 
int GetItemHeight (int iItem) SCONST OVERRIDE
 获取指定项的高度
 
void SetItemHeight (int iItem, int nHeight) OVERRIDE
 设置指定项的高度
 
RECT GetItemRect (int iItem) OVERRIDE
 获取指定项的矩形区域(相对于TileView)
 
void SetTileViewWidth (int width, BOOL bDpiAware) OVERRIDE
 设置TileView的宽度(在TileView的OnSize中调用)
 
void GetItemRowAndColIndex (int iItem, int *row, int *col) OVERRIDE
 获取指定项的行和列索引
 
BOOL IsLastInRow (int iItem) OVERRIDE
 判断指定项是否为每行的最后一个元素
 
int GetUpItem (int iItem) OVERRIDE
 获取上一行同一列的元素索引
 
int GetDownItem (int iItem) OVERRIDE
 获取下一行同一列的元素索引
 
int GetTotalHeight () OVERRIDE
 获取总高度
 
int Item2Position (int iItem) OVERRIDE
 将项索引转换为位置
 
int Position2Item (int position) OVERRIDE
 将位置转换为项索引
 
int GetScrollLineSize () SCONST OVERRIDE
 获取滚动行大小
 
int GetMarginSize () SCONST OVERRIDE
 获取间距大小
 
int SetScale (int scale) OVERRIDE
 设置缩放比例
 
int GetCountInRow () SCONST OVERRIDE
 获取每行的项数量
 
int GetItemLineHeight () SCONST OVERRIDE
 获取项的行高
 
int GetItemWidth () SCONST OVERRIDE
 获取项的宽度
 
- Public Member Functions inherited from TObjRefImpl< ITileViewItemLocator >
 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 Attributes

int m_scale
 
SLayoutSize m_nItemWidth
 
SLayoutSize m_nItemHeight
 
SLayoutSize m_nTileViewWidth
 
SLayoutSize m_nItemMargin
 
int m_nCountInRow
 
SAutoRefPtr< ILvAdapter > m_adapter
 
SWindowm_pOwner
 
- Protected Attributes inherited from TObjRefImpl< ITileViewItemLocator >
LONG m_cRef
 Reference count.
 

Detailed Description

瓷砖视图项定位器类

Definition at line 12 of file STileViewItemLocator.h.

Constructor & Destructor Documentation

◆ STileViewItemLocator() [1/2]

SNSBEGIN STileViewItemLocator::STileViewItemLocator ( SWindow * owner,
int nItemHei,
int nItemWid,
int nMarginSize = 0 )

构造函数

Parameters
owner所属窗口对象指针
nItemHei每个项的高度
nItemWid每个项的宽度
nMarginSize项之间的间距(默认为0)

Definition at line 7 of file STileViewItemLocator.cpp.

◆ STileViewItemLocator() [2/2]

STileViewItemLocator::STileViewItemLocator ( SWindow * owner,
LPCWSTR szItemHei,
LPCWSTR szItemWid,
SLayoutSize marginSize = SLayoutSize() )

构造函数

Parameters
owner所属窗口对象指针
szItemHei每个项的高度(字符串形式)
szItemWid每个项的宽度(字符串形式)
marginSize项之间的间距(默认为SLayoutSize())

Definition at line 17 of file STileViewItemLocator.cpp.

Member Function Documentation

◆ GetCountInRow()

int STileViewItemLocator::GetCountInRow ( )

获取每行的项数量

Returns
每行的项数量

Definition at line 38 of file STileViewItemLocator.cpp.

◆ GetDownItem()

int STileViewItemLocator::GetDownItem ( int iItem)

获取下一行同一列的元素索引

Parameters
iItem项索引
Returns
下一行同一列的元素索引

Definition at line 171 of file STileViewItemLocator.cpp.

◆ GetItemHeight()

int STileViewItemLocator::GetItemHeight ( int iItem)

获取指定项的高度

Parameters
iItem项索引
Returns
项的高度

Definition at line 97 of file STileViewItemLocator.cpp.

◆ GetItemLineHeight()

int STileViewItemLocator::GetItemLineHeight ( )

获取项的行高

Returns
项的行高

Definition at line 43 of file STileViewItemLocator.cpp.

◆ GetItemRect()

RECT STileViewItemLocator::GetItemRect ( int iItem)

获取指定项的矩形区域(相对于TileView)

Parameters
iItem项索引
Returns
项的矩形区域

Definition at line 107 of file STileViewItemLocator.cpp.

◆ GetItemRowAndColIndex()

void STileViewItemLocator::GetItemRowAndColIndex ( int iItem,
int * row,
int * col )

获取指定项的行和列索引

Parameters
iItem项索引
row行索引指针
col列索引指针

Definition at line 146 of file STileViewItemLocator.cpp.

◆ GetItemWidth()

int STileViewItemLocator::GetItemWidth ( )

获取项的宽度

Returns
项的宽度

Definition at line 48 of file STileViewItemLocator.cpp.

◆ GetMarginSize()

int STileViewItemLocator::GetMarginSize ( )

获取间距大小

Returns
间距大小

Definition at line 33 of file STileViewItemLocator.cpp.

◆ GetScrollLineSize()

int STileViewItemLocator::GetScrollLineSize ( )

获取滚动行大小

Returns
滚动行大小

Definition at line 28 of file STileViewItemLocator.cpp.

◆ GetTotalHeight()

int STileViewItemLocator::GetTotalHeight ( )

获取总高度

Returns
总高度

Definition at line 83 of file STileViewItemLocator.cpp.

◆ GetUpItem()

int STileViewItemLocator::GetUpItem ( int iItem)

获取上一行同一列的元素索引

Parameters
iItem项索引
Returns
上一行同一列的元素索引

Definition at line 164 of file STileViewItemLocator.cpp.

◆ IsLastInRow()

BOOL STileViewItemLocator::IsLastInRow ( int iItem)

判断指定项是否为每行的最后一个元素

Parameters
iItem项索引
Returns
如果是最后一个元素返回TRUE,否则返回FALSE

Definition at line 159 of file STileViewItemLocator.cpp.

◆ Item2Position()

int STileViewItemLocator::Item2Position ( int iItem)

将项索引转换为位置

Parameters
iItem项索引
Returns
位置

Definition at line 78 of file STileViewItemLocator.cpp.

◆ OnDataSetChanged()

void STileViewItemLocator::OnDataSetChanged ( )
inline

数据集改变时调用

Definition at line 42 of file STileViewItemLocator.h.

◆ Position2Item()

int STileViewItemLocator::Position2Item ( int position)

将位置转换为项索引

Parameters
position位置
Returns
项索引

Definition at line 59 of file STileViewItemLocator.cpp.

◆ SetAdapter()

void STileViewItemLocator::SetAdapter ( ILvAdapter * pAdapter)

设置适配器

Parameters
pAdapter列表适配器对象指针

Definition at line 102 of file STileViewItemLocator.cpp.

◆ SetItemHeight()

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

设置指定项的高度

Parameters
iItem项索引
nHeight新的高度

Definition at line 93 of file STileViewItemLocator.cpp.

◆ SetScale()

int STileViewItemLocator::SetScale ( int scale)

设置缩放比例

Parameters
scale缩放比例
Returns
新的缩放比例

Definition at line 53 of file STileViewItemLocator.cpp.

◆ SetTileViewWidth()

void STileViewItemLocator::SetTileViewWidth ( int width,
BOOL bDpiAware )

设置TileView的宽度(在TileView的OnSize中调用)

Parameters
widthTileView的宽度
bDpiAware是否考虑DPI缩放

Definition at line 138 of file STileViewItemLocator.cpp.

Member Data Documentation

◆ m_adapter

SAutoRefPtr<ILvAdapter> STileViewItemLocator::m_adapter
protected

Definition at line 168 of file STileViewItemLocator.h.

◆ m_nCountInRow

int STileViewItemLocator::m_nCountInRow
protected

Definition at line 166 of file STileViewItemLocator.h.

◆ m_nItemHeight

SLayoutSize STileViewItemLocator::m_nItemHeight
protected

Definition at line 163 of file STileViewItemLocator.h.

◆ m_nItemMargin

SLayoutSize STileViewItemLocator::m_nItemMargin
protected

Definition at line 165 of file STileViewItemLocator.h.

◆ m_nItemWidth

SLayoutSize STileViewItemLocator::m_nItemWidth
protected

Definition at line 162 of file STileViewItemLocator.h.

◆ m_nTileViewWidth

SLayoutSize STileViewItemLocator::m_nTileViewWidth
protected

Definition at line 164 of file STileViewItemLocator.h.

◆ m_pOwner

SWindow* STileViewItemLocator::m_pOwner
protected

Definition at line 169 of file STileViewItemLocator.h.

◆ m_scale

int STileViewItemLocator::m_scale
protected

Definition at line 161 of file STileViewItemLocator.h.


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