Add property SHADOW to Control
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / control-impl.cpp
index 066fb3b..46f24d8 100755 (executable)
@@ -185,11 +185,6 @@ void Control::SetBackgroundColor( const Vector4& color )
   SetBackground( map );
 }
 
-Vector4 Control::GetBackgroundColor() const
-{
-  return mImpl->mBackgroundColor;
-}
-
 void Control::SetBackground( const Property::Map& map )
 {
   Toolkit::Visual::Base visual = Toolkit::VisualFactory::Get().CreateVisual( map );
@@ -203,24 +198,37 @@ void Control::SetBackground( const Property::Map& map )
   }
 }
 
-void Control::SetBackgroundImage( Image image )
+void Control::ClearBackground()
 {
-  Toolkit::Visual::Base visual = Toolkit::VisualFactory::Get().CreateVisual( image );
+   mImpl->UnregisterVisual( Toolkit::Control::Property::BACKGROUND );
+   mImpl->mBackgroundColor = Color::TRANSPARENT;
+
+   // Trigger a size negotiation request that may be needed when unregistering a visual.
+   RelayoutRequest();
+}
+
+void Control::SetShadow( const Property::Map& map )
+{
+  Toolkit::Visual::Base visual = Toolkit::VisualFactory::Get().CreateVisual( map );
+  visual.SetName("shadow");
+
   if( visual )
   {
-    mImpl->RegisterVisual( Toolkit::Control::Property::BACKGROUND, visual, DepthIndex::BACKGROUND );
+    mImpl->RegisterVisual( Toolkit::DevelControl::Property::SHADOW, visual, DepthIndex::BACKGROUND_EFFECT );
+
+    RelayoutRequest();
   }
 }
 
-void Control::ClearBackground()
+void Control::ClearShadow()
 {
-   mImpl->UnregisterVisual( Toolkit::Control::Property::BACKGROUND );
-   mImpl->mBackgroundColor = Color::TRANSPARENT;
+   mImpl->UnregisterVisual( Toolkit::DevelControl::Property::SHADOW );
 
    // Trigger a size negotiation request that may be needed when unregistering a visual.
    RelayoutRequest();
 }
 
+
 void Control::EnableGestureDetection(Gesture::Type type)
 {
   if ( (type & Gesture::Pinch) && !mImpl->mPinchGestureDetector )