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 Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
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.
22 #include <dali-toolkit/public-api/controls/scrollable/scroll-connector.h>
34 * @copydoc Toolkit::ScrollConnector
36 class ScrollConnector : public Dali::BaseObject
40 typedef Toolkit::ScrollConnector::DomainChangedSignalType DomainChangedSignalType;
42 static const Property::Index SCROLL_POSITION;
43 static const Property::Index OVERSHOOT;
46 * Create a ScrollConnector.
47 * @return A newly allocated ScrollConnector.
49 static ScrollConnector* New();
52 * @copydoc Toolkit::ScrollConnector::SetScrollDomain()
54 void SetScrollDomain( float min, float max, float length );
57 * @copydoc Toolkit::ScrollConnector::GetMinLimit()
59 float GetMinLimit() const
65 * @copydoc Toolkit::ScrollConnector::GetMaxLimit()
67 float GetMaxLimit() const
73 * @copydoc Toolkit::ScrollConnector::GetContentLength()
75 float GetContentLength() const
77 return mContentLength;
81 * Signal emitted after the SetScrollDomain() method has been called.
83 DomainChangedSignalType& DomainChangedSignal()
85 return mDomainChangedSignal;
89 * Retrieve the object which provides the "scroll-position" property.
90 * @return The scroll-position object.
92 Constrainable GetScrollPositionObject() const
94 return mScrollPositionObject;
100 * Create a new ScrollConnector.
107 virtual ~ScrollConnector();
110 ScrollConnector(const ScrollConnector&);
113 ScrollConnector& operator=(const ScrollConnector& rhs);
117 Constrainable mScrollPositionObject;
119 DomainChangedSignalType mDomainChangedSignal;
123 float mContentLength;
126 } // namespace Internal
128 inline Internal::ScrollConnector& GetImpl(Dali::Toolkit::ScrollConnector& obj)
130 DALI_ASSERT_ALWAYS(obj);
132 Dali::BaseObject& handle = obj.GetBaseObject();
134 return static_cast<Internal::ScrollConnector&>(handle);
137 inline const Internal::ScrollConnector& GetImpl(const Dali::Toolkit::ScrollConnector& obj)
139 DALI_ASSERT_ALWAYS(obj);
141 const Dali::BaseObject& handle = obj.GetBaseObject();
143 return static_cast<const Internal::ScrollConnector&>(handle);
146 } // namespace Toolkit
150 #endif // __DALI_TOOLKIT_INTERNAL_SCROLL_CONNECTOR_H__