DALi signals refactor to remove V2 naming
[platform/core/uifw/dali-toolkit.git] / base / dali-toolkit / public-api / controls / buttons / button.h
index 8d95226..d89ddc8 100644 (file)
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/control.h>
 
-namespace Dali DALI_IMPORT_API
+namespace Dali
 {
 
-namespace Internal DALI_INTERNAL
-{
-class CustomActor;
-}
-
 namespace Toolkit
 {
 
@@ -47,12 +42,13 @@ class Button;
  *
  * When the \e dimmed property is set to \e true, no signal is emitted.
  */
-class Button : public Control
+class DALI_IMPORT_API Button : public Control
 {
 public:
 
   // Signal Names
   static const char* const SIGNAL_CLICKED; ///< name "clicked"
+  static const char* const SIGNAL_TOGGLED; ///< name "toggled"
 
   // Properties
   static const Property::Index PROPERTY_DIMMED; ///< name "dimmed", @see SetDimmed(), type BOOLEAN
@@ -128,12 +124,22 @@ public: //Signals
   /**
    * @brief Button Clicked signal type
    */
-  typedef SignalV2< bool ( Button ) > ClickedSignalV2;
+  typedef Signal< bool ( Button ) > ClickedSignalType;
+
+  /**
+   * @brief Button toggled signal type
+   */
+  typedef Signal< bool ( Button, bool ) > ToggledSignalType;
 
   /**
    * @brief Signal emitted when the button is touched and the touch point doesn't leave the boundary of the button.
    */
-  ClickedSignalV2& ClickedSignal();
+  ClickedSignalType& ClickedSignal();
+
+  /**
+   * @brief Signal emitted when the button's state is toggled.
+   */
+  ToggledSignalType& ToggledSignal();
 
 public: // Not intended for application developers
 
@@ -142,14 +148,14 @@ public: // Not intended for application developers
    *
    * @param[in]  implementation  The Control implementation.
    */
-  Button( Internal::Button& implementation );
+  DALI_INTERNAL Button( Internal::Button& implementation );
 
   /**
    * @brief Allows the creation of this Control from an Internal::CustomActor pointer.
    *
    * @param[in]  internal  A pointer to the internal CustomActor.
    */
-  Button( Dali::Internal::CustomActor* internal );
+  DALI_INTERNAL Button( Dali::Internal::CustomActor* internal );
 };
 
 } // namespace Toolkit