remove APIs to apply [ACR][03/30][Remove] Remove APIs in Tizen::Ui namespace
[platform/framework/native/uifw.git] / src / ui / controls / FUiCtrlGroupedList.cpp
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://floralicense.org/license/
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 /**
19 * @file         FUiCtrlGroupedList.cpp
20 * @brief        This file contains implementation of GroupedList class
21 */
22
23
24 #include <FUiCtrlGroupedList.h>
25 #include <FBaseSysLog.h>
26 #include "FUiCtrl_GroupedListImpl.h"
27
28 using namespace Tizen::Base;
29 using namespace Tizen::Graphics;
30
31 namespace Tizen { namespace Ui { namespace Controls {
32
33 GroupedList::GroupedList(void)
34 {
35
36 }
37
38 GroupedList::~GroupedList(void)
39 {
40
41 }
42
43 result
44 GroupedList::Construct(const Rectangle& rect, CustomListStyle style, bool itemDivider, bool fastScroll)
45 {
46         result r = E_SUCCESS;
47         _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
48
49         SysAssertf(pImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
50
51         pImpl = _GroupedListImpl::CreateGroupedListImplN(this, rect, itemDivider, fastScroll);
52         r = GetLastResult();
53         SysTryReturn(NID_UI_CTRL, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r));
54
55         _pControlImpl = pImpl;
56
57         r = pImpl->SetListStyle(style);
58         SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "Internal Error");
59
60         r = pImpl->Initialize();
61         SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "Internal Error");
62
63         r = pImpl->LoadDefaultBitmap();
64         SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "Internal Error");
65
66         ClearLastResult();
67
68         return E_SUCCESS;
69
70 CATCH:
71         Dispose();
72         return E_SYSTEM;
73 }
74
75 result
76 GroupedList::AddGroup(const String& text, const Bitmap* pBackgroundBitmap, int groupId)
77 {
78         _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
79         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
80
81         result r = pImpl->AddGroup(text, pBackgroundBitmap, groupId);
82         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
83
84         return r;
85 }
86
87 result
88 GroupedList::InsertGroupAt(int groupIndex, const String& text, const Bitmap* pBackgroundBitmap, int groupId)
89 {
90         _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
91         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
92
93         result r = pImpl->InsertGroupAt(groupIndex, text, pBackgroundBitmap, groupId);
94         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
95
96         return r;
97 }
98
99 result
100 GroupedList::SetGroupAt(int groupIndex, const String& text, const Bitmap* pBackgroundBitmap, int groupId)
101 {
102         _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
103         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
104
105         result r = pImpl->SetGroupAt(groupIndex, text, pBackgroundBitmap, groupId);
106         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
107
108         return r;
109 }
110
111 result
112 GroupedList::RemoveAllGroups(void)
113 {
114         _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
115         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
116
117         result r = pImpl->RemoveAllGroups();
118         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
119
120         return r;
121 }
122
123 int
124 GroupedList::GetGroupCount(void) const
125 {
126         const _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
127         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
128
129         SetLastResult(E_SUCCESS);
130         return pImpl->GetGroupCount();
131 }
132
133 void
134 GroupedList::AddFastScrollEventListener(IFastScrollEventListener& listener)
135 {
136         _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
137         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
138
139         result r = pImpl->AddFastScrollEventListener(listener);
140         SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
141
142         SetLastResult(E_SUCCESS);
143
144         return;
145 }
146
147 void
148 GroupedList::RemoveFastScrollEventListener(IFastScrollEventListener& listener)
149 {
150         _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
151         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
152
153         result r = pImpl->RemoveFastScrollEventListener(listener);
154         SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
155
156         SetLastResult(E_SUCCESS);
157
158         return;
159 }
160
161 void
162 GroupedList::AddGroupedItemEventListener(IGroupedItemEventListener& listener)
163 {
164         _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
165         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
166
167         result r = pImpl->AddGroupedItemEventListener(listener);
168         SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
169
170         SetLastResult(E_SUCCESS);
171
172         return;
173 }
174
175 void
176 GroupedList::RemoveGroupedItemEventListener(IGroupedItemEventListener& listener)
177 {
178         _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
179         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
180
181         result r = pImpl->RemoveGroupedItemEventListener(listener);
182         SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
183
184         SetLastResult(E_SUCCESS);
185
186         return;
187 }
188
189 result
190 GroupedList::AddItem(int groupIndex, const CustomListItem& item, int itemId)
191 {
192         _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
193         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
194
195         result r = pImpl->AddItem(groupIndex, item, itemId);
196         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
197
198         return r;
199 }
200
201 result
202 GroupedList::InsertItemAt(int groupIndex, int itemIndex, const CustomListItem& item, int itemId)
203 {
204         _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
205         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
206
207         result r = pImpl->InsertItemAt(groupIndex, itemIndex, item, itemId);
208         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
209
210         return r;
211 }
212
213 result
214 GroupedList::SetItemAt(int groupIndex, int itemIndex, const CustomListItem& item, int itemId)
215 {
216         _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
217         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
218
219         result r = pImpl->SetItemAt(groupIndex, itemIndex, item, itemId);
220         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
221
222         return r;
223 }
224
225 result
226 GroupedList::RemoveItemAt(int groupIndex, int itemIndex)
227 {
228         _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
229         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
230
231         result r = pImpl->RemoveItemAt(groupIndex, itemIndex);
232         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
233
234         return r;
235 }
236
237 result
238 GroupedList::RemoveGroupAt(int groupIndex)
239 {
240         _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
241         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
242
243         result r = pImpl->RemoveGroupAt(groupIndex);
244         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
245
246         return r;
247 }
248
249 result
250 GroupedList::RemoveAllItems(void)
251 {
252         _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
253         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
254
255         result r = pImpl->RemoveAllItems();
256         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
257
258         return r;
259 }
260
261 result
262 GroupedList::RemoveAllItemsAt(int groupIndex)
263 {
264         _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
265         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
266
267         result r = pImpl->RemoveAllItemsAt(groupIndex);
268         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
269
270         return r;
271 }
272
273 result
274 GroupedList::RemoveAllCheckedItemsAt(int groupIndex)
275 {
276         _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
277         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
278
279         result r = pImpl->RemoveAllCheckedItemsAt(groupIndex);
280         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
281
282         return r;
283 }
284
285 int
286 GroupedList::GetItemCountAt(int groupIndex) const
287 {
288         const _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
289         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
290
291         return pImpl->GetSubItemCountAt(groupIndex);
292 }
293
294 const CustomListItem*
295 GroupedList::GetItemAt(int groupIndex, int itemIndex) const
296 {
297         const _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
298         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
299
300         SysTryReturn(NID_UI_CTRL, (groupIndex >= 0 && itemIndex >= 0), null, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument used. groupIndex(%d) itemIndex(%d)", groupIndex, itemIndex);
301
302         const CustomListItem* pItem = pImpl->GetCustomListItemAt(groupIndex, itemIndex);
303         return pItem;
304 }
305
306 result
307 GroupedList::SetItemEnabled(int groupIndex, int itemIndex, bool enable)
308 {
309         _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
310         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
311
312         result r = pImpl->SetItemEnabled(groupIndex, itemIndex, enable);
313         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
314
315         return r;
316 }
317
318 bool
319 GroupedList::IsItemEnabled(int groupIndex, int itemIndex) const
320 {
321         const _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
322         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
323
324         SetLastResult(E_SUCCESS);
325         return pImpl->IsItemEnabled(groupIndex, itemIndex);
326 }
327
328 result
329 GroupedList::SetItemChecked(int groupIndex, int itemIndex, bool check)
330 {
331         _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
332         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
333
334         result r = pImpl->SetItemChecked(groupIndex, itemIndex, check);
335         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
336
337         return r;
338 }
339
340 bool
341 GroupedList::IsItemChecked(int groupIndex, int itemIndex) const
342 {
343         const _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
344         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
345
346         SetLastResult(E_SUCCESS);
347         return pImpl->IsItemChecked(groupIndex, itemIndex);
348 }
349
350 result
351 GroupedList::SetAllItemsChecked(int groupIndex, bool check)
352 {
353         _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
354         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
355
356         result r = pImpl->SetAllItemsChecked(groupIndex, check);
357         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
358
359         return r;
360 }
361
362 result
363 GroupedList::RemoveAllCheckedItems(void)
364 {
365         _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
366         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
367
368         result r = pImpl->RemoveAllCheckedItems();
369         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
370
371         return r;
372 }
373
374 result
375 GroupedList::GetFirstCheckedItemIndex(int& groupIndex, int& itemIndex) const
376 {
377         const _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
378         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
379
380         result r = pImpl->GetFirstCheckedItemIndex(groupIndex, itemIndex);
381         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
382
383         return r;
384 }
385
386 result
387 GroupedList::GetLastCheckedItemIndex(int& groupIndex, int& itemIndex) const
388 {
389         const _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
390         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
391
392         result r = pImpl->GetLastCheckedItemIndex(groupIndex, itemIndex);
393         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
394
395         return r;
396 }
397
398 result
399 GroupedList::GetNextCheckedItemIndexAfter(int& groupIndex, int& itemIndex) const
400 {
401         const _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
402         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
403
404         result r = pImpl->GetNextCheckedItemIndexAfter(groupIndex, itemIndex);
405         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
406
407         return r;
408 }
409
410 result
411 GroupedList::GetItemIndexFromPosition(int x, int y, int& groupIndex, int& itemIndex) const
412 {
413         const _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
414         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
415
416         result r = pImpl->GetItemIndexFromPosition(Point(x, y), groupIndex, itemIndex);
417         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
418
419         return r;
420 }
421
422 result
423 GroupedList::GetItemIndexFromPosition(const Point& position, int& groupIndex, int& itemIndex) const
424 {
425         const _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
426         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
427
428         result r = pImpl->GetItemIndexFromPosition(position, groupIndex, itemIndex);
429         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
430
431         return r;
432 }
433
434 result
435 GroupedList::GetTopDrawnItemIndex(int& groupIndex, int& itemIndex) const
436 {
437         const _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
438         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
439
440         result r = pImpl->GetTopDrawnItemIndex(groupIndex, itemIndex);
441         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
442
443         return r;
444 }
445
446 result
447 GroupedList::GetBottomDrawnItemIndex(int& groupIndex, int& itemIndex) const
448 {
449         const _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
450         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
451
452         result r = pImpl->GetBottomDrawnItemIndex(groupIndex, itemIndex);
453         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
454
455         return r;
456 }
457
458 void
459 GroupedList::SetBackgroundColor(const Color& color)
460 {
461         _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
462         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
463
464         pImpl->SetListBackgroundColor(color);
465         SetLastResult(E_SUCCESS);
466         return;
467 }
468
469 void
470 GroupedList::SetTextOfEmptyList(const String& text)
471 {
472         _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
473         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
474
475         pImpl->SetTextOfEmptyList(text);
476         SetLastResult(E_SUCCESS);
477         return;
478 }
479
480 void
481 GroupedList::SetTextColorOfEmptyList(const Color& color)
482 {
483         _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
484         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
485
486         pImpl->SetTextColorOfEmptyList(color);
487         SetLastResult(E_SUCCESS);
488         return;
489 }
490
491 Color
492 GroupedList::GetTextColorOfEmptyList(void) const
493 {
494         const _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
495         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
496
497         SetLastResult(E_SUCCESS);
498         return pImpl->GetTextColorOfEmptyList();
499 }
500
501 int
502 GroupedList::GetGroupIndexFromGroupId(int groupId) const
503 {
504         const _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
505         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
506
507         SetLastResult(E_SUCCESS);
508         return pImpl->GetGroupIndexFromGroupId(groupId);
509 }
510
511
512 result
513 GroupedList::GetItemIndexFromItemId(int itemId, int& groupIndex, int& itemIndex) const
514 {
515         const _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
516         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
517
518         result r = pImpl->GetItemIndexFromItemId(itemId, groupIndex, itemIndex);
519         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
520
521         return r;
522 }
523
524 int
525 GroupedList::GetItemIdAt(int groupIndex, int itemIndex) const
526 {
527         const _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
528         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
529
530         SetLastResult(E_SUCCESS);
531         return pImpl->GetItemIdAt(groupIndex, itemIndex);
532 }
533
534 int
535 GroupedList::GetGroupIdAt(int groupIndex) const
536 {
537         const _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
538         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
539
540         SetLastResult(E_SUCCESS);
541         return pImpl->GetGroupIdAt(groupIndex);
542 }
543
544 void
545 GroupedList::ScrollToBottom(void)
546 {
547         _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
548         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
549
550         SetLastResult(E_SUCCESS);
551         pImpl->ScrollToBottom();
552 }
553
554 void
555 GroupedList::ScrollToTop(void)
556 {
557         _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
558         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
559
560         SetLastResult(E_SUCCESS);
561         pImpl->ScrollToTop();
562 }
563
564 result
565 GroupedList::ScrollToTop(int groupIndex, int itemIndex)
566 {
567         _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
568         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
569
570         result r = pImpl->ScrollToTop(groupIndex, itemIndex);
571         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
572
573         return r;
574 }
575
576 result
577 GroupedList::ScrollToTop(int groupIndex)
578 {
579         _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
580         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
581
582         result r = pImpl->ScrollToTop(groupIndex);
583         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
584
585         return r;
586 }
587
588 result
589 GroupedList::SetFastScrollMainIndex(const String& text)
590 {
591         _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
592         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
593
594         result r = pImpl->SetFastScrollMainIndex(text);
595         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
596
597         return r;
598 }
599
600 result
601 GroupedList::RefreshItem(int groupIndex, int itemIndex)
602 {
603         _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
604         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
605
606         result r = pImpl->RefreshItem(groupIndex, itemIndex);
607         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
608
609         return r;
610 }
611
612 result
613 GroupedList::RefreshGroup(int groupIndex)
614 {
615         _GroupedListImpl* pImpl = _GroupedListImpl::GetInstance(*this);
616         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
617
618         result r = pImpl->RefreshGroup(groupIndex);
619         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
620
621         return r;
622 }
623
624 }}} //Tizen::Ui::Controls