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;
44 * Create a ScrollConnector.
45 * @return A newly allocated ScrollConnector.
47 static ScrollConnector* New();
50 * @copydoc Toolkit::ScrollConnector::SetLimits()
52 void SetLimits( float min, float max );
55 * @copydoc Toolkit::ScrollConnector::GetMinLimit()
57 float GetMinLimit() const
63 * @copydoc Toolkit::ScrollConnector::GetMaxLimit()
65 float GetMaxLimit() const
71 * Signal emitted after the SetLimits() method has been called.
73 LimitsChangedSignalType& LimitsChangedSignal()
75 return mLimitsChangedSignal;
79 * Retrieve the object which provides the "scroll-position" property.
80 * @return The scroll-position object.
82 Constrainable GetScrollPositionObject() const
84 return mScrollPositionObject;
90 * Create a new ScrollConnector.
97 virtual ~ScrollConnector();
100 ScrollConnector(const ScrollConnector&);
103 ScrollConnector& operator=(const ScrollConnector& rhs);
107 Constrainable mScrollPositionObject;
109 LimitsChangedSignalType mLimitsChangedSignal;
115 } // namespace Internal
117 inline Internal::ScrollConnector& GetImpl(Dali::Toolkit::ScrollConnector& obj)
119 DALI_ASSERT_ALWAYS(obj);
121 Dali::BaseObject& handle = obj.GetBaseObject();
123 return static_cast<Internal::ScrollConnector&>(handle);
126 inline const Internal::ScrollConnector& GetImpl(const Dali::Toolkit::ScrollConnector& obj)
128 DALI_ASSERT_ALWAYS(obj);
130 const Dali::BaseObject& handle = obj.GetBaseObject();
132 return static_cast<const Internal::ScrollConnector&>(handle);
135 } // namespace Toolkit
139 #endif // __DALI_TOOLKIT_INTERNAL_SCROLL_CONNECTOR_H__