e73849595cff3226d977838a59a22a7d04125743
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / scroll-bar / scroll-bar.cpp
1 /*
2  * Copyright (c) 2015 Samsung Electronics Co., Ltd.
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
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
18 // CLASS HEADER
19 #include <dali-toolkit/public-api/controls/scroll-bar/scroll-bar.h>
20
21 // INTERNAL INCLUDES
22 #include <dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.h>
23
24 namespace Dali
25 {
26
27 namespace Toolkit
28 {
29
30 ScrollBar::ScrollBar()
31 {
32 }
33
34 ScrollBar::ScrollBar(Internal::ScrollBar& implementation)
35 : ScrollComponent( implementation )
36 {
37 }
38
39 ScrollBar::ScrollBar( Dali::Internal::CustomActor* internal )
40 : ScrollComponent( internal )
41 {
42   VerifyCustomActorPointer<Internal::ScrollBar>(internal);
43 }
44
45 ScrollBar::ScrollBar( const ScrollBar& scrollBar )
46 : ScrollComponent( scrollBar )
47 {
48 }
49
50 ScrollBar& ScrollBar::operator=( const ScrollBar& scrollBar )
51 {
52   if( &scrollBar != this )
53   {
54     Control::operator=( scrollBar );
55   }
56   return *this;
57 }
58
59 ScrollBar ScrollBar::New()
60 {
61   return Internal::ScrollBar::New();
62 }
63
64 ScrollBar ScrollBar::DownCast( BaseHandle handle )
65 {
66   return Control::DownCast<ScrollBar, Internal::ScrollBar>(handle);
67 }
68
69 ScrollBar::~ScrollBar()
70 {
71 }
72
73 void ScrollBar::SetIndicatorImage( Image image )
74 {
75   GetImpl(*this).SetIndicatorImage(image);
76 }
77
78 Actor ScrollBar::GetScrollIndicator()
79 {
80   return GetImpl(*this).GetScrollIndicator();
81 }
82
83 void ScrollBar::SetPositionNotifications( const Dali::Vector<float>& positions )
84 {
85   GetImpl(*this).SetPositionNotifications(positions);
86 }
87
88 void ScrollBar::SetIndicatorHeightPolicy( ScrollBar::IndicatorHeightPolicy policy )
89 {
90   GetImpl(*this).SetIndicatorHeightPolicy(policy);
91 }
92
93 ScrollBar::IndicatorHeightPolicy ScrollBar::GetIndicatorHeightPolicy()
94 {
95   return GetImpl(*this).GetIndicatorHeightPolicy();
96 }
97
98 void ScrollBar::SetIndicatorFixedHeight( float height )
99 {
100   GetImpl(*this).SetIndicatorFixedHeight(height);
101 }
102
103 float ScrollBar::GetIndicatorFixedHeight()
104 {
105   return GetImpl(*this).GetIndicatorFixedHeight();
106 }
107
108 void ScrollBar::SetIndicatorShowDuration( float durationSeconds )
109 {
110   GetImpl(*this).SetIndicatorShowDuration(durationSeconds);
111 }
112
113 float ScrollBar::GetIndicatorShowDuration()
114 {
115   return GetImpl(*this).GetIndicatorShowDuration();
116 }
117
118 void ScrollBar::SetIndicatorHideDuration( float durationSeconds )
119 {
120   GetImpl(*this).SetIndicatorHideDuration(durationSeconds);
121 }
122
123 float ScrollBar::GetIndicatorHideDuration()
124 {
125   return GetImpl(*this).GetIndicatorHideDuration();
126 }
127
128 void ScrollBar::Show()
129 {
130   GetImpl(*this).Show();
131 }
132
133 void ScrollBar::Hide()
134 {
135   GetImpl(*this).Hide();
136 }
137
138 ScrollBar::ScrollPositionNotifiedSignalType& ScrollBar::ScrollPositionNotifiedSignal()
139 {
140   return GetImpl(*this).ScrollPositionNotifiedSignal();
141 }
142
143 } // namespace Toolkit
144
145 } // namespace Dali