Merge "Provide object to connect scrollable containers & scroll-bars etc."
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / scrollable / scroll-connector.cpp
1 //
2 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
3 //
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
7 //
8 //     http://floralicense.org/license/
9 //
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.
15 //
16
17 #include <dali-toolkit/public-api/controls/scrollable/scroll-connector.h>
18 #include <dali-toolkit/internal/controls/scrollable/scroll-connector-impl.h>
19
20 using namespace Dali;
21
22 namespace Dali
23 {
24
25 namespace Toolkit
26 {
27
28 const char* const ScrollConnector::SCROLL_POSITION_PROPERTY_NAME = "scroll-position";
29 const Property::Index SCROLL_POSITION = Internal::ScrollConnector::SCROLL_POSITION;
30
31 const char* const ScrollConnector::LIMITS_CHANGED_SIGNAL_NAME = "limits-changed";
32
33 ScrollConnector ScrollConnector::New()
34 {
35   return ScrollConnector( Internal::ScrollConnector::New() );
36 }
37
38 ScrollConnector::ScrollConnector()
39 {
40 }
41
42 ScrollConnector::ScrollConnector( const ScrollConnector& handle )
43 : BaseHandle( handle )
44 {
45 }
46
47 ScrollConnector::~ScrollConnector()
48 {
49 }
50
51 ScrollConnector ScrollConnector::DownCast( BaseHandle handle )
52 {
53   return ScrollConnector( dynamic_cast<Internal::ScrollConnector*>(handle.GetObjectPtr()) );
54 }
55
56 void ScrollConnector::SetLimits( float min, float max )
57 {
58   GetImpl(*this).SetLimits( min, max );
59 }
60
61 float ScrollConnector::GetMinLimit() const
62 {
63   return GetImpl(*this).GetMinLimit();
64 }
65
66 float ScrollConnector::GetMaxLimit() const
67 {
68   return GetImpl(*this).GetMaxLimit();
69 }
70
71 Constrainable ScrollConnector::GetScrollPositionObject() const
72 {
73   return GetImpl(*this).GetScrollPositionObject();
74 }
75
76 ScrollConnector::LimitsChangedSignalType& ScrollConnector::LimitsChangedSignal()
77 {
78   return GetImpl(*this).LimitsChangedSignal();
79 }
80
81 ScrollConnector::ScrollConnector( Internal::ScrollConnector* impl )
82 : BaseHandle( impl )
83 {
84 }
85
86 } // namespace Toolkit
87
88 } // namespace Dali