remove (dead) ImageView UI control
[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 Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
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
18 #include <dali-toolkit/public-api/controls/scrollable/scroll-connector.h>
19 #include <dali-toolkit/internal/controls/scrollable/scroll-connector-impl.h>
20
21 using namespace Dali;
22
23 namespace Dali
24 {
25
26 namespace Toolkit
27 {
28
29 const char* const ScrollConnector::SCROLL_POSITION_PROPERTY_NAME = "scroll-position";
30 const char* const ScrollConnector::OVERSHOOT_PROPERTY_NAME       = "overshoot";
31
32 const Property::Index ScrollConnector::SCROLL_POSITION = Internal::ScrollConnector::SCROLL_POSITION;
33 const Property::Index ScrollConnector::OVERSHOOT       = Internal::ScrollConnector::OVERSHOOT;
34
35 const char* const ScrollConnector::DOMAIN_CHANGED_SIGNAL_NAME    = "domain-changed";
36 const char* const ScrollConnector::SCROLL_POSITION_CHANGED_SIGNAL_NAME    = "scroll-position-changed";
37
38 ScrollConnector ScrollConnector::New()
39 {
40   return ScrollConnector( Internal::ScrollConnector::New() );
41 }
42
43 ScrollConnector::ScrollConnector()
44 {
45 }
46
47 ScrollConnector::ScrollConnector( const ScrollConnector& handle )
48 : BaseHandle( handle )
49 {
50 }
51
52 ScrollConnector::~ScrollConnector()
53 {
54 }
55
56 ScrollConnector ScrollConnector::DownCast( BaseHandle handle )
57 {
58   return ScrollConnector( dynamic_cast<Internal::ScrollConnector*>(handle.GetObjectPtr()) );
59 }
60
61 void ScrollConnector::SetScrollDomain( float min, float max, float length )
62 {
63   GetImpl(*this).SetScrollDomain( min, max, length );
64 }
65
66 float ScrollConnector::GetMinLimit() const
67 {
68   return GetImpl(*this).GetMinLimit();
69 }
70
71 float ScrollConnector::GetMaxLimit() const
72 {
73   return GetImpl(*this).GetMaxLimit();
74 }
75
76 float ScrollConnector::GetContentLength() const
77 {
78   return GetImpl(*this).GetContentLength();
79 }
80
81 Constrainable ScrollConnector::GetScrollPositionObject() const
82 {
83   return GetImpl(*this).GetScrollPositionObject();
84 }
85
86 void ScrollConnector::SetScrollPosition( float position )
87 {
88   GetImpl(*this).SetScrollPosition( position );
89 }
90
91 float ScrollConnector::GetScrollPosition() const
92 {
93   return GetImpl(*this).GetScrollPosition();
94 }
95
96 ScrollConnector::ScrollPositionChangedSignalType& ScrollConnector::ScrollPositionChangedSignal()
97 {
98   return GetImpl(*this).ScrollPositionChangedSignal();
99 }
100
101 ScrollConnector::DomainChangedSignalType& ScrollConnector::DomainChangedSignal()
102 {
103   return GetImpl(*this).DomainChangedSignal();
104 }
105
106 ScrollConnector::ScrollConnector( Internal::ScrollConnector* impl )
107 : BaseHandle( impl )
108 {
109 }
110
111 } // namespace Toolkit
112
113 } // namespace Dali