2 * Copyright (c) 2020 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/devel-api/controls/scroll-bar/scroll-bar.h>
22 #include <dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.h>
28 ScrollBar::ScrollBar()
32 ScrollBar::ScrollBar(Internal::ScrollBar& implementation)
33 : Control(implementation)
37 ScrollBar::ScrollBar(Dali::Internal::CustomActor* internal)
40 VerifyCustomActorPointer<Internal::ScrollBar>(internal);
43 ScrollBar::ScrollBar(const ScrollBar& handle)
48 ScrollBar& ScrollBar::operator=(const ScrollBar& scrollBar)
50 if(&scrollBar != this)
52 Control::operator=(scrollBar);
57 ScrollBar ScrollBar::New(ScrollBar::Direction direction)
59 return Internal::ScrollBar::New(direction);
62 ScrollBar ScrollBar::DownCast(BaseHandle handle)
64 return Control::DownCast<ScrollBar, Internal::ScrollBar>(handle);
67 ScrollBar::~ScrollBar()
71 void ScrollBar::SetScrollPropertySource(Handle handle, Dali::Property::Index propertyScrollPosition, Dali::Property::Index propertyMinScrollPosition, Dali::Property::Index propertyMaxScrollPosition, Dali::Property::Index propertyScrollContentSize)
73 GetImpl(*this).SetScrollPropertySource(handle, propertyScrollPosition, propertyMinScrollPosition, propertyMaxScrollPosition, propertyScrollContentSize);
76 void ScrollBar::SetScrollIndicator(Actor indicator)
78 GetImpl(*this).SetScrollIndicator(indicator);
81 Actor ScrollBar::GetScrollIndicator()
83 return GetImpl(*this).GetScrollIndicator();
86 void ScrollBar::SetScrollPositionIntervals(const Dali::Vector<float>& positions)
88 GetImpl(*this).SetScrollPositionIntervals(positions);
91 Dali::Vector<float> ScrollBar::GetScrollPositionIntervals() const
93 return GetImpl(*this).GetScrollPositionIntervals();
96 void ScrollBar::SetScrollDirection(ScrollBar::Direction direction)
98 GetImpl(*this).SetScrollDirection(direction);
101 ScrollBar::Direction ScrollBar::GetScrollDirection() const
103 return GetImpl(*this).GetScrollDirection();
106 void ScrollBar::SetIndicatorHeightPolicy(ScrollBar::IndicatorHeightPolicy policy)
108 GetImpl(*this).SetIndicatorHeightPolicy(policy);
111 ScrollBar::IndicatorHeightPolicy ScrollBar::GetIndicatorHeightPolicy() const
113 return GetImpl(*this).GetIndicatorHeightPolicy();
116 void ScrollBar::SetIndicatorFixedHeight(float height)
118 GetImpl(*this).SetIndicatorFixedHeight(height);
121 float ScrollBar::GetIndicatorFixedHeight() const
123 return GetImpl(*this).GetIndicatorFixedHeight();
126 void ScrollBar::SetIndicatorShowDuration(float durationSeconds)
128 GetImpl(*this).SetIndicatorShowDuration(durationSeconds);
131 float ScrollBar::GetIndicatorShowDuration() const
133 return GetImpl(*this).GetIndicatorShowDuration();
136 void ScrollBar::SetIndicatorHideDuration(float durationSeconds)
138 GetImpl(*this).SetIndicatorHideDuration(durationSeconds);
141 float ScrollBar::GetIndicatorHideDuration() const
143 return GetImpl(*this).GetIndicatorHideDuration();
146 void ScrollBar::ShowIndicator()
148 GetImpl(*this).ShowIndicator();
151 void ScrollBar::HideIndicator()
153 GetImpl(*this).HideIndicator();
156 ScrollBar::PanFinishedSignalType& ScrollBar::PanFinishedSignal()
158 return GetImpl(*this).PanFinishedSignal();
161 ScrollBar::ScrollPositionIntervalReachedSignalType& ScrollBar::ScrollPositionIntervalReachedSignal()
163 return GetImpl(*this).ScrollPositionIntervalReachedSignal();
166 } // namespace Toolkit