Removed REQUIRES_STYLE_CHANGE_SIGNALS
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / control.cpp
index b882c1d..07170ff 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 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.
@@ -23,6 +23,7 @@
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/control-impl.h>
+#include <dali-toolkit/internal/controls/control/control-data-impl.h>
 
 namespace Dali
 {
@@ -39,23 +40,17 @@ Control::Control()
 {
 }
 
-Control::Control( const Control& uiControl )
-: CustomActor( uiControl  )
-{
-}
+Control::Control( const Control& uiControl ) = default;
+
+Control::Control( Control&& rhs ) = default;
 
 Control::~Control()
 {
 }
 
-Control& Control::operator=( const Control& handle )
-{
-  if( &handle != this )
-  {
-    CustomActor::operator=( handle );
-  }
-  return *this;
-}
+Control& Control::operator=( const Control& handle ) = default;
+
+Control& Control::operator=( Control&& rhs ) = default;
 
 Control Control::DownCast( BaseHandle handle )
 {
@@ -112,23 +107,24 @@ void Control::SetBackgroundColor( const Vector4& color )
   Internal::GetImplementation(*this).SetBackgroundColor( color );
 }
 
-Vector4 Control::GetBackgroundColor() const
+void Control::ClearBackground()
 {
-  DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: GetBackgroundColor() is deprecated and will be removed from next release. use Property::BACKGROUND instead.\n" );
-
-  return Internal::GetImplementation(*this).GetBackgroundColor();
+  Internal::GetImplementation(*this).ClearBackground();
 }
 
-void Control::SetBackgroundImage( Image image )
+bool Control::IsResourceReady() const
 {
-  DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: SetBackgroundImage() is deprecated and will be removed from next release. use Property::BACKGROUND instead.\n" );
+  const Internal::Control& internalControl = Toolkit::Internal::GetImplementation( *this );
+  const Internal::Control::Impl& controlDataImpl = Internal::Control::Impl::Get( internalControl );
 
-  Internal::GetImplementation(*this).SetBackgroundImage( image );
+  return controlDataImpl.IsResourceReady();
 }
 
-void Control::ClearBackground()
+Toolkit::Visual::ResourceStatus Control::GetVisualResourceStatus( Dali::Property::Index index )
 {
-  Internal::GetImplementation(*this).ClearBackground();
+  const Internal::Control& internalControl = Toolkit::Internal::GetImplementation( *this );
+  const Internal::Control::Impl& controlDataImpl = Internal::Control::Impl::Get( internalControl );
+  return controlDataImpl.GetVisualResourceStatus( index );
 }
 
 Control::KeyEventSignalType& Control::KeyEventSignal()
@@ -146,6 +142,14 @@ Control::KeyInputFocusSignalType& Control::KeyInputFocusLostSignal()
   return Internal::GetImplementation(*this).KeyInputFocusLostSignal();
 }
 
+Control::ResourceReadySignalType&  Control::ResourceReadySignal()
+{
+  Internal::Control& internalControl = Toolkit::Internal::GetImplementation( *this );
+  Internal::Control::Impl& controlImpl = Internal::Control::Impl::Get( internalControl );
+
+  return controlImpl.mResourceReadySignal;
+}
+
 Control::Control(Internal::Control& implementation)
 : CustomActor(implementation)
 {