projects
/
platform
/
core
/
uifw
/
dali-toolkit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[dali_2.3.28] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git]
/
dali-toolkit
/
public-api
/
controls
/
scrollable
/
scroll-view
/
scroll-view.h
diff --git
a/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.h
b/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.h
old mode 100755
(executable)
new mode 100644
(file)
index
2822027
..
76f3e20
--- a/
dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.h
+++ b/
dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.h
@@
-2,7
+2,7
@@
#define DALI_TOOLKIT_SCROLL_VIEW_H
/*
#define DALI_TOOLKIT_SCROLL_VIEW_H
/*
- * Copyright (c) 20
19
Samsung Electronics Co., Ltd.
+ * Copyright (c) 20
20
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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-26,10
+26,8
@@
namespace Dali
{
namespace Dali
{
-
namespace Toolkit
{
namespace Toolkit
{
-
namespace Internal DALI_INTERNAL
{
class ScrollView;
namespace Internal DALI_INTERNAL
{
class ScrollView;
@@
-45,9
+43,9
@@
class ScrollView;
*/
enum ClampState
{
*/
enum ClampState
{
- N
otClamped, ///< The quantity isn't clamped @SINCE_1_0.0
- C
lampedToMin, ///< The quantity is clamped to the min value @SINCE_1_0.0
- C
lampedToMax ///< The quantity is clamped to the max value @SINCE_1_0.0
+ N
OT_CLAMPED, ///< The quantity isn't clamped @SINCE_1_9.28
+ C
LAMPED_TO_MIN, ///< The quantity is clamped to the min value @SINCE_1_9.28
+ C
LAMPED_TO_MAX ///< The quantity is clamped to the max value @SINCE_1_9.28
};
/**
};
/**
@@
-66,8
+64,8
@@
struct ClampState2D
*/
enum SnapType
{
*/
enum SnapType
{
- S
nap, ///< Snap @SINCE_1_0.0
- F
lick ///< Flick @SINCE_1_0.0
+ S
NAP, ///< SNAP @SINCE_1_9.28
+ F
LICK ///< FLICK @SINCE_1_9.28
};
/**
};
/**
@@
-76,9
+74,9
@@
enum SnapType
*/
enum DirectionBias
{
*/
enum DirectionBias
{
- D
irectionBiasLeft = -1, ///< Bias scroll snap to Left @SINCE_1_0.0
- D
irectionBiasNone = 0, ///< Don't bias scroll snap @SINCE_1_0.0
- D
irectionBiasRight = 1 ///< Bias scroll snap to Right @SINCE_1_0.0
+ D
IRECTION_BIAS_LEFT = -1, ///< Bias scroll snap to Left @SINCE_1_9.28
+ D
IRECTION_BIAS_NONE = 0, ///< Don't bias scroll snap @SINCE_1_9.28
+ D
IRECTION_BIAS_RIGHT = 1 ///< Bias scroll snap to Right @SINCE_1_9.28
};
/**
};
/**
@@
-88,7
+86,6
@@
enum DirectionBias
class DALI_TOOLKIT_API RulerDomain
{
public:
class DALI_TOOLKIT_API RulerDomain
{
public:
-
/**
* @brief Creates Ruler domain allowing a point to traverse between min and max extents.
*
/**
* @brief Creates Ruler domain allowing a point to traverse between min and max extents.
*
@@
-100,10
+97,9
@@
public:
explicit RulerDomain(float min, float max, bool enabled = true);
public:
explicit RulerDomain(float min, float max, bool enabled = true);
public:
-
- float min; ///< Minimum extent (point cannot traverse less than this)
- float max; ///< Maximum extent (point cannot traverse greater than this)
- bool enabled; ///< Whether domain has been enabled or not.
+ float min; ///< Minimum extent (point cannot traverse less than this)
+ float max; ///< Maximum extent (point cannot traverse greater than this)
+ bool enabled; ///< Whether domain has been enabled or not.
/**
* @brief Clamps value (x) from (min) to (max).
/**
* @brief Clamps value (x) from (min) to (max).
@@
-132,7
+128,7
@@
public:
* @param[out] clamped Whether clamping occurred and which size (None, Min or Max)
* @return The clamped value
*/
* @param[out] clamped Whether clamping occurred and which size (None, Min or Max)
* @return The clamped value
*/
- float Clamp(float x, float length, float scale, ClampState
&
clamped) const;
+ float Clamp(float x, float length, float scale, ClampState
&
clamped) const;
/**
* @brief Returns (max-min) size of ruler.
/**
* @brief Returns (max-min) size of ruler.
@@
-141,7
+137,6
@@
public:
* @return The size of the ruler from min to max
*/
float GetSize() const;
* @return The size of the ruler from min to max
*/
float GetSize() const;
-
};
// Forward declare future extension interface
};
// Forward declare future extension interface
@@
-161,13
+156,13
@@
public:
* @brief Enumeration for the type of the ruler.
* @SINCE_1_0.0
*/
* @brief Enumeration for the type of the ruler.
* @SINCE_1_0.0
*/
- enum RulerType {
- Fixed, ///< A fixed ruler @SINCE_1_0.0
- Free ///< A free ruler @SINCE_1_0.0
+ enum RulerType
+ {
+ FIXED, ///< A fixed ruler @SINCE_1_9.28
+ FREE ///< A free ruler @SINCE_1_9.28
};
public:
};
public:
-
/**
* @brief Constructs ruler, enabled by default, with limitless domain.
* @SINCE_1_0.0
/**
* @brief Constructs ruler, enabled by default, with limitless domain.
* @SINCE_1_0.0
@@
-202,7
+197,7
@@
public:
* @param[in] wrap Enable wrap mode
* @return The position representing this page point
*/
* @param[in] wrap Enable wrap mode
* @return The position representing this page point
*/
- virtual float GetPositionFromPage(unsigned int page, unsigned int
&
volume, bool wrap) const = 0;
+ virtual float GetPositionFromPage(unsigned int page, unsigned int
&
volume, bool wrap) const = 0;
/**
* @brief Returns page from position, based on whatever the ruler
/**
* @brief Returns page from position, based on whatever the ruler
@@
-231,10
+226,12
@@
public:
* @SINCE_1_0.0
* @return The extension interface of the Ruler
*/
* @SINCE_1_0.0
* @return The extension interface of the Ruler
*/
- virtual RulerExtension* GetExtension() { return NULL; }
+ virtual RulerExtension* GetExtension()
+ {
+ return NULL;
+ }
public:
public:
-
/**
* @brief Gets the ruler type.
*
/**
* @brief Gets the ruler type.
*
@@
-277,7
+274,7
@@
public:
* @SINCE_1_0.0
* @return The domain
*/
* @SINCE_1_0.0
* @return The domain
*/
- const RulerDomain
&
GetDomain() const;
+ const RulerDomain
&
GetDomain() const;
/**
* @brief Disables Domain (minimum/maximum extents for this axis).
/**
* @brief Disables Domain (minimum/maximum extents for this axis).
@@
-299,7
+296,6
@@
public:
*/
float Clamp(float x, float length = 0.0f, float scale = 1.0f) const;
*/
float Clamp(float x, float length = 0.0f, float scale = 1.0f) const;
-
/**
* @brief Clamps value (x) from (min) to (max).
*
/**
* @brief Clamps value (x) from (min) to (max).
*
@@
-313,7
+309,7
@@
public:
* @param[out] clamped Whether clamping occurred and which size (None, Min or Max)
* @return The clamped value
*/
* @param[out] clamped Whether clamping occurred and which size (None, Min or Max)
* @return The clamped value
*/
- float Clamp(float x, float length, float scale, ClampState
&
clamped) const;
+ float Clamp(float x, float length, float scale, ClampState
&
clamped) const;
/**
* @brief Snaps and Clamps (x) in accordance to ruler settings.
/**
* @brief Snaps and Clamps (x) in accordance to ruler settings.
@@
-348,10
+344,9
@@
public:
* @param[out] clamped Whether clamping occurred and which size (None, Min or Max)
* @return The clamped value after snapping
*/
* @param[out] clamped Whether clamping occurred and which size (None, Min or Max)
* @return The clamped value after snapping
*/
- float SnapAndClamp(float x, float bias, float length, float scale, ClampState
&
clamped) const;
+ float SnapAndClamp(float x, float bias, float length, float scale, ClampState
&
clamped) const;
protected:
protected:
-
/**
* @brief Destructor - A reference counted object may only be deleted by calling Unreference().
* @SINCE_1_0.0
/**
* @brief Destructor - A reference counted object may only be deleted by calling Unreference().
* @SINCE_1_0.0
@@
-359,11
+354,9
@@
protected:
virtual ~Ruler();
protected:
virtual ~Ruler();
protected:
-
- RulerType mType; ///< Type of Ruler (Fixed or Free).
- bool mEnabled; ///< If the ruler is enabled.
- RulerDomain mDomain; ///< The domain of the ruler.
-
+ RulerType mType; ///< Type of Ruler (FIXED or FREE).
+ bool mEnabled; ///< If the ruler is enabled.
+ RulerDomain mDomain; ///< The domain of the ruler.
};
typedef IntrusivePtr<Ruler> RulerPtr; ///< Pointer to Dali::Toolkit::Ruler object @SINCE_1_0.0
};
typedef IntrusivePtr<Ruler> RulerPtr; ///< Pointer to Dali::Toolkit::Ruler object @SINCE_1_0.0
@@
-384,22
+377,22
@@
public:
/**
* @copydoc Toolkit::Ruler::Snap
*/
/**
* @copydoc Toolkit::Ruler::Snap
*/
-
virtual float Snap(float x, float bias) const
;
+
float Snap(float x, float bias) const override
;
/**
* @copydoc Toolkit::Ruler::GetPositionFromPage
*/
/**
* @copydoc Toolkit::Ruler::GetPositionFromPage
*/
-
virtual float GetPositionFromPage(unsigned int page, unsigned int &volume, bool wrap) const
;
+
float GetPositionFromPage(unsigned int page, unsigned int& volume, bool wrap) const override
;
/**
* @copydoc Toolkit::Ruler::GetPageFromPosition
*/
/**
* @copydoc Toolkit::Ruler::GetPageFromPosition
*/
-
virtual unsigned int GetPageFromPosition(float position, bool wrap) const
;
+
unsigned int GetPageFromPosition(float position, bool wrap) const override
;
/**
* @copydoc Toolkit::Ruler::GetTotalPages
*/
/**
* @copydoc Toolkit::Ruler::GetTotalPages
*/
-
virtual unsigned int GetTotalPages() const
;
+
unsigned int GetTotalPages() const override
;
};
/**
};
/**
@@
-420,22
+413,22
@@
public:
/**
* @copydoc Toolkit::Ruler::Snap
*/
/**
* @copydoc Toolkit::Ruler::Snap
*/
-
virtual float Snap(float x, float bias) const
;
+
float Snap(float x, float bias) const override
;
/**
* @copydoc Toolkit::Ruler::GetPositionFromPage
*/
/**
* @copydoc Toolkit::Ruler::GetPositionFromPage
*/
-
virtual float GetPositionFromPage(unsigned int page, unsigned int &volume, bool wrap) const
;
+
float GetPositionFromPage(unsigned int page, unsigned int& volume, bool wrap) const override
;
/**
* @copydoc Toolkit::Ruler::GetPageFromPosition
*/
/**
* @copydoc Toolkit::Ruler::GetPageFromPosition
*/
-
virtual unsigned int GetPageFromPosition(float position, bool wrap) const
;
+
unsigned int GetPageFromPosition(float position, bool wrap) const override
;
/**
* @copydoc Toolkit::Ruler::GetTotalPages
*/
/**
* @copydoc Toolkit::Ruler::GetTotalPages
*/
-
virtual unsigned int GetTotalPages() const
;
+
unsigned int GetTotalPages() const override
;
private:
float mSpacing; ///< The spacing between each interval
private:
float mSpacing; ///< The spacing between each interval
@@
-456,18
+449,16
@@
class ScrollView;
*/
class DALI_TOOLKIT_API ScrollView : public Scrollable
{
*/
class DALI_TOOLKIT_API ScrollView : public Scrollable
{
-
public:
public:
-
/**
* @brief Clamps signal event's data.
* @SINCE_1_0.0
*/
struct ClampEvent
{
/**
* @brief Clamps signal event's data.
* @SINCE_1_0.0
*/
struct ClampEvent
{
- ClampState2D scale;
///< Clamp information for scale axes
- ClampState2D position;
///< Clamp information for position axes
- ClampState rotation;
///< Clamp information for rotation
+ ClampState2D scale; ///< Clamp information for scale axes
+ ClampState2D position; ///< Clamp information for position axes
+ ClampState rotation; ///< Clamp information for rotation
};
/**
};
/**
@@
-476,9
+467,9
@@
public:
*/
struct SnapEvent
{
*/
struct SnapEvent
{
- SnapType type; ///< Current snap commencing
- Vector2 position; ///< Target snap position
- float
duration;
///< Duration of snap animation.
+ SnapType type;
///< Current snap commencing
+ Vector2
position; ///< Target snap position
+ float
duration;
///< Duration of snap animation.
};
/**
};
/**
@@
-487,11
+478,11
@@
public:
*/
enum PropertyRange
{
*/
enum PropertyRange
{
- PROPERTY_START_INDEX = Toolkit::Scrollable::PROPERTY_END_INDEX + 1,
///< @SINCE_1_1.18
- PROPERTY_END_INDEX
= PROPERTY_START_INDEX + 1000,
///< Reserve property indices, @SINCE_1_1.18
+ PROPERTY_START_INDEX = Toolkit::Scrollable::PROPERTY_END_INDEX + 1, ///< @SINCE_1_1.18
+ PROPERTY_END_INDEX
= PROPERTY_START_INDEX + 1000,
///< Reserve property indices, @SINCE_1_1.18
ANIMATABLE_PROPERTY_START_INDEX = Toolkit::Scrollable::ANIMATABLE_PROPERTY_END_INDEX + 1,
ANIMATABLE_PROPERTY_START_INDEX = Toolkit::Scrollable::ANIMATABLE_PROPERTY_END_INDEX + 1,
- ANIMATABLE_PROPERTY_END_INDEX = ANIMATABLE_PROPERTY_START_INDEX + 1000
///< Reserve animatable property indices @SINCE_1_0.0
+ ANIMATABLE_PROPERTY_END_INDEX = ANIMATABLE_PROPERTY_START_INDEX + 1000 ///< Reserve animatable property indices @SINCE_1_0.0
};
/**
};
/**
@@
-716,10
+707,9
@@
public:
// Typedefs
// Typedefs
- typedef Signal<
void ( const SnapEvent& )
> SnapStartedSignalType; ///< SnapStarted signal type @SINCE_1_0.0
+ typedef Signal<
void(const SnapEvent&)
> SnapStartedSignalType; ///< SnapStarted signal type @SINCE_1_0.0
public:
public:
-
/**
* @brief Creates an empty ScrollView handle.
* @SINCE_1_0.0
/**
* @brief Creates an empty ScrollView handle.
* @SINCE_1_0.0
@@
-734,7
+724,15
@@
public:
* @SINCE_1_0.0
* @param[in] handle Handle to copy from
*/
* @SINCE_1_0.0
* @param[in] handle Handle to copy from
*/
- ScrollView( const ScrollView& handle );
+ ScrollView(const ScrollView& handle);
+
+ /**
+ * @brief Move constructor
+ * @SINCE_1_9.23
+ *
+ * @param[in] rhs A reference to the moved handle
+ */
+ ScrollView(ScrollView&& rhs) noexcept;
/**
* @brief Assignment operator.
/**
* @brief Assignment operator.
@@
-744,7
+742,16
@@
public:
* @param[in] handle The handle to copy from
* @return A reference to this
*/
* @param[in] handle The handle to copy from
* @return A reference to this
*/
- ScrollView& operator=( const ScrollView& handle );
+ ScrollView& operator=(const ScrollView& handle);
+
+ /**
+ * @brief Move assignment
+ * @SINCE_1_9.23
+ *
+ * @param[in] rhs A reference to the moved handle
+ * @return A reference to this
+ */
+ ScrollView& operator=(ScrollView&& rhs) noexcept;
/**
* @brief Destructor.
/**
* @brief Destructor.
@@
-772,10
+779,9
@@
public:
* @param[in] handle Handle to an object
* @return A handle to a ScrollView or an uninitialized handle
*/
* @param[in] handle Handle to an object
* @return A handle to a ScrollView or an uninitialized handle
*/
- static ScrollView DownCast(
BaseHandle handle
);
+ static ScrollView DownCast(
BaseHandle handle
);
public:
public:
-
/**
* @brief Gets snap-animation's AlphaFunction.
*
/**
* @brief Gets snap-animation's AlphaFunction.
*
@@
-875,7
+881,7
@@
public:
*
* @SINCE_1_0.0
* @param[in] sensitive @c true to enable scroll, @c false to disable scrolling
*
* @SINCE_1_0.0
* @param[in] sensitive @c true to enable scroll, @c false to disable scrolling
- * @note Unlike Actor::
SetSensitive()
, this determines whether this ScrollView
+ * @note Unlike Actor::
Property::SENSITIVE
, this determines whether this ScrollView
* should react (e.g. pan), without disrupting the sensitivity of its children.
*
*/
* should react (e.g. pan), without disrupting the sensitivity of its children.
*
*/
@@
-1067,7
+1073,7
@@
public:
* @SINCE_1_0.0
* @param[in] distance The minimum pan distance for a flick
*/
* @SINCE_1_0.0
* @param[in] distance The minimum pan distance for a flick
*/
- void SetMinimumDistanceForFlick(
const Vector2& distance
);
+ void SetMinimumDistanceForFlick(
const Vector2& distance
);
/**
* @brief Returns the minimum pan speed required for a flick gesture in pixels per second.
/**
* @brief Returns the minimum pan speed required for a flick gesture in pixels per second.
@@
-1083,7
+1089,7
@@
public:
* @SINCE_1_0.0
* @param[in] speed The minimum pan speed for a flick
*/
* @SINCE_1_0.0
* @param[in] speed The minimum pan speed for a flick
*/
- void SetMinimumSpeedForFlick(
float speed
);
+ void SetMinimumSpeedForFlick(
float speed
);
/**
* @brief Gets the maximum flick speed setting for ScrollView when
/**
* @brief Gets the maximum flick speed setting for ScrollView when
@@
-1218,8
+1224,7
@@
public:
* to get to the target page.
*
*/
* to get to the target page.
*
*/
- void ScrollTo(const Vector2& position, float duration,
- DirectionBias horizontalBias, DirectionBias verticalBias);
+ void ScrollTo(const Vector2& position, float duration, DirectionBias horizontalBias, DirectionBias verticalBias);
/**
* @brief Scrolls View to position specified (contents will scroll to this position).
/**
* @brief Scrolls View to position specified (contents will scroll to this position).
@@
-1240,8
+1245,7
@@
public:
* to get to the target page.
*
*/
* to get to the target page.
*
*/
- void ScrollTo(const Vector2& position, float duration, AlphaFunction alpha,
- DirectionBias horizontalBias, DirectionBias verticalBias);
+ void ScrollTo(const Vector2& position, float duration, AlphaFunction alpha, DirectionBias horizontalBias, DirectionBias verticalBias);
/**
* @brief Scrolls View to page currently based on assumption that each page is
/**
* @brief Scrolls View to page currently based on assumption that each page is
@@
-1390,7
+1394,7
@@
public:
* @param[in] threshold The threshold to apply around the axis
* @note If no threshold is specified, then the default threshold of PI * 0.25 radians (or 45 degrees) is used.
*/
* @param[in] threshold The threshold to apply around the axis
* @note If no threshold is specified, then the default threshold of PI * 0.25 radians (or 45 degrees) is used.
*/
- void SetScrollingDirection(
Radian direction, Radian threshold = PanGestureDetector::DEFAULT_THRESHOLD
);
+ void SetScrollingDirection(
Radian direction, Radian threshold = PanGestureDetector::DEFAULT_THRESHOLD
);
/**
* @brief Removes a direction constraint from the scroll view.
/**
* @brief Removes a direction constraint from the scroll view.
@@
-1399,10
+1403,9
@@
public:
* @param[in] direction The axis to stop constraining to.
* Usually will be PanGestureDetector::DIRECTION_VERTICAL or PanGestureDetector::DIRECTION_HORIZONTAL (but can be any other angle if desired).
*/
* @param[in] direction The axis to stop constraining to.
* Usually will be PanGestureDetector::DIRECTION_VERTICAL or PanGestureDetector::DIRECTION_HORIZONTAL (but can be any other angle if desired).
*/
- void RemoveScrollingDirection(
Radian direction
);
+ void RemoveScrollingDirection(
Radian direction
);
public: // Signals
public: // Signals
-
/**
* @brief Signal emitted when the ScrollView has started to snap or flick (it tells the target
* position, scale, rotation for the snap or flick).
/**
* @brief Signal emitted when the ScrollView has started to snap or flick (it tells the target
* position, scale, rotation for the snap or flick).
@@
-1418,7
+1421,6
@@
public: // Signals
SnapStartedSignalType& SnapStartedSignal();
public: // Not intended for application developers
SnapStartedSignalType& SnapStartedSignal();
public: // Not intended for application developers
-
/// @cond internal
/**
* @brief Creates a handle using the Toolkit::Internal implementation.
/// @cond internal
/**
* @brief Creates a handle using the Toolkit::Internal implementation.
@@
-1434,7
+1436,7
@@
public: // Not intended for application developers
* @SINCE_1_0.0
* @param[in] internal A pointer to the internal CustomActor
*/
* @SINCE_1_0.0
* @param[in] internal A pointer to the internal CustomActor
*/
- explicit DALI_INTERNAL ScrollView(
Dali::Internal::CustomActor* internal
);
+ explicit DALI_INTERNAL ScrollView(
Dali::Internal::CustomActor* internal
);
/// @endcond
};
/// @endcond
};