X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Fpublic-api%2Fcontrols%2Fbuttons%2Fpush-button.h;h=f761a21f8ed03dab54f06d728ab4b7902f50bd7a;hp=fdcc65745e22c9ad0cdba771b2ff21494b176bdf;hb=HEAD;hpb=4e284359dc32cfcb20c49068406fb341afed833b diff --git a/dali-toolkit/public-api/controls/buttons/push-button.h b/dali-toolkit/public-api/controls/buttons/push-button.h index fdcc657..f761a21 100644 --- a/dali-toolkit/public-api/controls/buttons/push-button.h +++ b/dali-toolkit/public-api/controls/buttons/push-button.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_PUSH_BUTTON_H /* - * Copyright (c) 2019 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. @@ -23,10 +23,8 @@ namespace Dali { - namespace Toolkit { - // Forward declarations namespace Internal DALI_INTERNAL @@ -34,7 +32,7 @@ namespace Internal DALI_INTERNAL // Forward declarations class PushButton; -} +} // namespace DALI_INTERNAL /** * @addtogroup dali_toolkit_controls_buttons * @{ @@ -53,7 +51,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 ); * @@ -88,15 +86,14 @@ class PushButton; class DALI_TOOLKIT_API PushButton : public Button { public: - /** * @brief Enumeration for the start and end property ranges for this control. * @SINCE_1_0.0 */ enum PropertyRange { - PROPERTY_START_INDEX = Button::PROPERTY_END_INDEX + 1, ///< @SINCE_1_0.0 - PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000 ///< Reserving 1000 property indices @SINCE_1_0.0 + PROPERTY_START_INDEX = Button::PROPERTY_END_INDEX + 1, ///< @SINCE_1_0.0 + PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000 ///< Reserving 1000 property indices @SINCE_1_0.0 }; /** @@ -111,16 +108,12 @@ 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 - ICON_PADDING, ///< Property, name "iconPadding", 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 }; }; public: - /** * @brief Creates an uninitialized PushButton; this can be initialized with PushButton::New(). * @@ -134,7 +127,15 @@ public: * @SINCE_1_0.0 * @param[in] pushButton Handle to an object */ - PushButton( const PushButton& pushButton ); + PushButton(const PushButton& pushButton); + + /** + * @brief Move constructor + * @SINCE_1_9.23 + * + * @param[in] rhs A reference to the moved handle + */ + PushButton(PushButton&& rhs) noexcept; /** * @brief Assignment operator. @@ -142,7 +143,16 @@ public: * @param[in] pushButton Handle to an object * @return A reference to this */ - PushButton& operator=( const PushButton& pushButton ); + 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) noexcept; /** * @brief Destructor. @@ -170,10 +180,9 @@ public: * @param[in] handle Handle to an object * @return handle to a PushButton or an uninitialized handle */ - static PushButton DownCast( BaseHandle handle ); + static PushButton DownCast(BaseHandle handle); public: // Not intended for application developers - /// @cond internal /** * @brief Creates a handle using the Toolkit::Internal implementation. @@ -181,7 +190,7 @@ public: // Not intended for application developers * @SINCE_1_0.0 * @param[in] implementation The Control implementation */ - DALI_INTERNAL PushButton( Internal::PushButton& implementation ); + DALI_INTERNAL PushButton(Internal::PushButton& implementation); /** * @brief Allows the creation of this Control from an Internal::CustomActor pointer. @@ -189,7 +198,7 @@ public: // Not intended for application developers * @SINCE_1_0.0 * @param[in] internal A pointer to the internal CustomActor */ - DALI_INTERNAL PushButton( Dali::Internal::CustomActor* internal ); + DALI_INTERNAL PushButton(Dali::Internal::CustomActor* internal); /// @endcond };