2 * Copyright (c) 2014 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.
18 #include <dali-toolkit/public-api/controls/scroll-bar/scroll-bar.h>
19 #include <dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.h>
27 ScrollBar::ScrollBar()
31 ScrollBar::ScrollBar(Internal::ScrollBar& implementation)
32 : ScrollComponent( implementation )
36 ScrollBar::ScrollBar( Dali::Internal::CustomActor* internal )
37 : ScrollComponent( internal )
39 VerifyCustomActorPointer<Internal::ScrollBar>(internal);
42 ScrollBar::ScrollBar( const ScrollBar& scrollBar )
43 : ScrollComponent( scrollBar )
47 ScrollBar& ScrollBar::operator=( const ScrollBar& scrollBar )
49 if( &scrollBar != this )
51 Control::operator=( scrollBar );
56 ScrollBar ScrollBar::New()
58 return Internal::ScrollBar::New();
61 ScrollBar ScrollBar::DownCast( BaseHandle handle )
63 return Control::DownCast<ScrollBar, Internal::ScrollBar>(handle);
66 ScrollBar::~ScrollBar()
70 void ScrollBar::SetIndicatorImage( Image image )
72 GetImpl(*this).SetIndicatorImage(image);
75 Actor ScrollBar::GetScrollIndicator()
77 return GetImpl(*this).GetScrollIndicator();
80 void ScrollBar::SetPositionNotifications( const std::vector<float>& positions )
82 GetImpl(*this).SetPositionNotifications(positions);
85 void ScrollBar::SetIndicatorHeightPolicy( ScrollBar::IndicatorHeightPolicy policy )
87 GetImpl(*this).SetIndicatorHeightPolicy(policy);
90 ScrollBar::IndicatorHeightPolicy ScrollBar::GetIndicatorHeightPolicy()
92 return GetImpl(*this).GetIndicatorHeightPolicy();
95 void ScrollBar::SetIndicatorFixedHeight( float height )
97 GetImpl(*this).SetIndicatorFixedHeight(height);
100 float ScrollBar::GetIndicatorFixedHeight()
102 return GetImpl(*this).GetIndicatorFixedHeight();
105 void ScrollBar::SetIndicatorShowDuration( float durationSeconds )
107 GetImpl(*this).SetIndicatorShowDuration(durationSeconds);
110 float ScrollBar::GetIndicatorShowDuration()
112 return GetImpl(*this).GetIndicatorShowDuration();
115 void ScrollBar::SetIndicatorHideDuration( float durationSeconds )
117 GetImpl(*this).SetIndicatorHideDuration(durationSeconds);
120 float ScrollBar::GetIndicatorHideDuration()
122 return GetImpl(*this).GetIndicatorHideDuration();
125 void ScrollBar::Show()
127 GetImpl(*this).Show();
130 void ScrollBar::Hide()
132 GetImpl(*this).Hide();
135 ScrollBar::ScrollPositionNotifiedSignalType& ScrollBar::ScrollPositionNotifiedSignal()
137 return GetImpl(*this).ScrollPositionNotifiedSignal();
140 } // namespace Toolkit