Merge "Add a TextEditor property to limit input to maximum characters" into devel...
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / buttons / push-button.h
index f3cbea8..e237cc8 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_TOOLKIT_PUSH_BUTTON_H__
-#define __DALI_TOOLKIT_PUSH_BUTTON_H__
+#ifndef DALI_TOOLKIT_PUSH_BUTTON_H
+#define DALI_TOOLKIT_PUSH_BUTTON_H
 
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -53,7 +53,7 @@ class PushButton;
  * void HelloWorldExample::Create( Application& application )
  * {
  *   PushButton button = PushButton::New();
- *   button.SetParentOrigin( ParentOrigin::CENTER );
+ *   button.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
  *   button.SetProperty( Button::Property::LABEL, "Press" );
  *   Stage::GetCurrent().Add( button );
  *
@@ -85,7 +85,7 @@ class PushButton;
  * See Button for more details on signals and modifying appearance via properties.
  * @SINCE_1_0.0
  */
-class DALI_IMPORT_API PushButton : public Button
+class DALI_TOOLKIT_API PushButton : public Button
 {
 public:
 
@@ -111,10 +111,7 @@ public:
      */
     enum
     {
-      UNSELECTED_ICON = PROPERTY_START_INDEX, ///< Property, name "unselectedIcon",  type std::string @SINCE_1_0.0 @DEPRECATED_1_2.XX Button::Property::UNSELECTED_VISUAL
-      SELECTED_ICON,                          ///< Property, name "selectedIcon",    type std::string @SINCE_1_0.0 @DEPRECATED_1_2.XX Button::Property::SELECTED_VISUAL
-      ICON_ALIGNMENT,                         ///< Property, name "iconAlignment",   type std::string @SINCE_1_0.0 @DEPRECATED_1_2.XX Use Button::Property::LABEL_RELATIVE_ALIGNMENT
-      LABEL_PADDING,                          ///< Property, name "labelPadding",    type Vector4 @SINCE_1_0.0
+      LABEL_PADDING = PROPERTY_START_INDEX,   ///< Property, name "labelPadding",    type Vector4 @SINCE_1_0.0
       ICON_PADDING,                           ///< Property, name "iconPadding",     type Vector4 @SINCE_1_0.0
     };
   };
@@ -137,6 +134,14 @@ public:
   PushButton( const PushButton& pushButton );
 
   /**
+   * @brief Move constructor
+   * @SINCE_1_9.23
+   *
+   * @param[in] rhs A reference to the moved handle
+   */
+  PushButton( PushButton&& rhs );
+
+  /**
    * @brief Assignment operator.
    * @SINCE_1_0.0
    * @param[in] pushButton Handle to an object
@@ -145,6 +150,15 @@ public:
   PushButton& operator=( const PushButton& pushButton );
 
   /**
+   * @brief Move assignment
+   * @SINCE_1_9.23
+   *
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this
+   */
+  PushButton& operator=( PushButton&& rhs );
+
+  /**
    * @brief Destructor.
    *
    * This is non-virtual since derived Handle types must not contain data or virtual methods.
@@ -172,94 +186,6 @@ public:
    */
   static PushButton DownCast( BaseHandle handle );
 
-  ///////////////////////////////////////////////////////////////////////////
-  // Deprecated API
-
-  using Button::SetButtonImage;
-
-  /**
-   * @DEPRECATED_1_0.50. Instead, use Button::SetUnselectedImage.
-   *
-   * @brief Sets the unselected image with an Actor.
-   *
-   * @SINCE_1_0.0
-   * @param[in] image The Actor to use
-   */
-  void SetButtonImage( Actor image ) DALI_DEPRECATED_API;
-
-  using Button::SetBackgroundImage;
-
-  /**
-   * @DEPRECATED_1_0.50. Instead, use Button::SetBackgroundImage.
-   *
-   * @brief Sets the background image with an Actor.
-   *
-   * @SINCE_1_0.0
-   * @param[in] image The Actor to use
-   */
-  void SetBackgroundImage( Actor image ) DALI_DEPRECATED_API;
-
-  using Button::SetSelectedImage;
-
-  /**
-   * @DEPRECATED_1_0.50. Instead, use Button::SetSelectedImage( const std::string& filename ).
-   *
-   * @brief Sets the selected image with an Actor.
-   *
-   * @SINCE_1_0.0
-   * @param[in] image The Actor to use
-   */
-  void SetSelectedImage( Actor image ) DALI_DEPRECATED_API;
-
-  using Button::SetSelectedBackgroundImage;
-
-  /**
-   * @DEPRECATED_1_0.50. Instead, use Button::SetSelectedBackgroundImage.
-   *
-   * @brief Sets the selected background image with an Actor.
-   *
-   * @SINCE_1_0.0
-   * @param[in] image The Actor to use
-   */
-  void SetSelectedBackgroundImage( Actor image ) DALI_DEPRECATED_API;
-
-  using Button::SetDisabledBackgroundImage;
-
-  /**
-   * @DEPRECATED_1_0.50. Instead, use Button::SetDisabledBackgroundImage.
-   *
-   * @brief Sets the disabled background image with an Actor.
-   *
-   * @SINCE_1_0.0
-   * @param[in] image The Actor to use
-   */
-  void SetDisabledBackgroundImage( Actor image ) DALI_DEPRECATED_API;
-
-  using Button::SetDisabledImage;
-
-  /**
-   * @DEPRECATED_1_0.50. Instead, use Button::SetDisabledImage.
-   *
-   * @brief Sets the disabled image with an Actor.
-   *
-   * @SINCE_1_0.0
-   * @param[in] image The Actor to use
-   */
-  void SetDisabledImage( Actor image ) DALI_DEPRECATED_API;
-
-  using Button::SetDisabledSelectedImage;
-
-  /**
-   * @DEPRECATED_1_0.50. Instead, use Button::SetDisabledSelectedImage.
-   *
-   * @brief Sets the disabled selected image with an Actor.
-   *
-   * @SINCE_1_0.0
-   * @param[in] image The Actor to use
-   */
-  void SetDisabledSelectedImage( Actor image ) DALI_DEPRECATED_API;
-
-
 public: // Not intended for application developers
 
   /// @cond internal
@@ -288,4 +214,4 @@ public: // Not intended for application developers
 
 } // namespace Dali
 
-#endif // __DALI_TOOLKIT_PUSH_BUTTON_H__
+#endif // DALI_TOOLKIT_PUSH_BUTTON_H