-
- Actor mRootOnScreen;
-
- Vector2 mControlSize; ///< The size of the control, it is decided by the page size, the SetSize from application can not change it
- Layer mTurningPageLayer; ///< The layer for the turning page, to avoid possible depth conflict
- Toolkit::ShadowView mShadowView; ///< The shadow view control for shadow casting
- ImageActor mShadowPlane; ///< The plane for the shadow to cast on
- Actor mPointLight; ///< The point light used for shadow casting
- Layer mShadowLayer; ///< The layer to display the shadow
-
- PageFactory& mPageFactory; ///< The page factory which provides the page actors
- Vector2 mPageSize; ///< The page size
- int mTotalPageCount; ///< The total number of pages provided by the page factory
-
- bool mIsEditMode; ///< The boolean to indicate the current page content is edit-able or not
-
- bool mNeedOffscreenRendering; ///< The boolean to indicate whether off screen rendering is required for creating page image
- std::vector<RenderTask> mOffscreenTask; ///< The vector of off screen rendering tasks
- std::vector<Actor> mPageSourceActor; ///< The vector of page source actor
- std::vector<FrameBufferImage> mRenderedPage; ///< The vector of off screen buffers
- CameraActor mCameraActor; ///< The camera actor attached to the off screen tasks
- bool mPanning; ///< The boolean to indicate whether the pan gesture is continuing
-
- std::vector<ShaderEffect> mTurnEffect; ///< The group of PageTurnEffects
- ShaderEffect mSpineEffectFront; ///< The book spine shader effect without flipping image content
- ShaderEffect mSpineEffectBack; ///< The book spine shader effect with image content flipped
- Vector2 mSpineShadowParameter; ///< The spine shadow parameter for all the above shader effects
- Vector2 mOriginalCenter; ///< The original center set to the PageTurnEffect
- Vector2 mCurrentCenter; ///< The current center set to the PageTurnEffect
-
- std::vector<ImageActor> mPageActors; ///< The vector of pages on stage
- int mCurrentPageIndex; ///< The index of the current page, between 0 ~ mTotalPageCount-1
- std::map<ImageActor,bool> mIsTurnBack; ///< The map to keep track the page actor's turning direction
- std::map<Animation,ImageActor> mAnimationActorPair; ///< The map to keep track which page actor is the animation act on
- std::map<Animation, int> mAnimationIndexPair; ///< The map to keep track which PageTurnEffect, PanDisplacementProperty, CurrentCenterProperty is used for the animation
- int mIndex; ///< The index to keep track which PageTurnEffect, PanDisplacementProperty, CurrentCenterProperty is used for the current panning page
- std::vector<bool> mIsAnimating; ///< The boolean vector to keep track which PageTurnEffect, PanDisplacementProperty, CurrentCenterProperty is available for using
- std::vector<bool> mIsSliding; ///< The boolean vector to keep track whether there are animating pages sliding back
-
- ImageActor mPanActor; ///< The page being panned by the pan gesture
- Vector2 mPressDownPosition; ///< The first press down position of the pan gesture
- bool mPress; ///< The boolean to keep track the state of the pageTurnEffect is activated or not
- bool mPageUpdated; ///< The boolean to keep track whether is page is updated after any turning activity
-
- float mDistanceUpCorner; ///< The distance between the original center of PageTurnEffect and the top-left corner of the page
- float mDistanceBottomCorner; ///< The distance between the original center of PageTurnEffect and the bottom-left corner of the page
-
- std::vector<Property::Index> mPropertyPanDisplacement; ///< The pan displacement property group
- std::vector<Property::Index> mPropertyCurrentCenter; ///< The current center property group
- float mPanDisplacement; ///< The displacement of the pan after the constrains are applied
- bool mConstraints; ///< The boolean to keep track the constrains are applied or not
-
- Toolkit::PageTurnView::PageTurnSignal mPageTurnStartedSignal; ///< The signal to notify that a page has started turning
- Toolkit::PageTurnView::PageTurnSignal mPageTurnFinishedSignal; ///< The signal to notify that a page has finished turning
- Toolkit::PageTurnView::PagePanSignal mPagePanStartedSignal; ///< The signal to notify that a page has started panning
- Toolkit::PageTurnView::PagePanSignal mPagePanFinishedSignal; ///< The signal to notify that a page has finished panning
-
- static const int MAXIMUM_TURNING_NUM; ///< How many pages are allowed to animating in the same time
- static const int NUMBER_OF_CACHED_PAGES_EACH_SIDE; ///< The maximum number of pages kept, (MAXIMUM_ANIMATION_NUM+1) pages for each side
- static const int NUMBER_OF_CACHED_PAGES; ///< The maximum number of pages kept, (MAXIMUM_ANIMATION_NUM+1)*2 pages in total
- static const float STATIC_PAGE_INTERVAL_DISTANCE; ///< The depth interval between stacked pages (static pages)
+ Layer mTurningPageLayer; ///< The layer for the turning page, to avoid possible depth conflict
+ Toolkit::ShadowView mShadowView; ///< The shadow view control for shadow casting
+ Actor mShadowPlaneBackground; ///< The plane for the shadow to cast on
+ Actor mPointLight; ///< The point light used for shadow casting
+
+ PageFactory* const mPageFactory; ///< The factory which provides the page actors
+ Shader mTurnEffectShader; ///< The group of PageTurnEffects
+ Shader mSpineEffectShader; ///< The book spine shader effect
+ Geometry mGeometry; ///< The grid geometry for pages
+
+ std::vector<Page> mPages; ///< The vector of pages on stage
+ std::map<Animation, int> mAnimationPageIdPair; ///< The map to keep track which page actor is the animation act on
+
+ Vector2 mPageSize; ///< The page size
+ Vector2 mControlSize; ///< The size of the control, it is decided by the page size, the SetSize from application can not change it
+ Vector2 mSpineShadowParameter; ///< The spine shadow parameter for all the above shader effects
+ Vector2 mOriginalCenter; ///< The original center set to the PageTurnEffect
+ Vector2 mCurrentCenter; ///< The current center set to the PageTurnEffect
+ Vector2 mPressDownPosition; ///< The first press down position of the pan gesture
+
+ float mDistanceUpCorner; ///< The distance between the original center of PageTurnEffect and the top-left corner of the page
+ float mDistanceBottomCorner; ///< The distance between the original center of PageTurnEffect and the bottom-left corner of the page
+ float mPanDisplacement; ///< The displacement of the pan after the constrains are applied
+
+ int mTotalPageCount; ///< The total number of pages provided by the page factory
+ int mCurrentPageIndex; ///< The index of the current page, between 0 ~ mTotalPageCount-1
+ int mTurningPageIndex; ///< The index of the turning page
+ int mIndex; ///< The index to keep track which PanDisplacementProperty, CurrentCenterProperty is used for the current panning page
+ int mSlidingCount; ///< The boolean vector to keep track whether there are animating pages sliding back
+ int mAnimatingCount; ///< The boolean vector to keep track which PageTurnEffect, PanDisplacementProperty, CurrentCenterProperty is available for using
+
+ bool mConstraints; ///< The boolean to keep track the constrains are applied or not
+ bool mPress; ///< The boolean to keep track the state of the pageTurnEffect is activated or not
+ bool mPageUpdated; ///< The boolean to keep track whether is page is updated after any turning activity
+
+ Toolkit::PageTurnView::PageTurnSignal mPageTurnStartedSignal; ///< The signal to notify that a page has started turning
+ Toolkit::PageTurnView::PageTurnSignal mPageTurnFinishedSignal; ///< The signal to notify that a page has finished turning
+ Toolkit::PageTurnView::PagePanSignal mPagePanStartedSignal; ///< The signal to notify that a page has started panning
+ Toolkit::PageTurnView::PagePanSignal mPagePanFinishedSignal; ///< The signal to notify that a page has finished panning
+
+ static const char* const PROPERTY_TEXTURE_WIDTH; ///< The uniform name of texture width
+ static const char* const PROPERTY_ORIGINAL_CENTER; ///< The property name of original center, which is used to constrain the uniforms
+ static const char* const PROPERTY_CURRENT_CENTER; ///< The property name of current center, which is used to constrain the uniforms
+
+ static const int MAXIMUM_TURNING_NUM; ///< How many pages are allowed to animating in the same time
+ static const int NUMBER_OF_CACHED_PAGES_EACH_SIDE; ///< The maximum number of pages kept, (MAXIMUM_ANIMATION_NUM+1) pages for each side
+ static const int NUMBER_OF_CACHED_PAGES; ///< The maximum number of pages kept, (MAXIMUM_ANIMATION_NUM+1)*2 pages in total
+ static const float STATIC_PAGE_INTERVAL_DISTANCE; ///< The depth interval between stacked pages (static pages)