Add descriptions and example codes
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / buttons / push-button.h
index 0bb6656..603601d 100644 (file)
@@ -46,6 +46,42 @@ class PushButton;
  * By default a PushButton emits a Button::PressedSignal() signal when the button is pressed, a Button::ClickedSignal() signal when it's clicked
  * and a Button::ReleasedSignal() signal when it's released or having pressed it, the touch point leaves the boundary of the button.
  *
  * By default a PushButton emits a Button::PressedSignal() signal when the button is pressed, a Button::ClickedSignal() signal when it's clicked
  * and a Button::ReleasedSignal() signal when it's released or having pressed it, the touch point leaves the boundary of the button.
  *
+ * Usage example: -
+ *
+ * @code
+ * // in Creating a DALi Application
+ * void HelloWorldExample::Create( Application& application )
+ * {
+ *   PushButton button = PushButton::New();
+ *   button.SetParentOrigin( ParentOrigin::CENTER );
+ *   button.SetLabelText( "Press" );
+ *   Stage::GetCurrent().Add( button );
+ *
+ *   // Connect to button signals emitted by the button
+ *   button.ClickedSignal().Connect( this, &HelloWorldExample::OnButtonClicked );
+ *   button.PressedSignal().Connect( this, &HelloWorldExample::OnButtonPressed );
+ *   button.ReleasedSignal().Connect( this, &HelloWorldExample::OnButtonReleased );
+ * }
+ *
+ * bool HelloWorldExample::OnButtonClicked( Button button )
+ * {
+ *   // Do something when the button is clicked
+ *   return true;
+ * }
+ *
+ * bool HelloWorldExample::OnButtonPressed( Button button )
+ * {
+ *   // Do something when the button is pressed
+ *   return true;
+ * }
+ *
+ * bool HelloWorldExample::OnButtonReleased( Button button )
+ * {
+ *   // Do something when the button is released
+ *   return true;
+ * }
+ * @endcode
+ *
  * See Button for more detail on signals and modifying appearance via properties.
  * @SINCE_1_0.0
  */
  * See Button for more detail on signals and modifying appearance via properties.
  * @SINCE_1_0.0
  */
@@ -118,7 +154,7 @@ public:
   static PushButton New();
 
   /**
   static PushButton New();
 
   /**
-   * @brief Downcast an Object handle to PushButton.
+   * @brief Downcast a handle to PushButton handle.
    *
    * If handle points to a PushButton the downcast produces valid
    * handle. If not the returned handle is left uninitialized.
    *
    * If handle points to a PushButton the downcast produces valid
    * handle. If not the returned handle is left uninitialized.
@@ -135,7 +171,7 @@ public:
   using Button::SetButtonImage;
 
   /**
   using Button::SetButtonImage;
 
   /**
-   * @deprecated DALi 1.0.50
+   * @DEPRECATED_1_0.50. Instead, use Button::SetUnselectedImage.
    *
    * @brief Sets the unselected image with an Actor.
    *
    *
    * @brief Sets the unselected image with an Actor.
    *
@@ -147,7 +183,7 @@ public:
   using Button::SetBackgroundImage;
 
   /**
   using Button::SetBackgroundImage;
 
   /**
-   * @deprecated DALi 1.0.50
+   * @DEPRECATED_1_0.50. Instead, use Button::SetBackgroundImage.
    *
    * @brief Sets the background image with an Actor.
    *
    *
    * @brief Sets the background image with an Actor.
    *
@@ -159,7 +195,7 @@ public:
   using Button::SetSelectedImage;
 
   /**
   using Button::SetSelectedImage;
 
   /**
-   * @deprecated DALi 1.0.50
+   * @DEPRECATED_1_0.50. Instead, use Button::SetSelectedImage( const std::string& filename ).
    *
    * @brief Sets the selected image with an Actor.
    *
    *
    * @brief Sets the selected image with an Actor.
    *
@@ -171,7 +207,7 @@ public:
   using Button::SetSelectedBackgroundImage;
 
   /**
   using Button::SetSelectedBackgroundImage;
 
   /**
-   * @deprecated DALi 1.0.50
+   * @DEPRECATED_1_0.50. Instead, use Button::SetSelectedBackgroundImage.
    *
    * @brief Sets the selected background image with an Actor.
    *
    *
    * @brief Sets the selected background image with an Actor.
    *
@@ -183,7 +219,7 @@ public:
   using Button::SetDisabledBackgroundImage;
 
   /**
   using Button::SetDisabledBackgroundImage;
 
   /**
-   * @deprecated DALi 1.0.50
+   * @DEPRECATED_1_0.50. Instead, use Button::SetDisabledBackgroundImage.
    *
    * @brief Sets the disabled background image with an Actor.
    *
    *
    * @brief Sets the disabled background image with an Actor.
    *
@@ -195,7 +231,7 @@ public:
   using Button::SetDisabledImage;
 
   /**
   using Button::SetDisabledImage;
 
   /**
-   * @deprecated DALi 1.0.50
+   * @DEPRECATED_1_0.50. Instead, use Button::SetDisabledImage.
    *
    * @brief Sets the disabled image with an Actor.
    *
    *
    * @brief Sets the disabled image with an Actor.
    *
@@ -207,7 +243,7 @@ public:
   using Button::SetDisabledSelectedImage;
 
   /**
   using Button::SetDisabledSelectedImage;
 
   /**
-   * @deprecated DALi 1.0.50
+   * @DEPRECATED_1_0.50. Instead, use Button::SetDisabledSelectedImage.
    *
    * @brief Sets the disabled selected image with an Actor.
    *
    *
    * @brief Sets the disabled selected image with an Actor.
    *
@@ -219,6 +255,7 @@ public:
 
 public: // Not intended for application developers
 
 
 public: // Not intended for application developers
 
+  /// @cond internal
   /**
    * @brief Creates a handle using the Toolkit::Internal implementation.
    *
   /**
    * @brief Creates a handle using the Toolkit::Internal implementation.
    *
@@ -234,6 +271,7 @@ public: // Not intended for application developers
    * @param[in]  internal  A pointer to the internal CustomActor.
    */
   DALI_INTERNAL PushButton( Dali::Internal::CustomActor* internal );
    * @param[in]  internal  A pointer to the internal CustomActor.
    */
   DALI_INTERNAL PushButton( Dali::Internal::CustomActor* internal );
+  /// @endcond
 };
 
 /**
 };
 
 /**