Split dali-toolkit into Base & Optional
[platform/core/uifw/dali-toolkit.git] / base / 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 char* const ScrollConnector::OVERSHOOT_PROPERTY_NAME       = "overshoot";
30
31 const Property::Index ScrollConnector::SCROLL_POSITION = Internal::ScrollConnector::SCROLL_POSITION;
32 const Property::Index ScrollConnector::OVERSHOOT       = Internal::ScrollConnector::OVERSHOOT;
33
34 const char* const ScrollConnector::DOMAIN_CHANGED_SIGNAL_NAME    = "domain-changed";
35
36 ScrollConnector ScrollConnector::New()
37 {
38   return ScrollConnector( Internal::ScrollConnector::New() );
39 }
40
41 ScrollConnector::ScrollConnector()
42 {
43 }
44
45 ScrollConnector::ScrollConnector( const ScrollConnector& handle )
46 : BaseHandle( handle )
47 {
48 }
49
50 ScrollConnector::~ScrollConnector()
51 {
52 }
53
54 ScrollConnector ScrollConnector::DownCast( BaseHandle handle )
55 {
56   return ScrollConnector( dynamic_cast<Internal::ScrollConnector*>(handle.GetObjectPtr()) );
57 }
58
59 void ScrollConnector::SetScrollDomain( float min, float max, float length )
60 {
61   GetImpl(*this).SetScrollDomain( min, max, length );
62 }
63
64 float ScrollConnector::GetMinLimit() const
65 {
66   return GetImpl(*this).GetMinLimit();
67 }
68
69 float ScrollConnector::GetMaxLimit() const
70 {
71   return GetImpl(*this).GetMaxLimit();
72 }
73
74 float ScrollConnector::GetContentLength() const
75 {
76   return GetImpl(*this).GetContentLength();
77 }
78
79 Constrainable ScrollConnector::GetScrollPositionObject() const
80 {
81   return GetImpl(*this).GetScrollPositionObject();
82 }
83
84 ScrollConnector::DomainChangedSignalType& ScrollConnector::DomainChangedSignal()
85 {
86   return GetImpl(*this).DomainChangedSignal();
87 }
88
89 ScrollConnector::ScrollConnector( Internal::ScrollConnector* impl )
90 : BaseHandle( impl )
91 {
92 }
93
94 } // namespace Toolkit
95
96 } // namespace Dali