Performs animated transitions from one application screen to another.
When Start(CYIAbstractScreenViewController *pFromScreen, CYIAbstractScreenViewController *pToScreen) is called from the application:
Overloading this class provides the ability for the client application to perform other actions when the screen transition starts and ends and when the pFromScreen unload animation is complete.
Allows connection of signals to a listener in order for it to be notified when the screen transition starts and ends, and when the unload animation ends and the load animation starts.
#include <screen/YiScreenTransition.h>

Public Attributes | |
| CYISignal | UnloadAnimationCompleted |
| CYISignal | LoadAnimationStarted |
| CYISignal | ScreenTransitionCompleted |
| CYISignal | ScreenTransitionStopped |
Protected Member Functions | |
| virtual void | OnScreenTransitionStarted () |
| virtual void | OnScreenTransitionEnded () |
| virtual void | OnUnloadAnimationComplete () |
| CYIAbstractScreenViewController * | GetFromScreen () const |
| CYIAbstractScreenViewController * | GetToScreen () const |
| CYIScreenTransition::CYIScreenTransition | ( | CYIActivityIndicatorViewController * | pActivityIndicator, |
| int32_t | nMinActivityIndicatorMs | ||
| ) |
The pActivityIndicator will run for nMinActivityIndicatorMs milliseconds.
If no activity indicator is needed, call CYIScreenTransition(nullptr, 0).
|
virtual |
|
virtual |
Returns true if action, key, and trackpad events have been enabled for this screen transition. Default is false.
| void CYIScreenTransition::DisableUserEvents | ( | ) |
Action, key, and trackpad events will be ignored during screen transition. This is the default behaviour.
| void CYIScreenTransition::EnableUserEvents | ( | ) |
Action, key, and trackpad events will be processed during screen transition. Default value is disabled.
|
overridevirtual |
Override and return true if this listener blocks user input. The default implementation returns false.
Reimplemented from CYITime::UpdateListener.
|
protected |
Returns pFromScreen that was specified in Start().
|
protected |
Returns pToScreen that was specified in Start().
|
overridevirtual |
Implement this function to receive frame time update notifications. Return true if you want to keep receiving notifications. Return false if you want the listener to unregister.
Implements CYITime::UpdateListener.
|
inlineprotectedvirtual |
Called when the screen transition has been ended by Stop().
|
inlineprotectedvirtual |
Called when the screen transition has been initiated by Start().
|
protectedvirtual |
Called when the unload animation has completed.
| void CYIScreenTransition::Start | ( | CYIAbstractScreenViewController * | pFromScreen, |
| CYIAbstractScreenViewController * | pToScreen | ||
| ) |
Initiates the unloading animation on the pFromScreen.
When this animation completes, the loading animation on the pToScreen will start.
If pActivityIndicator set in the constructor is not nullptr, the activity indicator animation will start after the pFromScreen unloading animation completes. The indicator will loop for at least nMinActivityIndicatorMs and will continue looping until UnblockLoadingAnimation() is emitted. Once UnblockLoadingAnimation() is emitted the activity indicator will be dismissed and the load animation for pToScreen will start.
| void CYIScreenTransition::Stop | ( | ) |
Stops the transition. The begin animation will play for pFromScreen specified in Start.
| void CYIScreenTransition::UnblockLoadingAnimation | ( | ) |
Stops the activity indicator, if provided, and continues to the loading animation of pToScreen specified in Start().
| CYISignal CYIScreenTransition::LoadAnimationStarted |
Emitted immediately before the load animation starts playing for the pToScreen specified in Start().
| CYISignal CYIScreenTransition::ScreenTransitionCompleted |
Emitted when the transition to the pToScreen specified in Start() has completed.
| CYISignal CYIScreenTransition::ScreenTransitionStopped |
Emitted when the transition back to the pFromScreen specified in Start() has completed afer Stop() has been called on an active transition. This signal is emitted instead of ScreenTransitionCompleted().
| CYISignal CYIScreenTransition::UnloadAnimationCompleted |