Fixed shader test cases to match code changes.
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / scrollable / item-view / item-view.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/scrollable/scrollable.h>
18 #include <dali-toolkit/public-api/controls/scrollable/item-view/item-view.h>
19 #include <dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.h>
20
21 namespace Dali
22 {
23
24 namespace Toolkit
25 {
26
27 ItemView::ItemView()
28 {
29 }
30
31 ItemView::ItemView(Internal::ItemView& implementation)
32 : Scrollable(implementation)
33 {
34 }
35
36 ItemView::ItemView( Dali::Internal::CustomActor* internal )
37 : Scrollable(internal)
38 {
39   VerifyCustomActorPointer<Internal::ItemView>(internal);
40 }
41
42 ItemView::ItemView( const ItemView& itemView )
43 : Scrollable(itemView)
44 {
45 }
46
47 ItemView& ItemView::operator=( const ItemView& itemView )
48 {
49   if( &itemView != this )
50   {
51     Control::operator=( itemView );
52   }
53   return *this;
54 }
55
56 ItemView ItemView::New(ItemFactory& factory)
57 {
58   return Internal::ItemView::New(factory);
59 }
60
61 ItemView ItemView::DownCast( BaseHandle handle )
62 {
63   return Control::DownCast<ItemView, Internal::ItemView>(handle);
64 }
65
66 ItemView::~ItemView()
67 {
68 }
69
70 unsigned int ItemView::GetLayoutCount() const
71 {
72   return GetImpl(*this).GetLayoutCount();
73 }
74
75 void ItemView::AddLayout(ItemLayout& layout)
76 {
77   GetImpl(*this).AddLayout(layout);
78 }
79
80 void ItemView::RemoveLayout(unsigned int layoutIndex)
81 {
82   GetImpl(*this).RemoveLayout(layoutIndex);
83 }
84
85 ItemLayoutPtr ItemView::GetLayout(unsigned int layoutIndex) const
86 {
87   return GetImpl(*this).GetLayout(layoutIndex);
88 }
89
90 ItemLayoutPtr ItemView::GetActiveLayout() const
91 {
92   return GetImpl(*this).GetActiveLayout();
93 }
94
95 float ItemView::GetCurrentLayoutPosition(unsigned int itemId) const
96 {
97   return GetImpl(*this).GetCurrentLayoutPosition(itemId);
98 }
99
100 void ItemView::ActivateLayout(unsigned int layoutIndex, Vector3 targetSize, float durationSeconds)
101 {
102   GetImpl(*this).ActivateLayout(layoutIndex, targetSize, durationSeconds);
103 }
104
105 void ItemView::DeactivateCurrentLayout()
106 {
107   GetImpl(*this).DeactivateCurrentLayout();
108 }
109
110 void ItemView::SetMinimumSwipeSpeed(float speed)
111 {
112   GetImpl(*this).SetMinimumSwipeSpeed(speed);
113 }
114
115 float ItemView::GetMinimumSwipeSpeed() const
116 {
117   return GetImpl(*this).GetMinimumSwipeSpeed();
118 }
119
120 void ItemView::SetMinimumSwipeDistance(float distance)
121 {
122   GetImpl(*this).SetMinimumSwipeDistance(distance);
123 }
124
125 float ItemView::GetMinimumSwipeDistance() const
126 {
127   return GetImpl(*this).GetMinimumSwipeDistance();
128 }
129
130 void ItemView::SetMouseWheelScrollDistanceStep(float step)
131 {
132   GetImpl(*this).SetMouseWheelScrollDistanceStep(step);
133 }
134
135 float ItemView::GetMouseWheelScrollDistanceStep() const
136 {
137   return GetImpl(*this).GetMouseWheelScrollDistanceStep();
138 }
139
140 void ItemView::SetAnchoring(bool enabled)
141 {
142   GetImpl(*this).SetAnchoring(enabled);
143 }
144
145 bool ItemView::GetAnchoring() const
146 {
147   return GetImpl(*this).GetAnchoring();
148 }
149
150 void ItemView::SetAnchoringDuration(float durationSeconds)
151 {
152   GetImpl(*this).SetAnchoringDuration(durationSeconds);
153 }
154
155 float ItemView::GetAnchoringDuration() const
156 {
157   return GetImpl(*this).GetAnchoringDuration();
158 }
159
160 void ItemView::ScrollToItem(unsigned int itemId, float durationSeconds)
161 {
162   GetImpl(*this).ScrollToItem(itemId, durationSeconds);
163 }
164
165 void ItemView::SetRefreshInterval(unsigned int intervalMilliseconds)
166 {
167   GetImpl(*this).SetRefreshInterval(intervalMilliseconds);
168 }
169
170 unsigned int ItemView::GetRefreshInterval() const
171 {
172   return GetImpl(*this).GetRefreshInterval();
173 }
174
175 Actor ItemView::GetItem(unsigned int itemId) const
176 {
177   return GetImpl(*this).GetItem(itemId);
178 }
179
180 unsigned int ItemView::GetItemId(Actor actor) const
181 {
182   return GetImpl(*this).GetItemId(actor);
183 }
184
185 void ItemView::RemoveItem(unsigned int itemId, float durationSeconds)
186 {
187   GetImpl(*this).RemoveItem(itemId, durationSeconds);
188 }
189
190 } // namespace Toolkit
191
192 } // namespace Dali