Refactored ControlRenderer so that derived classes are responsible for the creation...
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / controls / renderer-factory / control-renderer.cpp
index 30e8b58..36e5c02 100644 (file)
@@ -47,28 +47,52 @@ ControlRenderer& ControlRenderer::operator=( const ControlRenderer& handle )
 }
 
 ControlRenderer::ControlRenderer(Internal::ControlRenderer *impl)
-: BaseHandle(impl)
+: BaseHandle( impl )
 {
 }
 
 void ControlRenderer::SetSize( const Vector2& size )
 {
-  GetImplementation( *this ).SetSize(size);
+  GetImplementation( *this ).SetSize( size );
+}
+
+const Vector2& ControlRenderer::GetSize() const
+{
+  return GetImplementation( *this ).GetSize();
+}
+
+void ControlRenderer::GetNaturalSize(Vector2& naturalSize ) const
+{
+  GetImplementation( *this ).GetNaturalSize( naturalSize );
 }
 
 void ControlRenderer::SetDepthIndex( float index )
 {
-  GetImplementation( *this ).SetDepthIndex(index);
+  GetImplementation( *this ).SetDepthIndex( index );
+}
+
+float ControlRenderer::GetDepthIndex() const
+{
+  return GetImplementation( *this ).GetDepthIndex();
 }
 
 void ControlRenderer::SetOnStage( Actor& actor )
 {
-  GetImplementation( *this ).SetOnStage(actor);
+  GetImplementation( *this ).SetOnStage( actor );
 }
 
 void ControlRenderer::SetOffStage( Actor& actor )
 {
-  GetImplementation( *this ).SetOffStage(actor);
+  GetImplementation( *this ).SetOffStage( actor );
+}
+
+void ControlRenderer::RemoveAndReset( Actor& actor )
+{
+  if( actor && *this )
+  {
+    SetOffStage( actor );
+  }
+  Reset();
 }
 
 void ControlRenderer::CreatePropertyMap( Property::Map& map ) const