Merge remote-tracking branch 'origin/tizen' into new_text
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / buttons / check-box-button-impl.h
index aa60871..7f55610 100644 (file)
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/common/dali-vector.h>
+#include <dali/public-api/animation/animation.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/buttons/check-box-button.h>
+#include <dali-toolkit/public-api/shader-effects/image-region-effect.h>
 
 #include "button-impl.h"
 
@@ -50,7 +52,7 @@ public:
    */
   static Dali::Toolkit::CheckBoxButton New();
 
-protected:
+private:
 
   /**
    * Construct a new CheckBoxButton.
@@ -62,6 +64,56 @@ protected:
    */
   virtual ~CheckBoxButton();
 
+private: // From Button
+
+
+  /**
+   * @copydoc Toolkit::Internal::Button::OnButtonInitialize()
+   */
+  virtual void OnButtonInitialize();
+
+  /**
+   * @copydoc Toolkit::Internal::Button::OnLabelSet()
+   */
+  virtual void OnLabelSet();
+
+  /**
+   * @copydoc Toolkit::Internal::Button::OnSelected()
+   */
+  virtual bool OnSelected();
+
+  /**
+   * @copydoc Toolkit::Internal::Button::OnDisabled()
+   */
+  virtual bool OnDisabled();
+
+  /**
+   * @copydoc Toolkit::Internal::Button::StopAllAnimations()
+   */
+  virtual void StopAllAnimations();
+
+private:
+
+  /**
+   * Adds the actor to the transition animation.
+   * It creates a transition animation if needed and starts the animation.
+   * @param[in] actor The actor.
+   */
+  void StartTransitionAnimation( Actor& actor );
+
+  /**
+   * Stops the transition animation.
+   * @param[in] remove If true, removes the fadeout actor from root.
+   */
+  void StopTransitionAnimation( bool remove = true );
+
+  // slots
+
+  /**
+   * Called when the transition animation finishes.
+   */
+  void TransitionAnimationFinished( Dali::Animation& source );
+
 private:
 
   // Undefined
@@ -69,6 +121,10 @@ private:
 
   // Undefined
   CheckBoxButton& operator=( const CheckBoxButton& );
+
+private:
+  Animation                 mTransitionAnimation;  ///< Animation used in the state transitions.
+  ImageRegionEffect         mTickUVEffect;         ///< ImageRegionEffect to expand the tick across
 };
 
 } // namespace Internal