The base class for a view controller, responsible for displaying a view.
This base class for a view controller is used to display a view and is responsible for controlling the functionality of the view by building the view and its timelines. The view managed by this controller is intended to be displayed on its own and is a seperate entity from the screen management system. If transitions between screens are desired the CYIAbstractScreenViewController class should be used in conjunction with CYIScreenTransitionManager.
#include <screen/YiViewController.h>

Classes | |
| class | TimelineHelper |
| Helper class used to start the begin and end animations of the CYIViewController. More... | |
Protected Member Functions | |
| virtual void | BuildTimelines () |
| void | SetBeginAnimation (CYIAbstractTimeline *pAnimation, TimelineHelper::ANIMATION_DIRECTION eDirection) |
| void | SetEndAnimation (CYIAbstractTimeline *pAnimation, TimelineHelper::ANIMATION_DIRECTION eDirection) |
Protected Attributes | |
| CYISceneManager * | m_pSceneManager |
| CYISceneView * | m_pView |
| CYIAbstractTimeline * | m_pAnimationIn |
| CYIAbstractTimeline * | m_pAnimationOut |
| CYIViewController::CYIViewController | ( | CYISceneManager * | pSceneManager | ) |
Constructs a CYIViewController with pSceneManager. The view will be nullptr until Init() is called.
| CYIViewController::CYIViewController | ( | CYISceneManager * | pSceneManager, |
| CYISceneView * | pView | ||
| ) |
Constructs a CYIViewController with pSceneManager and pre-built pView.
|
virtual |
|
virtual |
Calls Init() if the CYISceneView this controller manages has not been initalized, and animates it using the 'In' timeline.
Reimplemented in CYIActivityIndicatorViewController.
|
protectedvirtual |
Builds the default 'In' and 'Out' timelines and sets them as the begin and end animations for this view. If the 'In' or 'Out' timeline does not exist, the controller will fallback to 'AnimationIn' and/or 'AnimationOut'. Subclasses can override this if different begin and end animations are required.
Reimplemented in CYIActivityIndicatorViewController.
|
virtual |
Animates the view out using the 'Out' timeline. By default this will also clear focus if the currently focused view is contained within this view controller.
Reimplemented in CYIActivityIndicatorViewController.
|
virtual |
Returns the root node representing this scene. The default implementation will return m_pView but subclasses may override this behaviour if they do their own view management
|
virtual |
Initializes the CYISceneView which this controller manages. This initialization process builds the view and the timelines related to the view.
Reimplemented in CYIAbstractScreenViewController.
|
virtual |
|
virtual |
Called when the begin animation has completed.
|
virtual |
Called when the end animation has completed.
|
protected |
Sets the begin animation for the view controller. The animation will be played in the eDirection. This will replace the timelines set by BuildTimelines().
| void CYIViewController::SetClearFocus | ( | bool | bClearFocus | ) |
Sets whether focus should be cleared when the view is unloaded.
|
protected |
Sets the end animation for the view controller. The animation will be played in the eDirection. This will replace the timelines set by BuildTimelines().
| void CYIViewController::SetViewLoaded | ( | bool | bIsLoaded | ) |
Sets whether the view is currently loaded.
| bool CYIViewController::ShouldClearFocus | ( | ) | const |
|
virtual |
Implement to update the view with new information such as changes in the view's dimensions.
|
protected |
|
protected |
|
protected |
|
protected |