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 const char* const ScrollBar::SCROLL_POSITION_NOTIFIED_SIGNAL_NAME = "scroll-position-notified";
29 ScrollBar::ScrollBar()
33 ScrollBar::ScrollBar(Internal::ScrollBar& implementation)
34 : ScrollComponent( implementation )
38 ScrollBar::ScrollBar( Dali::Internal::CustomActor* internal )
39 : ScrollComponent( internal )
41 VerifyCustomActorPointer<Internal::ScrollBar>(internal);
44 ScrollBar::ScrollBar( const ScrollBar& scrollBar )
45 : ScrollComponent( scrollBar )
49 ScrollBar& ScrollBar::operator=( const ScrollBar& scrollBar )
51 if( &scrollBar != this )
53 Control::operator=( scrollBar );
58 ScrollBar ScrollBar::New()
60 return Internal::ScrollBar::New();
63 ScrollBar ScrollBar::DownCast( BaseHandle handle )
65 return Control::DownCast<ScrollBar, Internal::ScrollBar>(handle);
68 ScrollBar::~ScrollBar()
72 void ScrollBar::SetIndicatorImage( Image image )
74 GetImpl(*this).SetIndicatorImage(image);
77 Actor ScrollBar::GetScrollIndicator()
79 return GetImpl(*this).GetScrollIndicator();
82 void ScrollBar::SetPositionNotifications( const std::vector<float>& positions )
84 GetImpl(*this).SetPositionNotifications(positions);
87 void ScrollBar::SetIndicatorHeightPolicy( ScrollBar::IndicatorHeightPolicy policy )
89 GetImpl(*this).SetIndicatorHeightPolicy(policy);
92 ScrollBar::IndicatorHeightPolicy ScrollBar::GetIndicatorHeightPolicy()
94 return GetImpl(*this).GetIndicatorHeightPolicy();
97 void ScrollBar::SetIndicatorFixedHeight( float height )
99 GetImpl(*this).SetIndicatorFixedHeight(height);
102 float ScrollBar::GetIndicatorFixedHeight()
104 return GetImpl(*this).GetIndicatorFixedHeight();
107 void ScrollBar::SetIndicatorShowDuration( float durationSeconds )
109 GetImpl(*this).SetIndicatorShowDuration(durationSeconds);
112 float ScrollBar::GetIndicatorShowDuration()
114 return GetImpl(*this).GetIndicatorShowDuration();
117 void ScrollBar::SetIndicatorHideDuration( float durationSeconds )
119 GetImpl(*this).SetIndicatorHideDuration(durationSeconds);
122 float ScrollBar::GetIndicatorHideDuration()
124 return GetImpl(*this).GetIndicatorHideDuration();
127 void ScrollBar::Show()
129 GetImpl(*this).Show();
132 void ScrollBar::Hide()
134 GetImpl(*this).Hide();
137 ScrollBar::ScrollPositionNotifiedSignalType& ScrollBar::ScrollPositionNotifiedSignal()
139 return GetImpl(*this).ScrollPositionNotifiedSignal();
142 } // namespace Toolkit