+PageTurnView::Page::Page()
+: isTurnBack( false )
+{
+ actor = Actor::New();
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT );
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER_LEFT );
+ actor.SetProperty( Actor::Property::VISIBLE, false );
+
+ propertyPanDisplacement = actor.RegisterProperty( PROPERTY_PAN_DISPLACEMENT, 0.f );
+ propertyPanCenter = actor.RegisterProperty(PROPERTY_PAN_CENTER, Vector2::ZERO);
+
+ propertyOriginalCenter = actor.RegisterProperty(PROPERTY_ORIGINAL_CENTER, Vector2::ZERO);
+ propertyCurrentCenter = actor.RegisterProperty(PROPERTY_CURRENT_CENTER, Vector2::ZERO);
+ Matrix zeroMatrix(true);
+ actor.RegisterProperty(PROPERTY_COMMON_PARAMETERS, zeroMatrix);
+ propertyTurnDirection = actor.RegisterProperty(PROPERTY_TURN_DIRECTION, -1.f);
+}
+
+void PageTurnView::Page::SetTexture( Texture texture )
+{
+ if( !textureSet )
+ {
+ textureSet = TextureSet::New();
+ }
+ textureSet.SetTexture( 0u, texture );
+}
+
+void PageTurnView::Page::UseEffect(Shader newShader)
+{
+ shader = newShader;
+ if( renderer )
+ {
+ renderer.SetShader( shader );
+ }
+}
+
+void PageTurnView::Page::UseEffect(Shader newShader, Geometry geometry)
+{
+ UseEffect( newShader );
+
+ if( !renderer )
+ {
+ renderer = Renderer::New( geometry, shader );
+
+ if( !textureSet )
+ {
+ textureSet = TextureSet::New();
+ }
+
+ renderer.SetTextures( textureSet );
+ renderer.SetProperty( Renderer::Property::DEPTH_WRITE_MODE, DepthWriteMode::ON );
+ actor.AddRenderer( renderer );
+ }
+}
+
+void PageTurnView::Page::ChangeTurnDirection()
+{
+ isTurnBack = !isTurnBack;
+ actor.SetProperty( propertyTurnDirection, isTurnBack ? 1.f : -1.f );
+}
+
+void PageTurnView::Page::SetPanDisplacement(float value)
+{
+ actor.SetProperty( propertyPanDisplacement, value );
+}
+
+void PageTurnView::Page::SetPanCenter( const Vector2& value )
+{
+ actor.SetProperty( propertyPanCenter, value );
+}
+
+void PageTurnView::Page::SetOriginalCenter( const Vector2& value )
+{
+ actor.SetProperty( propertyOriginalCenter, value );
+}
+
+void PageTurnView::Page::SetCurrentCenter( const Vector2& value )
+{
+ actor.SetProperty( propertyCurrentCenter, value );
+}
+
+PageTurnView::PageTurnView( PageFactory& pageFactory, const Vector2& viewPageSize )
+: Control( ControlBehaviour( CONTROL_BEHAVIOUR_DEFAULT ) ),
+ mPageFactory( &pageFactory ),
+ mPageSize( viewPageSize ),