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

A stack view that can contain multiple pages. More...

#include <SStackView.h>

Public Member Functions

 SStackView (void)
 Constructor for SStackView.
 
 ~SStackView (void)
 Destructor for SStackView.
 
BOOL SelectPage (int iView, BOOL enableAnimate=TRUE) OVERRIDE
 Selects a page.
 
void SetAniStyle (StackViewAniStyle aniStyle) OVERRIDE
 Sets the animation style.
 
void SetAniDir (BOOL bVert) OVERRIDE
 Sets the animation direction.
 
IWindow * GetSelPage () SCONST OVERRIDE
 Gets the selected page.
 
IWindow * GetPage (int iPage) SCONST OVERRIDE
 Gets a page by index.
 
IWindow * GetIChild (int iChild) SCONST OVERRIDE
 Gets a child window by index.
 
void UpdateChildrenPosition () OVERRIDE
 Updates the positions of child windows.
 
virtual HRESULT SetAttribute (const SNS::SStringW &amp;amp;amp;amp;strAttribName, const SNS::SStringW &amp;amp;amp;amp;strValue, BOOL bLoading=FALSE)
 

Protected Member Functions

void onAnimationStart (IValueAnimator *pAnimator) OVERRIDE
 Handles the start of an animation.
 
void onAnimationRepeat (IValueAnimator *pAnimator) OVERRIDE
 Handles the repetition of an animation.
 
void onAnimationEnd (IValueAnimator *pAnimator) OVERRIDE
 Handles the end of an animation.
 
void OnDestroy ()
 Handles the destruction of the window.
 
void OnSize (UINT nType, CSize size)
 Handles the size change of the window.
 
BOOL CreateChildren (SXmlNode xmlNode) override
 Creates child windows from an XML node.
 
SIZE MeasureChildren (int nParentWid, int nParentHei) override
 Measures the size of child windows.
 
void OnContainerChanged (ISwndContainer *pOldContainer, ISwndContainer *pNewContainer) override
 Handles the change of the container.
 
void OnAfterInsertChild (SWindow *pChild) override
 Handles the insertion of a child window.
 
void OnAfterRemoveChild (SWindow *pChild) override
 Handles the removal of a child window.
 
void BuildChildsArray (BOOL updateSel)
 Builds the array of child windows.
 
StackViewAniStyle GetChildAnimateStyle (int iChild) const
 Gets the animation style of a child.
 
BOOL IsVertChildAnimate (int iChild) const
 Checks if vertical animation is enabled for a child.
 
CSize GetChildSize (IWindow *pPage) const
 Gets the size of a child window.
 

Protected Attributes

int m_iSel
 
SViewSwitchAnimator m_animator
 
SArray< SWindow * > m_childs
 
BOOL m_bVertAni
 
StackViewAniStyle m_aniStyle
 
BOOL m_isSamePageSize
 

Friends

class SViewSwitchAnimator
 

Detailed Description

A stack view that can contain multiple pages.

This class represents a stack view that can switch between multiple pages with animations.

Definition at line 227 of file SStackView.h.

Constructor & Destructor Documentation

◆ SStackView()

SNSBEGIN SStackView::SStackView ( void )

Constructor for SStackView.

Definition at line 6 of file SStackView.cpp.

◆ ~SStackView()

SStackView::~SStackView ( void )

Destructor for SStackView.

Definition at line 17 of file SStackView.cpp.

Member Function Documentation

◆ BuildChildsArray()

void SStackView::BuildChildsArray ( BOOL updateSel)
protected

Builds the array of child windows.

Parameters
updateSelFlag indicating if the selection should be updated.

Definition at line 254 of file SStackView.cpp.

◆ CreateChildren()

BOOL SStackView::CreateChildren ( SXmlNode xmlNode)
overrideprotectedvirtual

Creates child windows from an XML node.

Parameters
xmlNodeThe XML node containing the child window definitions.
Returns
TRUE if successful, otherwise FALSE.

Reimplemented from SWindow.

Definition at line 220 of file SStackView.cpp.

◆ GetChildAnimateStyle()

StackViewAniStyle SStackView::GetChildAnimateStyle ( int iChild) const
protected

Gets the animation style of a child.

Parameters
iChildThe index of the child.
Returns
The animation style.

Definition at line 293 of file SStackView.cpp.

◆ GetChildSize()

CSize SStackView::GetChildSize ( IWindow * pPage) const
protected

Gets the size of a child window.

Parameters
pPagePointer to the child window.
Returns
The size of the child window.

Definition at line 317 of file SStackView.cpp.

◆ GetIChild()

IWindow * SStackView::GetIChild ( int iChild)

Gets a child window by index.

Parameters
iChildThe index of the child window.
Returns
Pointer to the child window.

Definition at line 284 of file SStackView.cpp.

◆ GetPage()

IWindow * SStackView::GetPage ( int iPage)

Gets a page by index.

Parameters
iPageThe index of the page.
Returns
Pointer to the page.

Definition at line 87 of file SStackView.cpp.

◆ GetSelPage()

IWindow * SStackView::GetSelPage ( )

Gets the selected page.

Returns
Pointer to the selected page.

Definition at line 80 of file SStackView.cpp.

◆ IsVertChildAnimate()

BOOL SStackView::IsVertChildAnimate ( int iChild) const
protected

Checks if vertical animation is enabled for a child.

Parameters
iChildThe index of the child.
Returns
TRUE if vertical animation is enabled, otherwise FALSE.

Definition at line 305 of file SStackView.cpp.

◆ MeasureChildren()

SIZE SStackView::MeasureChildren ( int nParentWid,
int nParentHei )
overrideprotectedvirtual

Measures the size of child windows.

Parameters
nParentWidThe width of the parent window.
nParentHeiThe height of the parent window.
Returns
The measured size.

Reimplemented from SWindow.

Definition at line 173 of file SStackView.cpp.

◆ OnAfterInsertChild()

void SStackView::OnAfterInsertChild ( SWindow * pChild)
overrideprotectedvirtual

Handles the insertion of a child window.

Parameters
pChildPointer to the child window.

Reimplemented from SWindow.

Definition at line 240 of file SStackView.cpp.

◆ OnAfterRemoveChild()

void SStackView::OnAfterRemoveChild ( SWindow * pChild)
overrideprotectedvirtual

Handles the removal of a child window.

Parameters
pChildPointer to the child window.

Reimplemented from SWindow.

Definition at line 249 of file SStackView.cpp.

◆ onAnimationEnd()

void SStackView::onAnimationEnd ( IValueAnimator * pAnimator)
protected

Handles the end of an animation.

Parameters
pAnimatorPointer to the animator.

Definition at line 155 of file SStackView.cpp.

◆ onAnimationRepeat()

void SStackView::onAnimationRepeat ( IValueAnimator * pAnimator)
inlineprotected

Handles the repetition of an animation.

Parameters
pAnimatorPointer to the animator.

Definition at line 304 of file SStackView.h.

◆ onAnimationStart()

void SStackView::onAnimationStart ( IValueAnimator * pAnimator)
inlineprotected

Handles the start of an animation.

Parameters
pAnimatorPointer to the animator.

Definition at line 296 of file SStackView.h.

◆ OnContainerChanged()

void SStackView::OnContainerChanged ( ISwndContainer * pOldContainer,
ISwndContainer * pNewContainer )
overrideprotectedvirtual

Handles the change of the container.

Parameters
pOldContainerPointer to the old container.
pNewContainerPointer to the new container.

Reimplemented from SWindow.

Definition at line 143 of file SStackView.cpp.

◆ OnDestroy()

void SStackView::OnDestroy ( )
protected

Handles the destruction of the window.

Definition at line 137 of file SStackView.cpp.

◆ OnSize()

void SStackView::OnSize ( UINT nType,
CSize size )
protected

Handles the size change of the window.

Parameters
nTypeThe type of size change.
sizeThe new size.

Definition at line 149 of file SStackView.cpp.

◆ SelectPage()

BOOL SStackView::SelectPage ( int iView,
BOOL enableAnimate = TRUE )

Selects a page.

Parameters
iViewThe index of the page to select.
enableAnimateFlag indicating if animation should be enabled.
Returns
TRUE if successful, otherwise FALSE.

Definition at line 21 of file SStackView.cpp.

◆ SetAniDir()

void SStackView::SetAniDir ( BOOL bVert)

Sets the animation direction.

Parameters
bVertFlag indicating vertical animation.

Definition at line 168 of file SStackView.cpp.

◆ SetAniStyle()

void SStackView::SetAniStyle ( StackViewAniStyle aniStyle)

Sets the animation style.

Parameters
aniStyleThe animation style.

Definition at line 163 of file SStackView.cpp.

◆ SetAttribute()

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

< Index of the currently selected page.

< Flag indicating vertical animation.

< No animation.

< Fade in/out animation.

< Move in/out animation.

< Push in/out animation.

< Flag indicating if all pages have the same size.

< Chain attributes to base class.

< Chain attributes to animator.

Reimplemented from SWindow.

Definition at line 315 of file SStackView.h.

◆ UpdateChildrenPosition()

void SStackView::UpdateChildrenPosition ( )

Updates the positions of child windows.

Definition at line 94 of file SStackView.cpp.

Friends And Related Symbol Documentation

◆ SViewSwitchAnimator

friend class SViewSwitchAnimator
friend

Definition at line 230 of file SStackView.h.

Member Data Documentation

◆ m_animator

SViewSwitchAnimator SStackView::m_animator
protected

Animator for view switching.

Definition at line 412 of file SStackView.h.

◆ m_aniStyle

StackViewAniStyle SStackView::m_aniStyle
protected

Animation style.

Definition at line 416 of file SStackView.h.

◆ m_bVertAni

BOOL SStackView::m_bVertAni
protected

Flag indicating vertical animation.

Definition at line 415 of file SStackView.h.

◆ m_childs

SArray<SWindow *> SStackView::m_childs
protected

Array of child windows.

Definition at line 413 of file SStackView.h.

◆ m_iSel

int SStackView::m_iSel
protected

Index of the currently selected page.

Definition at line 411 of file SStackView.h.

◆ m_isSamePageSize

BOOL SStackView::m_isSamePageSize
protected

Flag indicating if all pages have the same size.

Definition at line 417 of file SStackView.h.


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