Control::UnregisterVisual does not remove renderers from actor
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / scroll-bar / scroll-bar.cpp
1 /*
2  * Copyright (c) 2015 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 // CLASS HEADER
19 #include <dali-toolkit/public-api/controls/scroll-bar/scroll-bar.h>
20
21 // INTERNAL INCLUDES
22 #include <dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.h>
23
24 namespace Dali
25 {
26
27 namespace Toolkit
28 {
29
30 ScrollBar::ScrollBar()
31 {
32 }
33
34 ScrollBar::ScrollBar(Internal::ScrollBar& implementation)
35 : Control( implementation )
36 {
37 }
38
39 ScrollBar::ScrollBar( Dali::Internal::CustomActor* internal )
40 : Control( internal )
41 {
42   VerifyCustomActorPointer<Internal::ScrollBar>(internal);
43 }
44
45 ScrollBar::ScrollBar( const ScrollBar& handle )
46 : Control( handle )
47 {
48 }
49
50 ScrollBar& ScrollBar::operator=( const ScrollBar& scrollBar )
51 {
52   if( &scrollBar != this )
53   {
54     Control::operator=( scrollBar );
55   }
56   return *this;
57 }
58
59 ScrollBar ScrollBar::New(ScrollBar::Direction direction)
60 {
61   return Internal::ScrollBar::New(direction);
62 }
63
64 ScrollBar ScrollBar::DownCast( BaseHandle handle )
65 {
66   return Control::DownCast<ScrollBar, Internal::ScrollBar>(handle);
67 }
68
69 ScrollBar::~ScrollBar()
70 {
71 }
72
73 void ScrollBar::SetScrollPropertySource( Handle handle, Dali::Property::Index propertyScrollPosition, Dali::Property::Index propertyMinScrollPosition, Dali::Property::Index propertyMaxScrollPosition, Dali::Property::Index propertyScrollContentSize )
74 {
75   GetImpl(*this).SetScrollPropertySource(handle, propertyScrollPosition, propertyMinScrollPosition, propertyMaxScrollPosition, propertyScrollContentSize);
76 }
77
78 void ScrollBar::SetScrollIndicator( Actor indicator )
79 {
80   GetImpl(*this).SetScrollIndicator(indicator);
81 }
82
83 Actor ScrollBar::GetScrollIndicator()
84 {
85   return GetImpl(*this).GetScrollIndicator();
86 }
87
88 void ScrollBar::SetScrollPositionIntervals( const Dali::Vector<float>& positions )
89 {
90   GetImpl(*this).SetScrollPositionIntervals(positions);
91 }
92
93 Dali::Vector<float> ScrollBar::GetScrollPositionIntervals() const
94 {
95   return GetImpl(*this).GetScrollPositionIntervals();
96 }
97
98 void ScrollBar::SetScrollDirection( ScrollBar::Direction direction )
99 {
100   GetImpl(*this).SetScrollDirection(direction);
101 }
102
103 ScrollBar::Direction ScrollBar::GetScrollDirection() const
104 {
105   return GetImpl(*this).GetScrollDirection();
106 }
107
108 void ScrollBar::SetIndicatorHeightPolicy( ScrollBar::IndicatorHeightPolicy policy )
109 {
110   GetImpl(*this).SetIndicatorHeightPolicy(policy);
111 }
112
113 ScrollBar::IndicatorHeightPolicy ScrollBar::GetIndicatorHeightPolicy() const
114 {
115   return GetImpl(*this).GetIndicatorHeightPolicy();
116 }
117
118 void ScrollBar::SetIndicatorFixedHeight( float height )
119 {
120   GetImpl(*this).SetIndicatorFixedHeight(height);
121 }
122
123 float ScrollBar::GetIndicatorFixedHeight() const
124 {
125   return GetImpl(*this).GetIndicatorFixedHeight();
126 }
127
128 void ScrollBar::SetIndicatorShowDuration( float durationSeconds )
129 {
130   GetImpl(*this).SetIndicatorShowDuration(durationSeconds);
131 }
132
133 float ScrollBar::GetIndicatorShowDuration() const
134 {
135   return GetImpl(*this).GetIndicatorShowDuration();
136 }
137
138 void ScrollBar::SetIndicatorHideDuration( float durationSeconds )
139 {
140   GetImpl(*this).SetIndicatorHideDuration(durationSeconds);
141 }
142
143 float ScrollBar::GetIndicatorHideDuration() const
144 {
145   return GetImpl(*this).GetIndicatorHideDuration();
146 }
147
148 void ScrollBar::ShowIndicator()
149 {
150   GetImpl(*this).ShowIndicator();
151 }
152
153 void ScrollBar::HideIndicator()
154 {
155   GetImpl(*this).HideIndicator();
156 }
157
158 ScrollBar::PanFinishedSignalType& ScrollBar::PanFinishedSignal()
159 {
160   return GetImpl(*this).PanFinishedSignal();
161 }
162
163 ScrollBar::ScrollPositionIntervalReachedSignalType& ScrollBar::ScrollPositionIntervalReachedSignal()
164 {
165   return GetImpl(*this).ScrollPositionIntervalReachedSignal();
166 }
167
168 } // namespace Toolkit
169
170 } // namespace Dali