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

Soui布局类 More...

#include <SouiLayout.h>

Inheritance diagram for SouiLayout:
TObjRefImpl< SObjectImpl< ILayout > > SObjectImpl< ILayout >

Classes

struct  WndPos
 窗口位置结构体 More...
 

Public Member Functions

 SouiLayout (void)
 构造函数
 
 ~SouiLayout (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
 测量子窗口大小
 
- 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 Member Functions

void CalcPositionEx (SList< WndPos > *pListChildren, int nWidth, int nHeight) const
 计算扩展位置
 
int CalcPostion (SList< WndPos > *pListChildren, int nWidth, int nHeight) const
 计算位置
 
int PositionItem2Value (SList< WndPos > *pLstChilds, SPOSITION position, const POS_INFO &pos, int nMax, BOOL bX, int nScale) const
 将位置项转换为值
 
int CalcChildLeft (SWindow *pWindow, SouiLayoutParam *pParam)
 计算子窗口左侧位置
 
int CalcChildRight (SWindow *pWindow, SouiLayoutParam *pParam)
 计算子窗口右侧位置
 
int CalcChildTop (SWindow *pWindow, SouiLayoutParam *pParam)
 计算子窗口顶部位置
 
int CalcChildBottom (SWindow *pWindow, SouiLayoutParam *pParam)
 计算子窗口底部位置
 
BOOL IsWaitingPos (int nPos) const
 检查位置是否等待
 
SWindowGetRefSibling (SWindow *pCurWnd, int uCode)
 获取参考兄弟窗口
 
CRect GetWindowLayoutRect (SWindow *pWindow)
 获取窗口布局矩形区域
 

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.
 
- 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
 

Detailed Description

Soui布局类

Definition at line 187 of file SouiLayout.h.

Constructor & Destructor Documentation

◆ SouiLayout()

SouiLayout::SouiLayout ( void )

构造函数

Definition at line 409 of file SouiLayout.cpp.

◆ ~SouiLayout()

SouiLayout::~SouiLayout ( void )

析构函数

Definition at line 413 of file SouiLayout.cpp.

Member Function Documentation

◆ CalcChildBottom()

int SouiLayout::CalcChildBottom ( SWindow * pWindow,
SouiLayoutParam * pParam )
protected

计算子窗口底部位置

Parameters
pWindow窗口指针
pParam布局参数对象指针
Returns
计算的底部位置

◆ CalcChildLeft()

int SouiLayout::CalcChildLeft ( SWindow * pWindow,
SouiLayoutParam * pParam )
protected

计算子窗口左侧位置

Parameters
pWindow窗口指针
pParam布局参数对象指针
Returns
计算的左侧位置

◆ CalcChildRight()

int SouiLayout::CalcChildRight ( SWindow * pWindow,
SouiLayoutParam * pParam )
protected

计算子窗口右侧位置

Parameters
pWindow窗口指针
pParam布局参数对象指针
Returns
计算的右侧位置

◆ CalcChildTop()

int SouiLayout::CalcChildTop ( SWindow * pWindow,
SouiLayoutParam * pParam )
protected

计算子窗口顶部位置

Parameters
pWindow窗口指针
pParam布局参数对象指针
Returns
计算的顶部位置

◆ CalcPositionEx()

void SouiLayout::CalcPositionEx ( SList< WndPos > * pListChildren,
int nWidth,
int nHeight ) const
protected

计算扩展位置

Parameters
pListChildren子窗口列表指针
nWidth宽度
nHeight高度

Definition at line 630 of file SouiLayout.cpp.

◆ CalcPostion()

int SouiLayout::CalcPostion ( SList< WndPos > * pListChildren,
int nWidth,
int nHeight ) const
protected

计算位置

Parameters
pListChildren子窗口列表指针
nWidth宽度
nHeight高度
Returns
计算结果

Definition at line 674 of file SouiLayout.cpp.

◆ CreateLayoutParam()

ILayoutParam * SouiLayout::CreateLayoutParam ( )

创建布局参数对象

Returns
布局参数对象指针

Definition at line 422 of file SouiLayout.cpp.

◆ GetRefSibling()

SWindow * SouiLayout::GetRefSibling ( SWindow * pCurWnd,
int uCode )
protected

获取参考兄弟窗口

Parameters
pCurWnd当前窗口指针
uCode代码
Returns
参考兄弟窗口指针

◆ GetWindowLayoutRect()

CRect SouiLayout::GetWindowLayoutRect ( SWindow * pWindow)
protected

获取窗口布局矩形区域

Parameters
pWindow窗口指针
Returns
窗口布局矩形区域

◆ IsParamAcceptable()

BOOL SouiLayout::IsParamAcceptable ( const ILayoutParam * pLayoutParam)

检查布局参数是否可接受

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

Definition at line 417 of file SouiLayout.cpp.

◆ IsWaitingPos()

BOOL SouiLayout::IsWaitingPos ( int nPos) const
protected

检查位置是否等待

Parameters
nPos位置值
Returns
如果等待返回TRUE,否则返回FALSE

Definition at line 427 of file SouiLayout.cpp.

◆ LayoutChildren()

void SouiLayout::LayoutChildren ( IWindow * pParent)

布局子窗口

Parameters
pParent父窗口指针

Definition at line 808 of file SouiLayout.cpp.

◆ MeasureChildren()

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

测量子窗口大小

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

Definition at line 571 of file SouiLayout.cpp.

◆ PositionItem2Value()

int SouiLayout::PositionItem2Value ( SList< WndPos > * pLstChilds,
SPOSITION position,
const POS_INFO & pos,
int nMax,
BOOL bX,
int nScale ) const
protected

将位置项转换为值

Parameters
pLstChilds子窗口列表指针
position位置指针
pos位置信息结构体
nMax最大值
bX是否为X方向
nScale缩放比例
Returns
计算的值

Definition at line 432 of file SouiLayout.cpp.


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