Add descriptions and example codes
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / buttons / check-box-button.h
index 735bcfc..ca5c288 100644 (file)
@@ -43,16 +43,39 @@ class CheckBoxButton;
  *
  * By default a CheckBoxButton emits a Button::ClickedSignal() signal when the button changes its state to selected or unselected.
  *
  *
  * By default a CheckBoxButton emits a Button::ClickedSignal() signal when the button changes its state to selected or unselected.
  *
- * The button's appearance could be modified by setting images or actors with CheckBoxButton::SetBackgroundImage,
- * CheckBoxButton::SetSelectedImage, CheckBoxButton::SetDisabledBackgroundImage and CheckBoxButton::SetDisabledSelectedImage.
+ * The button's appearance could be modified by Button::SetUnselectedImage, Button::SetBackgroundImage,
+ * Button::SetSelectedImage, Button::SetSelectedBackgroundImage, Button::SetDisabledBackgroundImage,
+ * Button::SetDisabledImage, and Button::SetDisabledSelectedImage.
  *
  * When the button is not disabled, if it's not selected it only shows the \e background image. The \e selected image is shown over the
  * \e background image when the box is selected (\e background image is not replaced by \e selected image).
  *
  * When the button is disabled, \e background image and \e selected image are replaced by \e disabled images.
  *
  *
  * When the button is not disabled, if it's not selected it only shows the \e background image. The \e selected image is shown over the
  * \e background image when the box is selected (\e background image is not replaced by \e selected image).
  *
  * When the button is disabled, \e background image and \e selected image are replaced by \e disabled images.
  *
- * CheckBoxButton doesn't have a text. However, a Dali::Toolkit::TableView with a Dali::TextActor or a Dali::Toolkit::TextView
- * and a CheckBoxButton could be used instead.
+ * Usage example: -
+ *
+ * @code
+ * // in Creating a DALi Application
+ * void HelloWorldExample::Create( Application& application )
+ * {
+ *   CheckBoxButton button = CheckBoxButton::New();
+ *   button.SetParentOrigin( ParentOrigin::CENTER );
+ *   button.SetLabelText( "Check" );
+ *   button.SetSize( 200, 40 );
+ *   button.SetBackgroundColor( Color::WHITE );
+ *   Stage::GetCurrent().Add( button );
+ *
+ *   // Connect to a button signal emitted by the button
+ *   button.StateChangedSignal().Connect( this, &HelloWorldExample::OnButtonStateChanged );
+ * }
+ *
+ * bool HelloWorldExample::OnButtonStateChanged( Button button )
+ * {
+ *   // Do something when the button state is changed
+ *   // You can get the state using button.IsSelected() call
+ *   return true;
+ * }
+ * @endcode
  * @SINCE_1_0.0
  */
 class DALI_IMPORT_API CheckBoxButton : public Button
  * @SINCE_1_0.0
  */
 class DALI_IMPORT_API CheckBoxButton : public Button
@@ -60,7 +83,7 @@ class DALI_IMPORT_API CheckBoxButton : public Button
 public:
 
   /**
 public:
 
   /**
-   * @brief Create an uninitialized CheckBoxButton; this can be initialized with CheckBoxButton::New()
+   * @brief Create an uninitialized CheckBoxButton; this can be initialized with CheckBoxButton::New().
    * Calling member functions with an uninitialized Dali::Object is not allowed.
    * @SINCE_1_0.0
    */
    * Calling member functions with an uninitialized Dali::Object is not allowed.
    * @SINCE_1_0.0
    */
@@ -94,7 +117,9 @@ public:
   static CheckBoxButton New();
 
   /**
   static CheckBoxButton New();
 
   /**
-   * @brief Downcast an Object handle to CheckBoxButton. If handle points to a CheckBoxButton the
+   * @brief Downcast a handle to CheckBoxButton handle.
+   *
+   * If handle points to a CheckBoxButton the
    * downcast produces valid handle. If not the returned handle is left uninitialized.
    * @SINCE_1_0.0
    * @param[in] handle Handle to an object
    * downcast produces valid handle. If not the returned handle is left uninitialized.
    * @SINCE_1_0.0
    * @param[in] handle Handle to an object
@@ -104,6 +129,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.
    * @SINCE_1_0.0
   /**
    * @brief Creates a handle using the Toolkit::Internal implementation.
    * @SINCE_1_0.0
@@ -117,6 +143,7 @@ public: // Not intended for application developers
    * @param[in]  internal  A pointer to the internal CustomActor.
    */
   DALI_INTERNAL CheckBoxButton( Dali::Internal::CustomActor* internal );
    * @param[in]  internal  A pointer to the internal CustomActor.
    */
   DALI_INTERNAL CheckBoxButton( Dali::Internal::CustomActor* internal );
+  /// @endcond
 };
 
 /**
 };
 
 /**