X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Fpublic-api%2Fcontrols%2Fscrollable%2Fscrollable.h;h=2a35e668eac1c13769fae9a8e38f2f69b7b717b1;hb=HEAD;hp=df051bdca19a336ebc9ae589d61a7096ab4e46f0;hpb=675f5551ef3c7ca20ec45c36b865a5092883af43;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/public-api/controls/scrollable/scrollable.h b/dali-toolkit/public-api/controls/scrollable/scrollable.h index df051bd..2a35e66 100644 --- a/dali-toolkit/public-api/controls/scrollable/scrollable.h +++ b/dali-toolkit/public-api/controls/scrollable/scrollable.h @@ -1,8 +1,8 @@ -#ifndef __DALI_TOOLKIT_SCROLLABLE_H__ -#define __DALI_TOOLKIT_SCROLLABLE_H__ +#ifndef DALI_TOOLKIT_SCROLLABLE_H +#define DALI_TOOLKIT_SCROLLABLE_H /* - * Copyright (c) 2015 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 { - namespace Internal DALI_INTERNAL { class Scrollable; @@ -50,31 +48,30 @@ class Scrollable; * | scrollUpdated | @ref ScrollUpdatedSignal() | * @SINCE_1_0.0 */ -class DALI_IMPORT_API Scrollable : public Control +class DALI_TOOLKIT_API Scrollable : public Control { public: - /** - * @brief The start and end property ranges for this control. + * @brief Enumeration for the start and end property ranges for this control. * @SINCE_1_0.0 */ enum PropertyRange { PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1, ///< @SINCE_1_0.0 - PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000, ///< Reserve property indices @SINCE_1_0.0 + PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000, ///< Reserve property indices @SINCE_1_0.0 ANIMATABLE_PROPERTY_START_INDEX = ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX, - ANIMATABLE_PROPERTY_END_INDEX = ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX + 1000 ///< Reserve animatable property indices @SINCE_1_0.0 + ANIMATABLE_PROPERTY_END_INDEX = ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX + 1000 ///< Reserve animatable property indices @SINCE_1_0.0 }; /** - * @brief An enumeration of properties belonging to the Scrollable class. + * @brief Enumeration for the instance of properties belonging to the Scrollable class. * @SINCE_1_0.0 */ struct Property { /** - * @brief An enumeration of properties belonging to the Scrollable class. + * @brief Enumeration for the instance of properties belonging to the Scrollable class. * @SINCE_1_0.0 */ enum @@ -101,12 +98,11 @@ public: // Typedefs - typedef Signal< void ( const Vector2& ) > ScrollStartedSignalType; ///< ScrollStarted signal type @SINCE_1_0.0 - typedef Signal< void ( const Vector2& ) > ScrollCompletedSignalType; ///< ScrollCompleted signal type @SINCE_1_0.0 - typedef Signal< void ( const Vector2& ) > ScrollUpdatedSignalType; ///< Scroll updated signal type @SINCE_1_0.0 + typedef Signal ScrollStartedSignalType; ///< ScrollStarted signal type @SINCE_1_0.0 + typedef Signal ScrollCompletedSignalType; ///< ScrollCompleted signal type @SINCE_1_0.0 + typedef Signal ScrollUpdatedSignalType; ///< Scroll updated signal type @SINCE_1_0.0 public: - /** * @brief Creates an uninitialized Scrollable handle. * @SINCE_1_0.0 @@ -121,20 +117,37 @@ public: * @SINCE_1_0.0 * @param handle to copy from */ - Scrollable( const Scrollable& handle ); + Scrollable(const Scrollable& handle); + + /** + * @brief Move constructor + * @SINCE_1_9.23 + * + * @param[in] rhs A reference to the moved handle + */ + Scrollable(Scrollable&& rhs) noexcept; /** * @brief Assignment operator. * * Changes this handle to point to another real object. * @SINCE_1_0.0 - * @param[in] handle to copy from + * @param[in] handle Handle to copy from * @return A reference to this */ - Scrollable& operator=( const Scrollable& handle ); + Scrollable& operator=(const Scrollable& handle); /** - * @brief Destructor + * @brief Move assignment + * @SINCE_1_9.23 + * + * @param[in] rhs A reference to the moved handle + * @return A reference to this + */ + Scrollable& operator=(Scrollable&& rhs) noexcept; + + /** + * @brief Destructor. * * This is non-virtual since derived Handle types must not contain data or virtual methods. * @SINCE_1_0.0 @@ -142,16 +155,16 @@ public: ~Scrollable(); /** - * @brief Downcast a handle to Scrollable handle. + * @brief Downcasts a handle to Scrollable handle. * - * If handle points to a Scrollable the downcast produces valid - * handle. If not the returned handle is left uninitialized. + * If handle points to a Scrollable, the downcast produces valid handle. + * If not, the returned handle is left uninitialized. * * @SINCE_1_0.0 * @param[in] handle Handle to an object * @return A handle to a Scrollable or an uninitialized handle */ - static Scrollable DownCast( BaseHandle handle ); + static Scrollable DownCast(BaseHandle handle); /** * @brief Checks if scroll overshoot has been enabled or not. @@ -170,38 +183,37 @@ public: void SetOvershootEnabled(bool enable); /** - * @brief Set the color of the overshoot effect. + * @brief Sets the color of the overshoot effect. * * @SINCE_1_0.0 - * @param[in] color The color of the overshoot effect. + * @param[in] color The color of the overshoot effect */ - void SetOvershootEffectColor( const Vector4& color ); + void SetOvershootEffectColor(const Vector4& color); /** - * @brief Get the color of the overshoot effect. + * @brief Gets the color of the overshoot effect. * @SINCE_1_0.0 - * @return The color of the overshoot effect. + * @return The color of the overshoot effect */ Vector4 GetOvershootEffectColor() const; /** - * @brief Set the speed of overshoot animation in pixels per second. + * @brief Sets the speed of overshoot animation in pixels per second. * * When the speed is not greater than 0, the overshoot is set instantly with no animation. * @SINCE_1_0.0 - * @param[in] pixelsPerSecond The speed of the overshoot animation. + * @param[in] pixelsPerSecond The speed of the overshoot animation */ - void SetOvershootAnimationSpeed( float pixelsPerSecond ); + void SetOvershootAnimationSpeed(float pixelsPerSecond); /** - * @brief Get the speed of overshoot animation in pixels per second. + * @brief Gets the speed of overshoot animation in pixels per second. * @SINCE_1_0.0 - * @return The speed of the overshoot animation. + * @return The speed of the overshoot animation */ float GetOvershootAnimationSpeed() const; public: // Signals - /** * @brief Signal emitted when the Scrollable has moved (whether by touch or animation). * @@ -210,7 +222,7 @@ public: // Signals * void YourCallbackName(const Vector2& currentScrollPosition); * @endcode * @SINCE_1_0.0 - * @return The signal to connect to. + * @return The signal to connect to * @pre The Object has been initialized. */ ScrollStartedSignalType& ScrollStartedSignal(); @@ -223,7 +235,7 @@ public: // Signals * void YourCallbackName(const Vector2& currentScrollPosition); * @endcode * @SINCE_1_0.0 - * @return The signal to connect to. + * @return The signal to connect to * @pre The Object has been initialized. */ ScrollUpdatedSignalType& ScrollUpdatedSignal(); @@ -236,19 +248,18 @@ public: // Signals * void YourCallbackName(const Vector2& currentScrollPosition); * @endcode * @SINCE_1_0.0 - * @return The signal to connect to. + * @return The signal to connect to * @pre The Object has been initialized. */ ScrollCompletedSignalType& ScrollCompletedSignal(); public: // Not intended for application developers - /// @cond internal /** * @brief Creates a handle using the Toolkit::Internal implementation. * * @SINCE_1_0.0 - * @param[in] implementation The Control implementation. + * @param[in] implementation The Control implementation */ DALI_INTERNAL Scrollable(Internal::Scrollable& implementation); @@ -256,9 +267,9 @@ public: // Not intended for application developers * @brief Allows the creation of this Control from an Internal::CustomActor pointer. * * @SINCE_1_0.0 - * @param[in] internal A pointer to the internal CustomActor. + * @param[in] internal A pointer to the internal CustomActor */ - explicit DALI_INTERNAL Scrollable( Dali::Internal::CustomActor* internal ); + explicit DALI_INTERNAL Scrollable(Dali::Internal::CustomActor* internal); /// @endcond }; @@ -269,4 +280,4 @@ public: // Not intended for application developers } // namespace Dali -#endif // __DALI_TOOLKIT_SCROLLABLE_H__ +#endif // DALI_TOOLKIT_SCROLLABLE_H