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

Animator for switching views in SStackView. More...

#include <SStackView.h>

Inheritance diagram for SViewSwitchAnimator:
TValueAnimator< float > SValueAnimator TObjRefImpl< SObjectImpl< IValueAnimator > > ITimelineHandler SObjectImpl< IValueAnimator >

Public Member Functions

 SViewSwitchAnimator (SStackView *pOwner)
 Constructor for SViewSwitchAnimator.
 
IValueAnimator * clone () SCONST OVERRIDE
 Clones the animator.
 
void onEvaluateValue (float fraction) OVERRIDE
 Evaluates the value at a given fraction.
 
void start (ITimelineHandlersMgr *pTimerlineMgr) OVERRIDE
 Starts the animation.
 
void SetFrom (int iChild)
 Sets the starting child index.
 
int GetFrom () const
 Gets the starting child index.
 
void SetTo (int iChild)
 Sets the ending child index.
 
int GetTo () const
 Gets the ending child index.
 
void OnOwnerResize ()
 Handles owner resize.
 
void SetOwnerSizeRange (SIZE szFrom, SIZE szTo)
 Sets the owner size range.
 
BOOL IsOwnerResize () const
 Checks if owner resize is enabled.
 
void DisableOwnerResize ()
 Disables owner resize.
 
SIZE GetOwnerSize () const
 Gets the owner size.
 
StackViewAniStyle GetAniStyle () const
 Gets the animation style.
 
- Public Member Functions inherited from TValueAnimator< float >
 TValueAnimator (float from, float to)
 Constructor.
 
float getValue () const
 Gets the current animated value.
 
void setRange (float from, float to)
 Sets the range of the animation.
 
void copy (const IValueAnimator *pSrc) OVERRIDE
 Copies the properties of another animation to this animation.
 
virtual HRESULT SetAttribute (const SNS::SStringW &amp;amp;amp;amp;strAttribName, const SNS::SStringW &amp;amp;amp;amp;strValue, BOOL bLoading=FALSE)
 Defines the attributes for TValueAnimator.
 
- Public Member Functions inherited from SValueAnimator
 SValueAnimator ()
 Creates a new SValueAnimator object.
 
 ~SValueAnimator ()
 Destructor.
 
void setDuration (long duration) OVERRIDE
 Sets the length of the animation.
 
long getDuration () SCONST OVERRIDE
 Gets the length of the animation.
 
long getTotalDuration () SCONST OVERRIDE
 Gets the total duration of the animation, including any repetitions.
 
void setCurrentPlayTime (long playTime) OVERRIDE
 Sets the position of the animation to the specified point in time.
 
void setCurrentFraction (float fraction) OVERRIDE
 Sets the position of the animation to the specified fraction.
 
long getCurrentPlayTime () OVERRIDE
 Gets the current position of the animation in time.
 
long getStartDelay () SCONST OVERRIDE
 Gets the amount of time, in milliseconds, to delay starting the animation after start() is called.
 
void setStartDelay (long startDelay) OVERRIDE
 Sets the amount of time, in milliseconds, to delay starting the animation after start() is called.
 
void setRepeatCount (int value) OVERRIDE
 Sets how many times the animation should be repeated.
 
int getRepeatCount () SCONST OVERRIDE
 Defines how many times the animation should repeat.
 
void setRepeatMode (RepeatMode value) OVERRIDE
 Defines what this animation should do when it reaches the end.
 
RepeatMode getRepeatMode () SCONST OVERRIDE
 Defines what this animation should do when it reaches the end.
 
void addUpdateListener (IAnimatorUpdateListener *listener) OVERRIDE
 Adds a listener to the set of listeners that are sent update events through the life of an animation.
 
void removeAllUpdateListeners () OVERRIDE
 Removes all listeners from the set listening to frame updates for this animation.
 
void removeUpdateListener (IAnimatorUpdateListener *listener) OVERRIDE
 Removes a listener from the set listening to frame updates for this animation.
 
void setInterpolator (IInterpolator *value) OVERRIDE
 Sets the time interpolator used in calculating the elapsed fraction of this animation.
 
IInterpolator * getInterpolator () SCONST OVERRIDE
 Returns the timing interpolator that this SValueAnimator uses.
 
void addListener (IAnimatorListener *p) OVERRIDE
 Adds an animator listener.
 
void removeListener (IAnimatorListener *p) OVERRIDE
 Removes an animator listener.
 
void start (ITimelineHandlersMgr *pContainer) OVERRIDE
 Starts the animation playing.
 
void end () OVERRIDE
 Ends the animation.
 
BOOL isRunning () SCONST OVERRIDE
 Checks if the animation is running.
 
BOOL isStarted () SCONST OVERRIDE
 Checks if the animation has been started.
 
void reverse () OVERRIDE
 Plays the SValueAnimator in reverse.
 
IValueAnimator * clone () SCONST OVERRIDE
 Creates a clone of the current animation.
 
void copy (const IValueAnimator *pSrc) OVERRIDE
 Copies the properties of another animation to this animation.
 
void commitAnimationFrame (long frameTime) OVERRIDE
 Applies an adjustment to the animation to compensate for jank between when the animation first ran and when the frame was drawn.
 
float getAnimatedFraction () SCONST OVERRIDE
 Returns the current animation fraction.
 
void OnNextFrame () OVERRIDE
 Handles the next frame of the animation.
 
- Public Member Functions inherited from TObjRefImpl< SObjectImpl< IValueAnimator > >
 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< IValueAnimator >
 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 initEvaluator ()
 Initializes the evaluators.
 
- Protected Member Functions inherited from TValueAnimator< float >
void onEvaluateValue (float fraction) OVERRIDE
 Evaluates the animated value based on the given fraction.
 

Protected Attributes

SStackViewm_pOwner
 
int m_iFrom
 
int m_iTo
 
BOOL m_bVertAni
 
StackViewAniStyle m_aniStyle
 
SAutoRefPtr< IWindow > m_pFrom
 
SAutoRefPtr< IWindow > m_pTo
 
TypeEvaluator< RECT > m_evalRcFrom
 
TypeEvaluator< RECT > m_evalRcTo
 
TypeEvaluator< BYTE > m_evalAlphaFrom
 
TypeEvaluator< BYTE > m_evalAlphaTo
 
TypeEvaluator< SIZE > m_evalOwnerSize
 
BOOL m_isOwnerResize
 
- Protected Attributes inherited from TValueAnimator< float >
TypeEvaluator< float > mValueEvaluator
 Type evaluator for the animated value.
 
float mValue
 Current animated value.
 
- Protected Attributes inherited from SValueAnimator
uint64_t mStartTime
 The first time that the animation's animateFrame() method is called.
 
bool mStartTimeCommitted
 Flag indicating whether the start time has been firmly committed.
 
float mSeekFraction
 Set when setCurrentPlayTime() is called.
 
bool mReversing
 Flag to indicate whether this animator is playing in reverse mode.
 
float mOverallFraction
 Tracks the overall fraction of the animation, ranging from 0 to mRepeatCount + 1.
 
float mCurrentFraction
 Tracks current elapsed/eased fraction, for querying in getAnimatedFraction().
 
uint64_t mLastFrameTime
 Tracks the time (in milliseconds) when the last frame arrived.
 
uint64_t mFirstFrameTime
 Tracks the time (in milliseconds) when the first frame arrived.
 
bool mRunning
 Additional playing state to indicate whether an animator has been start()'d.
 
bool mStarted
 Additional playing state to indicate whether an animator has been start()'d, whether or not there is a nonzero startDelay.
 
bool mStartListenersCalled
 Tracks whether we've notified listeners of the onAnimationStart() event.
 
bool mInitialized
 Flag that denotes whether the animation is set up and ready to go.
 
bool mAnimationEndRequested
 Flag that tracks whether animation has been requested to end.
 
long mDuration
 How long the animation should last in milliseconds.
 
long mStartDelay
 The amount of time in milliseconds to delay starting the animation after start() is called.
 
int mRepeatCount
 The number of times the animation will repeat.
 
float sDurationScale
 Scaling factor for the duration.
 
RepeatMode mRepeatMode
 The type of repetition that will occur when repeatMode is nonzero.
 
SAutoRefPtr< IInterpolator > mInterpolator
 The time interpolator to be used.
 
SArray< IAnimatorUpdateListener * > mUpdateListeners
 The set of listeners to be sent update events through the life of an animation.
 
SArray< IAnimatorListener * > mListeners
 
ITimelineHandlersMgr * mContainer
 The container managing the timeline handlers.
 
- Protected Attributes inherited from TObjRefImpl< SObjectImpl< IValueAnimator > >
LONG m_cRef
 Reference count.
 
- Protected Attributes inherited from SObjectImpl< IValueAnimator >
SStringW m_strName
 
int m_nID
 
FunAttrHandler m_attrHandler
 

Additional Inherited Members

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

Animator for switching views in SStackView.

This class handles the animation when switching between views in an SStackView.

Definition at line 29 of file SStackView.h.

Constructor & Destructor Documentation

◆ SViewSwitchAnimator()

SViewSwitchAnimator::SViewSwitchAnimator ( SStackView * pOwner)
inline

Constructor for SViewSwitchAnimator.

Parameters
pOwnerPointer to the owner SStackView.

Definition at line 37 of file SStackView.h.

Member Function Documentation

◆ clone()

IValueAnimator * SViewSwitchAnimator::clone ( )
inline

Clones the animator.

Returns
Pointer to the cloned animator.

Definition at line 50 of file SStackView.h.

◆ DisableOwnerResize()

void SViewSwitchAnimator::DisableOwnerResize ( )
inline

Disables owner resize.

Definition at line 127 of file SStackView.h.

◆ GetAniStyle()

StackViewAniStyle SViewSwitchAnimator::GetAniStyle ( ) const
inline

Gets the animation style.

Returns
The animation style.

Definition at line 142 of file SStackView.h.

◆ GetFrom()

int SViewSwitchAnimator::GetFrom ( ) const
inline

Gets the starting child index.

Returns
The starting child index.

Definition at line 80 of file SStackView.h.

◆ GetOwnerSize()

SIZE SViewSwitchAnimator::GetOwnerSize ( ) const

Gets the owner size.

Returns
The owner size.

Definition at line 525 of file SStackView.cpp.

◆ GetTo()

int SViewSwitchAnimator::GetTo ( ) const
inline

Gets the ending child index.

Returns
The ending child index.

Definition at line 98 of file SStackView.h.

◆ initEvaluator()

void SViewSwitchAnimator::initEvaluator ( )
protected

Initializes the evaluators.

Definition at line 413 of file SStackView.cpp.

◆ IsOwnerResize()

BOOL SViewSwitchAnimator::IsOwnerResize ( ) const
inline

Checks if owner resize is enabled.

Returns
TRUE if owner resize is enabled, otherwise FALSE.

Definition at line 119 of file SStackView.h.

◆ onEvaluateValue()

void SViewSwitchAnimator::onEvaluateValue ( float fraction)

Evaluates the value at a given fraction.

Parameters
fractionThe fraction of the animation.

Definition at line 376 of file SStackView.cpp.

◆ OnOwnerResize()

void SViewSwitchAnimator::OnOwnerResize ( )

Handles owner resize.

Definition at line 406 of file SStackView.cpp.

◆ SetFrom()

void SViewSwitchAnimator::SetFrom ( int iChild)
inline

Sets the starting child index.

Parameters
iChildThe starting child index.

Definition at line 71 of file SStackView.h.

◆ SetOwnerSizeRange()

void SViewSwitchAnimator::SetOwnerSizeRange ( SIZE szFrom,
SIZE szTo )

Sets the owner size range.

Parameters
szFromThe starting size.
szToThe ending size.

Definition at line 519 of file SStackView.cpp.

◆ SetTo()

void SViewSwitchAnimator::SetTo ( int iChild)
inline

Sets the ending child index.

Parameters
iChildThe ending child index.

Definition at line 89 of file SStackView.h.

◆ start()

void SViewSwitchAnimator::start ( ITimelineHandlersMgr * pTimerlineMgr)

Starts the animation.

Parameters
pTimerlineMgrPointer to the timeline handlers manager.

Definition at line 340 of file SStackView.cpp.

Member Data Documentation

◆ m_aniStyle

StackViewAniStyle SViewSwitchAnimator::m_aniStyle
protected

Animation style.

Definition at line 156 of file SStackView.h.

◆ m_bVertAni

BOOL SViewSwitchAnimator::m_bVertAni
protected

Flag indicating vertical animation.

Definition at line 155 of file SStackView.h.

◆ m_evalAlphaFrom

TypeEvaluator<BYTE> SViewSwitchAnimator::m_evalAlphaFrom
protected

Definition at line 162 of file SStackView.h.

◆ m_evalAlphaTo

TypeEvaluator<BYTE> SViewSwitchAnimator::m_evalAlphaTo
protected

Evaluators for alpha animations.

Definition at line 162 of file SStackView.h.

◆ m_evalOwnerSize

TypeEvaluator<SIZE> SViewSwitchAnimator::m_evalOwnerSize
protected

Evaluator for owner size animations.

Definition at line 163 of file SStackView.h.

◆ m_evalRcFrom

TypeEvaluator<RECT> SViewSwitchAnimator::m_evalRcFrom
protected

Definition at line 161 of file SStackView.h.

◆ m_evalRcTo

TypeEvaluator<RECT> SViewSwitchAnimator::m_evalRcTo
protected

Evaluators for rectangle animations.

Definition at line 161 of file SStackView.h.

◆ m_iFrom

int SViewSwitchAnimator::m_iFrom
protected

Definition at line 154 of file SStackView.h.

◆ m_isOwnerResize

BOOL SViewSwitchAnimator::m_isOwnerResize
protected

Flag indicating if owner resize is enabled.

Definition at line 164 of file SStackView.h.

◆ m_iTo

int SViewSwitchAnimator::m_iTo
protected

Indices of the starting and ending children.

Definition at line 154 of file SStackView.h.

◆ m_pFrom

SAutoRefPtr<IWindow> SViewSwitchAnimator::m_pFrom
protected

Pointer to the starting child window.

Definition at line 158 of file SStackView.h.

◆ m_pOwner

SStackView* SViewSwitchAnimator::m_pOwner
protected

Pointer to the owner SStackView.

Definition at line 153 of file SStackView.h.

◆ m_pTo

SAutoRefPtr<IWindow> SViewSwitchAnimator::m_pTo
protected

Pointer to the ending child window.

Definition at line 159 of file SStackView.h.


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