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::DomainChangedSignalType DomainChangedSignalType;
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::SetScrollDomain()
53 void SetScrollDomain( float min, float max, float length );
56 * @copydoc Toolkit::ScrollConnector::GetMinLimit()
58 float GetMinLimit() const
64 * @copydoc Toolkit::ScrollConnector::GetMaxLimit()
66 float GetMaxLimit() const
72 * @copydoc Toolkit::ScrollConnector::GetContentLength()
74 float GetContentLength() const
76 return mContentLength;
80 * Signal emitted after the SetScrollDomain() method has been called.
82 DomainChangedSignalType& DomainChangedSignal()
84 return mDomainChangedSignal;
88 * Retrieve the object which provides the "scroll-position" property.
89 * @return The scroll-position object.
91 Constrainable GetScrollPositionObject() const
93 return mScrollPositionObject;
99 * Create a new ScrollConnector.
106 virtual ~ScrollConnector();
109 ScrollConnector(const ScrollConnector&);
112 ScrollConnector& operator=(const ScrollConnector& rhs);
116 Constrainable mScrollPositionObject;
118 DomainChangedSignalType mDomainChangedSignal;
122 float mContentLength;
125 } // namespace Internal
127 inline Internal::ScrollConnector& GetImpl(Dali::Toolkit::ScrollConnector& obj)
129 DALI_ASSERT_ALWAYS(obj);
131 Dali::BaseObject& handle = obj.GetBaseObject();
133 return static_cast<Internal::ScrollConnector&>(handle);
136 inline const Internal::ScrollConnector& GetImpl(const Dali::Toolkit::ScrollConnector& obj)
138 DALI_ASSERT_ALWAYS(obj);
140 const Dali::BaseObject& handle = obj.GetBaseObject();
142 return static_cast<const Internal::ScrollConnector&>(handle);
145 } // namespace Toolkit
149 #endif // __DALI_TOOLKIT_INTERNAL_SCROLL_CONNECTOR_H__