2 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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.
17 #include <dali-toolkit/public-api/controls/scroll-bar/scroll-bar.h>
18 #include <dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.h>
26 const char* const ScrollBar::SCROLL_POSITION_NOTIFIED_SIGNAL_NAME = "scroll-position-notified";
28 ScrollBar::ScrollBar()
32 ScrollBar::ScrollBar(Internal::ScrollBar& implementation)
33 : ScrollComponent( implementation )
37 ScrollBar::ScrollBar( Dali::Internal::CustomActor* internal )
38 : ScrollComponent( internal )
40 VerifyCustomActorPointer<Internal::ScrollBar>(internal);
43 ScrollBar::ScrollBar( const ScrollBar& scrollBar )
44 : ScrollComponent( scrollBar )
48 ScrollBar& ScrollBar::operator=( const ScrollBar& scrollBar )
50 if( &scrollBar != this )
52 Control::operator=( scrollBar );
57 ScrollBar ScrollBar::New()
59 return Internal::ScrollBar::New();
62 ScrollBar ScrollBar::DownCast( BaseHandle handle )
64 return Control::DownCast<ScrollBar, Internal::ScrollBar>(handle);
67 ScrollBar::~ScrollBar()
71 void ScrollBar::SetBackgroundImage( Image image, const Vector4& border )
73 GetImpl(*this).SetBackgroundImage(image, border);
76 void ScrollBar::SetIndicatorImage( Image image, const Vector4& border )
78 GetImpl(*this).SetIndicatorImage(image, border);
81 Actor ScrollBar::GetScrollIndicator()
83 return GetImpl(*this).GetScrollIndicator();
86 void ScrollBar::SetPositionNotifications( const std::vector<float>& positions )
88 GetImpl(*this).SetPositionNotifications(positions);
91 void ScrollBar::SetIndicatorHeightPolicy( ScrollBar::IndicatorHeightPolicy policy )
93 GetImpl(*this).SetIndicatorHeightPolicy(policy);
96 ScrollBar::IndicatorHeightPolicy ScrollBar::GetIndicatorHeightPolicy()
98 return GetImpl(*this).GetIndicatorHeightPolicy();
101 void ScrollBar::SetIndicatorFixedHeight( float height )
103 GetImpl(*this).SetIndicatorFixedHeight(height);
106 float ScrollBar::GetIndicatorFixedHeight()
108 return GetImpl(*this).GetIndicatorFixedHeight();
111 void ScrollBar::Show()
113 GetImpl(*this).Show();
116 void ScrollBar::Hide()
118 GetImpl(*this).Hide();
121 ScrollBar::ScrollPositionNotifiedSignalType& ScrollBar::ScrollPositionNotifiedSignal()
123 return GetImpl(*this).ScrollPositionNotifiedSignal();
126 } // namespace Toolkit