Formatting API
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / visual-factory / visual-base.cpp
index dfe7370..94f7617 100644 (file)
@@ -1,5 +1,5 @@
- /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+/*
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 Visual::Base::Base()
 {
 }
@@ -35,89 +33,70 @@ Visual::Base::~Base()
 {
 }
 
-Visual::Base::Base( const Visual::Base& handle )
-: BaseHandle( handle )
+Visual::Base::Base(const Visual::Base& handle)
+: BaseHandle(handle)
 {
 }
 
-Visual::Base& Visual::Base::operator=( const Visual::Base& handle )
+Visual::Base& Visual::Base::operator=(const Visual::Base& handle)
 {
-  BaseHandle::operator=( handle );
+  BaseHandle::operator=(handle);
   return *this;
 }
 
-Visual::Base::Base(Internal::Visual::Base *impl)
-: BaseHandle( impl )
-{
-}
-
-void Visual::Base::SetName( const std::string& name )
-{
-  GetImplementation( *this ).SetName( name );
-}
-
-const std::string& Visual::Base::GetName()
-{
-  return GetImplementation( *this ).GetName();
-}
-
-void Visual::Base::SetSize( const Vector2& size )
+Visual::Base::Base(Internal::Visual::Base* impl)
+: BaseHandle(impl)
 {
-  GetImplementation( *this ).SetSize( size );
 }
 
-const Vector2& Visual::Base::GetSize() const
+void Visual::Base::SetName(const std::string& name)
 {
-  return GetImplementation( *this ).GetSize();
+  GetImplementation(*this).SetName(name);
 }
 
-void Visual::Base::GetNaturalSize(Vector2& naturalSize ) const
+const std::string& Visual::Base::GetName() const
 {
-  GetImplementation( *this ).GetNaturalSize( naturalSize );
+  return GetImplementation(*this).GetName();
 }
 
-void Visual::Base::SetDepthIndex( float index )
+void Visual::Base::SetTransformAndSize(const Dali::Property::Map& transform, Size controlSize)
 {
-  GetImplementation( *this ).SetDepthIndex( index );
+  GetImplementation(*this).SetTransformAndSize(transform, controlSize);
 }
 
-float Visual::Base::GetDepthIndex() const
+float Visual::Base::GetHeightForWidth(float width)
 {
-  return GetImplementation( *this ).GetDepthIndex();
+  return GetImplementation(*this).GetHeightForWidth(width);
 }
 
-void Visual::Base::SetOnStage( Actor& actor )
+float Visual::Base::GetWidthForHeight(float height)
 {
-  GetImplementation( *this ).SetOnStage( actor );
+  return GetImplementation(*this).GetWidthForHeight(height);
 }
 
-void Visual::Base::SetOffStage( Actor& actor )
+void Visual::Base::GetNaturalSize(Vector2& naturalSize)
 {
-  GetImplementation( *this ).SetOffStage( actor );
+  GetImplementation(*this).GetNaturalSize(naturalSize);
 }
 
-void Visual::Base::RemoveAndReset( Actor& actor )
+void Visual::Base::SetDepthIndex(int index)
 {
-  if( actor && *this )
-  {
-    SetOffStage( actor );
-  }
-  Reset();
+  GetImplementation(*this).SetDepthIndex(index);
 }
 
-void Visual::Base::CreatePropertyMap( Property::Map& map ) const
+int Visual::Base::GetDepthIndex() const
 {
-  GetImplementation( *this ).CreatePropertyMap( map );
+  return GetImplementation(*this).GetDepthIndex();
 }
 
-void Visual::Base::SetProperty( Dali::Property::Index index, const Dali::Property::Value& propertyValue )
+void Visual::Base::CreatePropertyMap(Dali::Property::Map& map) const
 {
-  GetImplementation( *this ).SetProperty( index, propertyValue );
+  GetImplementation(*this).CreatePropertyMap(map);
 }
 
-Dali::Property::Value Visual::Base::GetProperty( Dali::Property::Index index )
+Visual::Type Visual::Base::GetType() const
 {
-  return GetImplementation( *this ).GetProperty( index );
+  return GetImplementation(*this).GetType();
 }
 
 } // namespace Toolkit