2 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://floralicense.org/license/
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an AS IS BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
18 #include <dali-toolkit/internal/controls/scrollable/scroll-connector-impl.h>
21 #include <dali/integration-api/debug.h>
32 const Property::Index ScrollConnector::SCROLL_POSITION = Dali::PROPERTY_CUSTOM_START_INDEX;
33 const Property::Index ScrollConnector::OVERSHOOT = Dali::PROPERTY_CUSTOM_START_INDEX + 1;
35 ScrollConnector* ScrollConnector::New()
37 return new ScrollConnector();
40 void ScrollConnector::SetScrollDomain( float min, float max, float length )
44 mContentLength = length;
46 mDomainChangedSignal.Emit( mMinLimit, mMaxLimit, mContentLength );
49 ScrollConnector::ScrollConnector()
52 mContentLength( 0.0f )
54 mScrollPositionObject = Constrainable::New();
56 mScrollPositionObject.RegisterProperty( Toolkit::ScrollConnector::SCROLL_POSITION_PROPERTY_NAME, 0.0f );
57 mScrollPositionObject.RegisterProperty( Toolkit::ScrollConnector::OVERSHOOT_PROPERTY_NAME, 0.0f );
60 ScrollConnector::~ScrollConnector()
64 } // namespace Internal
66 } // namespace Toolkit