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;strAttribName, const SNS::SStringW &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 |
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.
SNSBEGIN SStackView::SStackView | ( | void | ) |
Constructor for SStackView.
Definition at line 6 of file SStackView.cpp.
SStackView::~SStackView | ( | void | ) |
Destructor for SStackView.
Definition at line 17 of file SStackView.cpp.
|
protected |
Builds the array of child windows.
updateSel | Flag indicating if the selection should be updated. |
Definition at line 254 of file SStackView.cpp.
|
overrideprotectedvirtual |
Creates child windows from an XML node.
xmlNode | The XML node containing the child window definitions. |
Reimplemented from SWindow.
Definition at line 220 of file SStackView.cpp.
|
protected |
Gets the animation style of a child.
iChild | The index of the child. |
Definition at line 293 of file SStackView.cpp.
|
protected |
Gets the size of a child window.
pPage | Pointer to the child window. |
Definition at line 317 of file SStackView.cpp.
IWindow * SStackView::GetIChild | ( | int | iChild | ) |
Gets a child window by index.
iChild | The index of the child window. |
Definition at line 284 of file SStackView.cpp.
IWindow * SStackView::GetPage | ( | int | iPage | ) |
Gets a page by index.
iPage | The index of the page. |
Definition at line 87 of file SStackView.cpp.
IWindow * SStackView::GetSelPage | ( | ) |
Gets the selected page.
Definition at line 80 of file SStackView.cpp.
|
protected |
Checks if vertical animation is enabled for a child.
iChild | The index of the child. |
Definition at line 305 of file SStackView.cpp.
|
overrideprotectedvirtual |
Measures the size of child windows.
nParentWid | The width of the parent window. |
nParentHei | The height of the parent window. |
Reimplemented from SWindow.
Definition at line 173 of file SStackView.cpp.
|
overrideprotectedvirtual |
Handles the insertion of a child window.
pChild | Pointer to the child window. |
Reimplemented from SWindow.
Definition at line 240 of file SStackView.cpp.
|
overrideprotectedvirtual |
Handles the removal of a child window.
pChild | Pointer to the child window. |
Reimplemented from SWindow.
Definition at line 249 of file SStackView.cpp.
|
protected |
Handles the end of an animation.
pAnimator | Pointer to the animator. |
Definition at line 155 of file SStackView.cpp.
|
inlineprotected |
Handles the repetition of an animation.
pAnimator | Pointer to the animator. |
Definition at line 304 of file SStackView.h.
|
inlineprotected |
Handles the start of an animation.
pAnimator | Pointer to the animator. |
Definition at line 296 of file SStackView.h.
|
overrideprotectedvirtual |
Handles the change of the container.
pOldContainer | Pointer to the old container. |
pNewContainer | Pointer to the new container. |
Reimplemented from SWindow.
Definition at line 143 of file SStackView.cpp.
|
protected |
Handles the destruction of the window.
Definition at line 137 of file SStackView.cpp.
|
protected |
Handles the size change of the window.
nType | The type of size change. |
size | The new size. |
Definition at line 149 of file SStackView.cpp.
BOOL SStackView::SelectPage | ( | int | iView, |
BOOL | enableAnimate = TRUE ) |
Selects a page.
iView | The index of the page to select. |
enableAnimate | Flag indicating if animation should be enabled. |
Definition at line 21 of file SStackView.cpp.
void SStackView::SetAniDir | ( | BOOL | bVert | ) |
Sets the animation direction.
bVert | Flag indicating vertical animation. |
Definition at line 168 of file SStackView.cpp.
void SStackView::SetAniStyle | ( | StackViewAniStyle | aniStyle | ) |
Sets the animation style.
aniStyle | The animation style. |
Definition at line 163 of file SStackView.cpp.
|
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.
void SStackView::UpdateChildrenPosition | ( | ) |
Updates the positions of child windows.
Definition at line 94 of file SStackView.cpp.
|
friend |
Definition at line 230 of file SStackView.h.
|
protected |
Animator for view switching.
Definition at line 412 of file SStackView.h.
|
protected |
Animation style.
Definition at line 416 of file SStackView.h.
|
protected |
Flag indicating vertical animation.
Definition at line 415 of file SStackView.h.
|
protected |
Array of child windows.
Definition at line 413 of file SStackView.h.
|
protected |
Index of the currently selected page.
Definition at line 411 of file SStackView.h.
|
protected |
Flag indicating if all pages have the same size.
Definition at line 417 of file SStackView.h.