Add 'ExclusiveArch: armv7l' limit build to arm architecture
[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 ScrollConnector ItemView::GetScrollConnector() const
67 {
68   return GetImpl(*this).GetScrollConnector();
69 }
70
71 ItemView::~ItemView()
72 {
73 }
74
75 unsigned int ItemView::GetLayoutCount() const
76 {
77   return GetImpl(*this).GetLayoutCount();
78 }
79
80 void ItemView::AddLayout(ItemLayout& layout)
81 {
82   GetImpl(*this).AddLayout(layout);
83 }
84
85 void ItemView::RemoveLayout(unsigned int layoutIndex)
86 {
87   GetImpl(*this).RemoveLayout(layoutIndex);
88 }
89
90 ItemLayoutPtr ItemView::GetLayout(unsigned int layoutIndex) const
91 {
92   return GetImpl(*this).GetLayout(layoutIndex);
93 }
94
95 ItemLayoutPtr ItemView::GetActiveLayout() const
96 {
97   return GetImpl(*this).GetActiveLayout();
98 }
99
100 float ItemView::GetCurrentLayoutPosition(unsigned int itemId) const
101 {
102   return GetImpl(*this).GetCurrentLayoutPosition(itemId);
103 }
104
105 void ItemView::ActivateLayout(unsigned int layoutIndex, Vector3 targetSize, float durationSeconds)
106 {
107   GetImpl(*this).ActivateLayout(layoutIndex, targetSize, durationSeconds);
108 }
109
110 void ItemView::DeactivateCurrentLayout()
111 {
112   GetImpl(*this).DeactivateCurrentLayout();
113 }
114
115 void ItemView::SetDefaultAlphaFunction(AlphaFunction func)
116 {
117   GetImpl(*this).SetDefaultAlphaFunction(func);
118 }
119
120 AlphaFunction ItemView::GetDefaultAlphaFunction() const
121 {
122   return GetImpl(*this).GetDefaultAlphaFunction();
123 }
124
125 void ItemView::SetMinimumSwipeSpeed(float speed)
126 {
127   GetImpl(*this).SetMinimumSwipeSpeed(speed);
128 }
129
130 float ItemView::GetMinimumSwipeSpeed() const
131 {
132   return GetImpl(*this).GetMinimumSwipeSpeed();
133 }
134
135 void ItemView::SetMinimumSwipeDistance(float distance)
136 {
137   GetImpl(*this).SetMinimumSwipeDistance(distance);
138 }
139
140 float ItemView::GetMinimumSwipeDistance() const
141 {
142   return GetImpl(*this).GetMinimumSwipeDistance();
143 }
144
145 void ItemView::SetMouseWheelScrollDistanceStep(float step)
146 {
147   GetImpl(*this).SetMouseWheelScrollDistanceStep(step);
148 }
149
150 float ItemView::GetMouseWheelScrollDistanceStep() const
151 {
152   return GetImpl(*this).GetMouseWheelScrollDistanceStep();
153 }
154
155 void ItemView::SetAnchoring(bool enabled)
156 {
157   GetImpl(*this).SetAnchoring(enabled);
158 }
159
160 bool ItemView::GetAnchoring() const
161 {
162   return GetImpl(*this).GetAnchoring();
163 }
164
165 void ItemView::SetAnchoringDuration(float durationSeconds)
166 {
167   GetImpl(*this).SetAnchoringDuration(durationSeconds);
168 }
169
170 float ItemView::GetAnchoringDuration() const
171 {
172   return GetImpl(*this).GetAnchoringDuration();
173 }
174
175 void ItemView::ScrollToItem(unsigned int itemId, float durationSeconds)
176 {
177   GetImpl(*this).ScrollToItem(itemId, durationSeconds);
178 }
179
180 void ItemView::SetRefreshInterval(float intervalLayoutPositions)
181 {
182   GetImpl(*this).SetRefreshInterval(intervalLayoutPositions);
183 }
184
185 float ItemView::GetRefreshInterval() const
186 {
187   return GetImpl(*this).GetRefreshInterval();
188 }
189
190 Actor ItemView::GetItem(unsigned int itemId) const
191 {
192   return GetImpl(*this).GetItem(itemId);
193 }
194
195 unsigned int ItemView::GetItemId(Actor actor) const
196 {
197   return GetImpl(*this).GetItemId(actor);
198 }
199
200 void ItemView::InsertItem(Item newItem, float durationSeconds)
201 {
202   GetImpl(*this).InsertItem( newItem, durationSeconds );
203 }
204
205 void ItemView::InsertItems(const ItemContainer& newItems, float durationSeconds)
206 {
207   GetImpl(*this).InsertItems( newItems, durationSeconds );
208 }
209
210 void ItemView::RemoveItem(unsigned int itemId, float durationSeconds)
211 {
212   GetImpl(*this).RemoveItem( itemId, durationSeconds );
213 }
214
215 void ItemView::RemoveItems(const ItemIdContainer& itemIds, float durationSeconds)
216 {
217   GetImpl(*this).RemoveItems( itemIds, durationSeconds );
218 }
219
220 void ItemView::ReplaceItem(Item replacementItem, float durationSeconds)
221 {
222   GetImpl(*this).ReplaceItem( replacementItem, durationSeconds );
223 }
224
225 void ItemView::ReplaceItems(const ItemContainer& replacementItems, float durationSeconds)
226 {
227   GetImpl(*this).ReplaceItems( replacementItems, durationSeconds );
228 }
229
230 } // namespace Toolkit
231
232 } // namespace Dali