Merge "Updated control transitions to work with visual transform" into devel/master
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / buttons / push-button.cpp
index d3f21d7..80f8b16 100644 (file)
  */
 
 // CLASS HEADER
-
 #include <dali-toolkit/public-api/controls/buttons/push-button.h>
 
-// INTERNAL INCLUDES
+// EXTERNAL INCLUDES
+#include <dali/integration-api/debug.h>
 
+#include <dali/public-api/images/resource-image.h>
+
+// INTERNAL INCLUDES
 #include <dali-toolkit/internal/controls/buttons/push-button-impl.h>
-#include <dali/public-api/actors/image-actor.h>
 
 namespace Dali
 {
@@ -74,64 +76,52 @@ PushButton PushButton::DownCast( BaseHandle handle )
   return Control::DownCast<PushButton, Internal::PushButton>(handle);
 }
 
+// Deprecated API
+
 void PushButton::SetButtonImage( Actor image )
 {
-  Dali::Toolkit::GetImplementation( *this ).SetButtonImage( image );
-}
+  DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: SetButtonImage() is deprecated and will be removed from next release. Use Button.SetProperty UNSELECTED_STATE_IMAGE or Styling file instead.\n" );
 
-Actor PushButton::GetButtonImage() const
-{
-  return Dali::Toolkit::GetImplementation( *this ).GetButtonImage();
+  // Passing Image as Actor not supported
 }
 
 void PushButton::SetBackgroundImage( Actor image )
 {
-  Dali::Toolkit::GetImplementation( *this ).SetBackgroundImage( image );
-}
+  DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: SetBackgroundImage() is deprecated and will be removed from next release.\n" );
 
-Actor PushButton::GetBackgroundImage() const
-{
-  return Dali::Toolkit::GetImplementation( *this ).GetBackgroundImage();
+  // Passing Image as Actor not supported}
 }
 
 void PushButton::SetSelectedImage( Actor image )
 {
-  Dali::Toolkit::GetImplementation( *this ).SetSelectedImage( image );
-}
+  DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: SetSelectedImage() is deprecated and will be removed from next release. Use Button.SetProperty SELECTED_STATE_IMAGE or Styling file instead.\n" );
 
-Actor PushButton::GetSelectedImage() const
-{
-  return Dali::Toolkit::GetImplementation( *this ).GetSelectedImage();
+  // Passing Image as Actor not supported}
 }
 
 void PushButton::SetSelectedBackgroundImage( Actor image )
 {
-  Dali::Toolkit::GetImplementation( *this ).SetSelectedBackgroundImage( image );
-}
+  DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: SetSelectedBackgroundImage() is deprecated and will be removed from next release.\n" );
 
-Actor PushButton::GetSelectedBackgroundImage() const
-{
-  return Dali::Toolkit::GetImplementation( *this ).GetSelectedBackgroundImage();
+  // Passing Image as Actor not supported}
 }
 
 void PushButton::SetDisabledBackgroundImage( Actor image )
 {
-  Dali::Toolkit::GetImplementation( *this ).SetDisabledBackgroundImage( image );
-}
-
-Actor PushButton::GetDisabledBackgroundImage() const
-{
-  return Dali::Toolkit::GetImplementation( *this ).GetDisabledBackgroundImage();
+  DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: SetDisabledBackgroundImage() is deprecated and will be removed from next release.\n" );
+  // Passing Image as Actor not supported}
 }
 
 void PushButton::SetDisabledImage( Actor image )
 {
-  Dali::Toolkit::GetImplementation( *this ).SetDisabledImage( image );
+  DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: SetDisabledImage() is deprecated and will be removed from next release. Use Button.SetProperty DISABLED_STATE_IMAGE or Styling file instead.\n" );
+  // Passing Image as Actor not supported
 }
 
-Actor PushButton::GetDisabledImage() const
+void PushButton::SetDisabledSelectedImage( Actor image )
 {
-  return Dali::Toolkit::GetImplementation( *this ).GetDisabledImage();
+  DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: SetDisabledSelectedImage() is deprecated and will be removed from next release.\n" );
+  // Passing Image as Actor not supported
 }
 
 } // namespace Toolkit