Cleaning up property public API and usage of typedefs
[platform/core/uifw/dali-toolkit.git] / base / dali-toolkit / internal / controls / buttons / push-button-impl.cpp
index 153c396..9f8452c 100644 (file)
  */
 
 // CLASS HEADER
-
 #include "push-button-impl.h"
 
 // EXTERNAL INCLUDES
-
 #include <algorithm>
+#include <dali/public-api/actors/image-actor.h>
+#include <dali/public-api/object/type-registry.h>
+#include <dali/public-api/scripting/scripting.h>
 
 // INTERNAL INCLUDES
-
 #include "push-button-default-painter-impl.h"
 
 #include <dali-toolkit/public-api/controls/text-view/text-view.h>
@@ -638,6 +638,25 @@ float PushButton::OnAnimationTimeRequested() const
   return GetPushButtonPainter( mPainter )->GetAnimationTime();
 }
 
+void PushButton::OnButtonStageDisconnection()
+{
+  if( ButtonDown == mState )
+  {
+    if( !mToggleButton )
+    {
+      Toolkit::PushButton handle( GetOwner() );
+
+      // Notifies the painter the button has been released.
+      GetPushButtonPainter( mPainter )->Released( handle );
+
+      if( mAutoRepeating )
+      {
+        mAutoRepeatingTimer.Reset();
+      }
+    }
+  }
+}
+
 PushButton::PushButton()
 : Button(),
   mAutoRepeating( false ),
@@ -694,7 +713,7 @@ bool PushButton::AutoRepeatingSlot()
 void PushButton::OnActivated()
 {
   // When the button is activated, it performs the click action
-  std::vector<Property::Value> attributes;
+  PropertyValueContainer attributes;
   DoClickAction(attributes);
 }
 
@@ -775,7 +794,7 @@ void PushButton::DoClickAction(const PropertyValueContainer& attributes)
   }
 }
 
-bool PushButton::DoAction(BaseObject* object, const std::string& actionName, const std::vector<Property::Value>& attributes)
+bool PushButton::DoAction(BaseObject* object, const std::string& actionName, const PropertyValueContainer& attributes)
 {
   bool ret = false;