8f93e2ca601133808dfde6dc543151fc42031fd3
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / scroll-bar / scroll-bar.cpp
1 //
2 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
3 //
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
7 //
8 //     http://floralicense.org/license/
9 //
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.
15 //
16
17 #include <dali-toolkit/public-api/controls/scroll-bar/scroll-bar.h>
18 #include <dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.h>
19
20 namespace Dali
21 {
22
23 namespace Toolkit
24 {
25
26 const char* const ScrollBar::SCROLL_POSITION_NOTIFIED_SIGNAL_NAME = "scroll-position-notified";
27
28 ScrollBar::ScrollBar()
29 {
30 }
31
32 ScrollBar::ScrollBar(Internal::ScrollBar& implementation)
33 : Control( implementation )
34 {
35 }
36
37 ScrollBar::ScrollBar( Dali::Internal::CustomActor* internal )
38 : Control( internal )
39 {
40   VerifyCustomActorPointer<Internal::ScrollBar>(internal);
41 }
42
43 ScrollBar::ScrollBar( const ScrollBar& scrollBar )
44 : Control( scrollBar )
45 {
46 }
47
48 ScrollBar& ScrollBar::operator=( const ScrollBar& scrollBar )
49 {
50   if( &scrollBar != this )
51   {
52     Control::operator=( scrollBar );
53   }
54   return *this;
55 }
56
57 ScrollBar ScrollBar::New()
58 {
59   return Internal::ScrollBar::New();
60 }
61
62 ScrollBar ScrollBar::DownCast( BaseHandle handle )
63 {
64   return Control::DownCast<ScrollBar, Internal::ScrollBar>(handle);
65 }
66
67 ScrollBar::~ScrollBar()
68 {
69 }
70
71 void ScrollBar::SetScrollConnector( ScrollConnector connector )
72 {
73   GetImpl(*this).SetScrollConnector(connector);
74 }
75
76 void ScrollBar::SetBackgroundImage( Image image, const Vector4& border )
77 {
78   GetImpl(*this).SetBackgroundImage(image, border);
79 }
80
81 void ScrollBar::SetIndicatorImage( Image image, const Vector4& border )
82 {
83   GetImpl(*this).SetIndicatorImage(image, border);
84 }
85
86 Actor ScrollBar::GetScrollIndicator()
87 {
88   return GetImpl(*this).GetScrollIndicator();
89 }
90
91 void ScrollBar::SetPositionNotifications( const std::vector<float>& positions )
92 {
93   GetImpl(*this).SetPositionNotifications(positions);
94 }
95
96 void ScrollBar::Show()
97 {
98   GetImpl(*this).Show();
99 }
100
101 void ScrollBar::Hide()
102 {
103   GetImpl(*this).Hide();
104 }
105
106 ScrollBar::ScrollPositionNotifiedSignalType& ScrollBar::ScrollPositionNotifiedSignal()
107 {
108   return GetImpl(*this).ScrollPositionNotifiedSignal();
109 }
110
111 } // namespace Toolkit
112
113 } // namespace Dali