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

线性布局类 More...

#include <SLinearLayout.h>

Inheritance diagram for SLinearLayout:
TObjRefImpl< SObjectImpl< ILayout > > SObjectImpl< ILayout > SHBox SVBox

Public Member Functions

 SLinearLayout (void)
 构造函数
 
 ~SLinearLayout (void)
 析构函数
 
BOOL IsParamAcceptable (const ILayoutParam *pLayoutParam) SCONST OVERRIDE
 检查布局参数是否可接受
 
void LayoutChildren (IWindow *pParent) OVERRIDE
 布局子窗口
 
ILayoutParam * CreateLayoutParam () SCONST OVERRIDE
 创建布局参数对象
 
SIZE MeasureChildren (const IWindow *pParent, int nWidth, int nHeight) SCONST OVERRIDE
 测量子窗口大小
 
virtual HRESULT SetAttribute (const SNS::SStringW &amp;amp;amp;amp;strAttribName, const SNS::SStringW &amp;amp;amp;amp;strValue, BOOL bLoading=FALSE)
 
- Public Member Functions inherited from TObjRefImpl< SObjectImpl< ILayout > >
 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< ILayout >
 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 Attributes

ORIENTATION m_orientation
 
Gravity m_gravity
 
SLayoutSize m_interval
 
- Protected Attributes inherited from TObjRefImpl< SObjectImpl< ILayout > >
LONG m_cRef
 Reference count.
 
- Protected Attributes inherited from SObjectImpl< ILayout >
SStringW m_strName
 
int m_nID
 
FunAttrHandler m_attrHandler
 

Additional Inherited Members

- Static Public Member Functions inherited from SObjectImpl< ILayout >
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.
 

Detailed Description

线性布局类

Definition at line 150 of file SLinearLayout.h.

Constructor & Destructor Documentation

◆ SLinearLayout()

SLinearLayout::SLinearLayout ( void )

构造函数

Definition at line 201 of file SLinearLayout.cpp.

◆ ~SLinearLayout()

SLinearLayout::~SLinearLayout ( void )

析构函数

Definition at line 206 of file SLinearLayout.cpp.

Member Function Documentation

◆ CreateLayoutParam()

ILayoutParam * SLinearLayout::CreateLayoutParam ( )

创建布局参数对象

Returns
布局参数对象指针

Definition at line 624 of file SLinearLayout.cpp.

◆ IsParamAcceptable()

BOOL SLinearLayout::IsParamAcceptable ( const ILayoutParam * pLayoutParam)

检查布局参数是否可接受

Parameters
pLayoutParam布局参数对象指针
Returns
如果可接受返回TRUE,否则返回FALSE

Definition at line 619 of file SLinearLayout.cpp.

◆ LayoutChildren()

void SLinearLayout::LayoutChildren ( IWindow * pParent)

布局子窗口

Parameters
pParent父窗口指针

Definition at line 210 of file SLinearLayout.cpp.

◆ MeasureChildren()

SIZE SLinearLayout::MeasureChildren ( const IWindow * pParent,
int nWidth,
int nHeight )

测量子窗口大小

Parameters
pParent父窗口指针
nWidth宽度
nHeight高度
Returns
测量结果大小

Definition at line 411 of file SLinearLayout.cpp.

◆ SetAttribute()

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

Definition at line 193 of file SLinearLayout.h.

Member Data Documentation

◆ m_gravity

Gravity SLinearLayout::m_gravity
protected

Definition at line 210 of file SLinearLayout.h.

◆ m_interval

SLayoutSize SLinearLayout::m_interval
protected

Definition at line 211 of file SLinearLayout.h.

◆ m_orientation

ORIENTATION SLinearLayout::m_orientation
protected

Definition at line 209 of file SLinearLayout.h.


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