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 2c8aa07..36e5c02 100644 (file)
@@ -35,39 +35,69 @@ ControlRenderer::~ControlRenderer()
 {
 }
 
+ControlRenderer::ControlRenderer( const ControlRenderer& handle )
+: BaseHandle( handle )
+{
+}
+
+ControlRenderer& ControlRenderer::operator=( const ControlRenderer& handle )
+{
+  BaseHandle::operator=( handle );
+  return *this;
+}
+
 ControlRenderer::ControlRenderer(Internal::ControlRenderer *impl)
-: BaseHandle(impl)
+: BaseHandle( impl )
 {
 }
 
 void ControlRenderer::SetSize( const Vector2& size )
 {
-  GetImplementation( *this ).SetSize(size);
+  GetImplementation( *this ).SetSize( size );
 }
 
-void ControlRenderer::SetClipRect( const Rect<int>& clipRect )
+const Vector2& ControlRenderer::GetSize() const
 {
-  GetImplementation( *this ).SetClipRect(clipRect);
+  return GetImplementation( *this ).GetSize();
 }
 
-void ControlRenderer::SetOffset( const Vector2& offset )
+void ControlRenderer::GetNaturalSize(Vector2& naturalSize ) const
 {
-  GetImplementation( *this ).SetOffset(offset);
+  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
+{
+  GetImplementation( *this ).CreatePropertyMap( map );
 }
 
 } // namespace Toolkit