1 #ifndef __DALI_TOOLKIT_INTERNAL_SCROLL_CONNECTOR_H__
2 #define __DALI_TOOLKIT_INTERNAL_SCROLL_CONNECTOR_H__
5 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
7 // Licensed under the Flora License, Version 1.0 (the License);
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
11 // http://floralicense.org/license/
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an AS IS BASIS,
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 // See the License for the specific language governing permissions and
17 // limitations under the License.
21 #include <dali-toolkit/public-api/controls/scrollable/scroll-connector.h>
33 * @copydoc Toolkit::ScrollConnector
35 class ScrollConnector : public Dali::BaseObject
39 typedef Toolkit::ScrollConnector::LimitsChangedSignalType LimitsChangedSignalType;
41 static const Property::Index SCROLL_POSITION;
42 static const Property::Index OVERSHOOT;
45 * Create a ScrollConnector.
46 * @return A newly allocated ScrollConnector.
48 static ScrollConnector* New();
51 * @copydoc Toolkit::ScrollConnector::SetLimits()
53 void SetLimits( float min, float max );
56 * @copydoc Toolkit::ScrollConnector::GetMinLimit()
58 float GetMinLimit() const
64 * @copydoc Toolkit::ScrollConnector::GetMaxLimit()
66 float GetMaxLimit() const
72 * Signal emitted after the SetLimits() method has been called.
74 LimitsChangedSignalType& LimitsChangedSignal()
76 return mLimitsChangedSignal;
80 * Retrieve the object which provides the "scroll-position" property.
81 * @return The scroll-position object.
83 Constrainable GetScrollPositionObject() const
85 return mScrollPositionObject;
91 * Create a new ScrollConnector.
98 virtual ~ScrollConnector();
101 ScrollConnector(const ScrollConnector&);
104 ScrollConnector& operator=(const ScrollConnector& rhs);
108 Constrainable mScrollPositionObject;
110 LimitsChangedSignalType mLimitsChangedSignal;
116 } // namespace Internal
118 inline Internal::ScrollConnector& GetImpl(Dali::Toolkit::ScrollConnector& obj)
120 DALI_ASSERT_ALWAYS(obj);
122 Dali::BaseObject& handle = obj.GetBaseObject();
124 return static_cast<Internal::ScrollConnector&>(handle);
127 inline const Internal::ScrollConnector& GetImpl(const Dali::Toolkit::ScrollConnector& obj)
129 DALI_ASSERT_ALWAYS(obj);
131 const Dali::BaseObject& handle = obj.GetBaseObject();
133 return static_cast<const Internal::ScrollConnector&>(handle);
136 } // namespace Toolkit
140 #endif // __DALI_TOOLKIT_INTERNAL_SCROLL_CONNECTOR_H__