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

Soui布局参数类 More...

#include <SouiLayout.h>

Inheritance diagram for SouiLayoutParam:
TObjRefImpl< SObjectImpl< ILayoutParam > > SObjectImpl< ILayoutParam >

Public Member Functions

 SouiLayoutParam ()
 构造函数
 
void Clear () OVERRIDE
 清除布局参数
 
BOOL IsMatchParent (ORIENTATION orientation) SCONST OVERRIDE
 检查是否匹配父容器大小
 
BOOL IsWrapContent (ORIENTATION orientation) SCONST OVERRIDE
 检查是否包裹内容大小
 
BOOL IsSpecifiedSize (ORIENTATION orientation) SCONST OVERRIDE
 检查是否指定大小
 
SLayoutSize GetSpecifiedSize (ORIENTATION orientation) SCONST OVERRIDE
 获取指定大小
 
void SetMatchParent (ORIENTATION orientation) OVERRIDE
 设置匹配父容器大小
 
void SetWrapContent (ORIENTATION orientation) OVERRIDE
 设置包裹内容大小
 
void SetSpecifiedSize (ORIENTATION orientation, const SLayoutSize &layoutSize) OVERRIDE
 设置指定大小
 
void * GetRawData () OVERRIDE
 获取原始数据指针
 
ILayoutParam * Clone () SCONST OVERRIDE
 克隆布局参数
 
bool IsOffsetRequired (ORIENTATION orientation) const
 检查是否需要偏移
 
int GetExtraSize (ORIENTATION orientation, int nScale) const
 获取额外大小
 
- Public Member Functions inherited from TObjRefImpl< SObjectImpl< ILayoutParam > >
 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.
 
- Public Member Functions inherited from SObjectImpl< ILayoutParam >
 SObjectImpl ()
 Constructor.
 
BOOL InitFromXml (IXmlNode *pXmlNode) OVERRIDE
 Initializes the object from an XML node.
 
LPCWSTR GetName () SCONST OVERRIDE
 Retrieves the object's name.
 
LPCSTR GetNameA () SCONST OVERRIDE
 Retrieves the object's name in ANSI format.
 
void SetName (LPCWSTR pszName) OVERRIDE
 Sets the object's name.
 
int GetID () SCONST OVERRIDE
 Retrieves the object's ID.
 
void SetID (int nID) OVERRIDE
 Sets the object's ID.
 
HRESULT AfterAttribute (LPCWSTR strAttribName, LPCWSTR strValue, BOOL bLoading, HRESULT hr) OVERRIDE
 Handles attribute processing after setting an attribute.
 
HRESULT SetAttributeA (LPCSTR pszAttr, LPCSTR pszValue, BOOL bLoading) OVERRIDE
 Sets an attribute using ANSI strings.
 
HRESULT SetAttribute (LPCWSTR pszAttr, LPCWSTR pszValue, BOOL bLoading) OVERRIDE
 Sets an attribute using wide strings.
 
virtual HRESULT SetAttribute (const SStringW &strAttr, const SStringW &strValue, BOOL bLoading)
 Sets an attribute using wide strings.
 
HRESULT ISetAttribute (const IStringW *strAttr, const IStringW *strValue, BOOL bLoading) OVERRIDE
 Sets an attribute using IStringW objects.
 
LPCWSTR GetObjectClass () SCONST OVERRIDE
 Retrieves the object's class name.
 
int GetObjectType () SCONST OVERRIDE
 Retrieves the object's type.
 
BOOL IsClass (LPCWSTR lpszName) SCONST OVERRIDE
 Checks if the object is of a specific class.
 
BOOL GetAttribute (LPCWSTR strAttr, IStringW *pValue) SCONST OVERRIDE
 Retrieves an attribute value.
 
void OnInitFinished (IXmlNode *xmlNode) OVERRIDE
 Handles initialization completion.
 
void SetAttrHandler (FunAttrHandler attrHandler) OVERRIDE
 Sets the attribute handler.
 
virtual HRESULT DefAttributeProc (const SStringW &strAttr, const SStringW &strValue, BOOL bLoading)
 Default attribute processing.
 

Protected Member Functions

HRESULT OnAttrWidth (const SStringW &strValue, BOOL bLoading)
 处理宽度属性
 
HRESULT OnAttrHeight (const SStringW &strValue, BOOL bLoading)
 处理高度属性
 
HRESULT OnAttrSize (const SStringW &strValue, BOOL bLoading)
 处理大小属性
 
HRESULT OnAttrPos (const SStringW &strValue, BOOL bLoading)
 处理位置属性
 
HRESULT OnAttrOffset (const SStringW &strValue, BOOL bLoading)
 处理偏移属性
 
virtual HRESULT SetAttribute (const SNS::SStringW &amp;amp;amp;amp;strAttribName, const SNS::SStringW &amp;amp;amp;amp;strValue, BOOL bLoading=FALSE)
 
BOOL StrPos2ItemPos (const SStringW &strPos, POS_INFO &posItem)
 将字符串描述的坐标转换成POSITION_ITEM
 
BOOL ParsePosition12 (const SStringW &pos1, const SStringW &pos2)
 解析在pos中定义的前两个位置
 
BOOL ParsePosition34 (const SStringW &pos3, const SStringW &pos4)
 解析在pos中定义的后两个位置
 

Friends

class SouiLayout
 

Additional Inherited Members

- Static Public Member Functions inherited from SObjectImpl< ILayoutParam >
static int GetClassType ()
 Retrieves the class type.
 
static LPCWSTR GetClassName ()
 Retrieves the class name.
 
static LPCWSTR GetClassAlias ()
 Retrieves the class alias.
 
static void MarkAttributeHandled (SXmlAttr xmlAttr, bool bHandled)
 Marks an attribute as handled.
 
static bool IsAttributeHandled (SXmlAttr xmlAttr)
 Checks if an attribute is handled.
 
- Protected Attributes inherited from TObjRefImpl< SObjectImpl< ILayoutParam > >
LONG m_cRef
 Reference count.
 
- Protected Attributes inherited from SObjectImpl< ILayoutParam >
SStringW m_strName
 
int m_nID
 
FunAttrHandler m_attrHandler
 

Detailed Description

Soui布局参数类

Definition at line 14 of file SouiLayout.h.

Constructor & Destructor Documentation

◆ SouiLayoutParam()

SouiLayoutParam::SouiLayoutParam ( )

构造函数

Definition at line 17 of file SouiLayout.cpp.

Member Function Documentation

◆ Clear()

void SouiLayoutParam::Clear ( )

清除布局参数

Definition at line 336 of file SouiLayout.cpp.

◆ Clone()

ILayoutParam * SouiLayoutParam::Clone ( )

克隆布局参数

Returns
克隆的布局参数对象指针

Definition at line 400 of file SouiLayout.cpp.

◆ GetExtraSize()

int SouiLayoutParam::GetExtraSize ( ORIENTATION orientation,
int nScale ) const

获取额外大小

Parameters
orientation方向(水平或垂直)
nScale缩放比例
Returns
额外大小

Definition at line 326 of file SouiLayout.cpp.

◆ GetRawData()

void * SouiLayoutParam::GetRawData ( )

获取原始数据指针

Returns
原始数据指针

Definition at line 395 of file SouiLayout.cpp.

◆ GetSpecifiedSize()

SLayoutSize SouiLayoutParam::GetSpecifiedSize ( ORIENTATION orientation)

获取指定大小

Parameters
orientation方向(水平或垂直)
Returns
指定大小

Definition at line 70 of file SouiLayout.cpp.

◆ IsMatchParent()

BOOL SouiLayoutParam::IsMatchParent ( ORIENTATION orientation)

检查是否匹配父容器大小

Parameters
orientation方向(水平或垂直)
Returns
如果匹配父容器大小返回TRUE,否则返回FALSE

Definition at line 22 of file SouiLayout.cpp.

◆ IsOffsetRequired()

bool SouiLayoutParam::IsOffsetRequired ( ORIENTATION orientation) const

检查是否需要偏移

Parameters
orientation方向(水平或垂直)
Returns
如果需要偏移返回TRUE,否则返回FALSE

Definition at line 316 of file SouiLayout.cpp.

◆ IsSpecifiedSize()

BOOL SouiLayoutParam::IsSpecifiedSize ( ORIENTATION orientation)

检查是否指定大小

Parameters
orientation方向(水平或垂直)
Returns
如果指定大小返回TRUE,否则返回FALSE

Definition at line 38 of file SouiLayout.cpp.

◆ IsWrapContent()

BOOL SouiLayoutParam::IsWrapContent ( ORIENTATION orientation)

检查是否包裹内容大小

Parameters
orientation方向(水平或垂直)
Returns
如果包裹内容大小返回TRUE,否则返回FALSE

Definition at line 54 of file SouiLayout.cpp.

◆ OnAttrHeight()

HRESULT SouiLayoutParam::OnAttrHeight ( const SStringW & strValue,
BOOL bLoading )
protected

处理高度属性

Parameters
strValue属性值字符串
bLoading是否正在加载
Returns
处理结果

Definition at line 294 of file SouiLayout.cpp.

◆ OnAttrOffset()

HRESULT SouiLayoutParam::OnAttrOffset ( const SStringW & strValue,
BOOL bLoading )
protected

处理偏移属性

Parameters
strValue属性值字符串
bLoading是否正在加载
Returns
处理结果

Definition at line 78 of file SouiLayout.cpp.

◆ OnAttrPos()

HRESULT SouiLayoutParam::OnAttrPos ( const SStringW & strValue,
BOOL bLoading )
protected

处理位置属性

Parameters
strValue属性值字符串
bLoading是否正在加载
Returns
处理结果

Definition at line 217 of file SouiLayout.cpp.

◆ OnAttrSize()

HRESULT SouiLayoutParam::OnAttrSize ( const SStringW & strValue,
BOOL bLoading )
protected

处理大小属性

Parameters
strValue属性值字符串
bLoading是否正在加载
Returns
处理结果

Definition at line 283 of file SouiLayout.cpp.

◆ OnAttrWidth()

HRESULT SouiLayoutParam::OnAttrWidth ( const SStringW & strValue,
BOOL bLoading )
protected

处理宽度属性

Parameters
strValue属性值字符串
bLoading是否正在加载
Returns
处理结果

Definition at line 305 of file SouiLayout.cpp.

◆ ParsePosition12()

BOOL SouiLayoutParam::ParsePosition12 ( const SStringW & pos1,
const SStringW & pos2 )
protected

解析在pos中定义的前两个位置

Parameters
pos1第一个位置字符串
pos2第二个位置字符串
Returns
如果成功解析返回TRUE,否则返回FALSE

Definition at line 90 of file SouiLayout.cpp.

◆ ParsePosition34()

BOOL SouiLayoutParam::ParsePosition34 ( const SStringW & pos3,
const SStringW & pos4 )
protected

解析在pos中定义的后两个位置

Parameters
pos3第三个位置字符串
pos4第四个位置字符串
Returns
如果成功解析返回TRUE,否则返回FALSE

Definition at line 105 of file SouiLayout.cpp.

◆ SetAttribute()

virtual HRESULT SouiLayoutParam::SetAttribute ( const SNS::SStringW &amp;amp;amp;amp; strAttribName,
const SNS::SStringW &amp;amp;amp;amp; strValue,
BOOL bLoading = FALSE )
inlineprotectedvirtual

Definition at line 149 of file SouiLayout.h.

◆ SetMatchParent()

void SouiLayoutParam::SetMatchParent ( ORIENTATION orientation)

设置匹配父容器大小

Parameters
orientation方向(水平或垂直)

Definition at line 345 of file SouiLayout.cpp.

◆ SetSpecifiedSize()

void SouiLayoutParam::SetSpecifiedSize ( ORIENTATION orientation,
const SLayoutSize & layoutSize )

设置指定大小

Parameters
orientation方向(水平或垂直)
layoutSize指定大小

Definition at line 379 of file SouiLayout.cpp.

◆ SetWrapContent()

void SouiLayoutParam::SetWrapContent ( ORIENTATION orientation)

设置包裹内容大小

Parameters
orientation方向(水平或垂直)

Definition at line 362 of file SouiLayout.cpp.

◆ StrPos2ItemPos()

BOOL SouiLayoutParam::StrPos2ItemPos ( const SStringW & strPos,
POS_INFO & posItem )
protected

将字符串描述的坐标转换成POSITION_ITEM

Parameters
strPos坐标字符串
posItem位置信息结构体引用
Returns
如果成功转换返回TRUE,否则返回FALSE

Definition at line 119 of file SouiLayout.cpp.

Friends And Related Symbol Documentation

◆ SouiLayout

friend class SouiLayout
friend

Definition at line 19 of file SouiLayout.h.


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