2 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 #include <dali-toolkit/public-api/controls/scroll-bar/scroll-bar.h>
22 #include <dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.h>
30 ScrollBar::ScrollBar()
34 ScrollBar::ScrollBar(Internal::ScrollBar& implementation)
35 : Control( implementation )
39 ScrollBar::ScrollBar( Dali::Internal::CustomActor* internal )
42 VerifyCustomActorPointer<Internal::ScrollBar>(internal);
45 ScrollBar::ScrollBar( const ScrollBar& handle )
50 ScrollBar& ScrollBar::operator=( const ScrollBar& scrollBar )
52 if( &scrollBar != this )
54 Control::operator=( scrollBar );
59 ScrollBar ScrollBar::New(ScrollBar::Direction direction)
61 return Internal::ScrollBar::New(direction);
64 ScrollBar ScrollBar::DownCast( BaseHandle handle )
66 return Control::DownCast<ScrollBar, Internal::ScrollBar>(handle);
69 ScrollBar::~ScrollBar()
73 void ScrollBar::SetScrollPropertySource( Handle handle, Dali::Property::Index propertyScrollPosition, Dali::Property::Index propertyMinScrollPosition, Dali::Property::Index propertyMaxScrollPosition, Dali::Property::Index propertyScrollContentSize )
75 GetImpl(*this).SetScrollPropertySource(handle, propertyScrollPosition, propertyMinScrollPosition, propertyMaxScrollPosition, propertyScrollContentSize);
78 void ScrollBar::SetScrollIndicator( Actor indicator )
80 GetImpl(*this).SetScrollIndicator(indicator);
83 Actor ScrollBar::GetScrollIndicator()
85 return GetImpl(*this).GetScrollIndicator();
88 void ScrollBar::SetScrollPositionIntervals( const Dali::Vector<float>& positions )
90 GetImpl(*this).SetScrollPositionIntervals(positions);
93 Dali::Vector<float> ScrollBar::GetScrollPositionIntervals() const
95 return GetImpl(*this).GetScrollPositionIntervals();
98 void ScrollBar::SetScrollDirection( ScrollBar::Direction direction )
100 GetImpl(*this).SetScrollDirection(direction);
103 ScrollBar::Direction ScrollBar::GetScrollDirection() const
105 return GetImpl(*this).GetScrollDirection();
108 void ScrollBar::SetIndicatorHeightPolicy( ScrollBar::IndicatorHeightPolicy policy )
110 GetImpl(*this).SetIndicatorHeightPolicy(policy);
113 ScrollBar::IndicatorHeightPolicy ScrollBar::GetIndicatorHeightPolicy() const
115 return GetImpl(*this).GetIndicatorHeightPolicy();
118 void ScrollBar::SetIndicatorFixedHeight( float height )
120 GetImpl(*this).SetIndicatorFixedHeight(height);
123 float ScrollBar::GetIndicatorFixedHeight() const
125 return GetImpl(*this).GetIndicatorFixedHeight();
128 void ScrollBar::SetIndicatorShowDuration( float durationSeconds )
130 GetImpl(*this).SetIndicatorShowDuration(durationSeconds);
133 float ScrollBar::GetIndicatorShowDuration() const
135 return GetImpl(*this).GetIndicatorShowDuration();
138 void ScrollBar::SetIndicatorHideDuration( float durationSeconds )
140 GetImpl(*this).SetIndicatorHideDuration(durationSeconds);
143 float ScrollBar::GetIndicatorHideDuration() const
145 return GetImpl(*this).GetIndicatorHideDuration();
148 void ScrollBar::ShowIndicator()
150 GetImpl(*this).ShowIndicator();
153 void ScrollBar::HideIndicator()
155 GetImpl(*this).HideIndicator();
158 ScrollBar::PanFinishedSignalType& ScrollBar::PanFinishedSignal()
160 return GetImpl(*this).PanFinishedSignal();
163 ScrollBar::ScrollPositionIntervalReachedSignalType& ScrollBar::ScrollPositionIntervalReachedSignal()
165 return GetImpl(*this).ScrollPositionIntervalReachedSignal();
168 } // namespace Toolkit