Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / controls / FUiCtrlList.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        FUiCtrlList.cpp
20  * @brief       This is the implementation file for List class.
21  *
22  * This file contains the implementation of List class.
23  */
24
25 #include <FUiCtrlList.h>
26 #include <FBaseSysLog.h>
27 #include "FUiCtrl_ListViewImpl.h"
28 #include "FUiCtrl_ListImpl.h"
29
30 using namespace Tizen::Graphics;
31 using namespace Tizen::Base;
32
33 namespace Tizen { namespace Ui { namespace Controls
34 {
35
36 List::List(void)
37 {
38
39 }
40
41 List::~List(void)
42 {
43
44 }
45
46 result
47 List::Construct(const Rectangle& rect, ListStyle style, ListItemFormat itemFormat, int row1Height, int row2Height, int column1Width, int column2Width)
48 {
49         result r = E_SUCCESS;
50         _ListImpl* pImpl = _ListImpl::GetInstance(*this);
51
52         SysAssertf((pImpl == null),
53                         "Already constructed! Calling Construct() twice or more on a same instance is not allowed for this class");
54
55         SysTryReturn(NID_UI_CTRL, (row1Height > 0 && row2Height >= 0),
56                         E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] row1Height must be greater than %d and row2Height must be greater than or equal to %d.", 0, 0);
57
58         SysTryReturn(NID_UI_CTRL, (column1Width > 0 && column2Width >= 0),
59                         E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] column1Width must be greater than %d and column2Width must be greater than or equal to %d.", 0, 0);
60
61         pImpl = _ListImpl::CreateListImplN(this, rect);
62         r = GetLastResult();
63         SysTryReturn(NID_UI_CTRL, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r));
64
65         _pControlImpl = pImpl;
66
67         r = pImpl->UpdateBounds(rect);
68         SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
69
70         r = pImpl->SetStyle(style);
71         SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] The current value of list style is invalid.", GetErrorMessage(r));
72
73         r = pImpl->Initialize(itemFormat, row1Height, row2Height, column1Width, column2Width);
74         SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
75
76         r = pImpl->LoadDefaultBitmap();
77         SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
78
79         ClearLastResult();
80
81         return r;
82
83 CATCH:
84         Dispose();
85         return r;
86
87 }
88
89 void
90 List::AddItemEventListener(IItemEventListener& listener)
91 {
92         _ListImpl* pImpl = _ListImpl::GetInstance(*this);
93         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
94
95         result r = pImpl->AddItemEventListener(listener);
96         SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
97
98         SetLastResult(E_SUCCESS);
99
100         return;
101 }
102
103 void
104 List::RemoveItemEventListener(IItemEventListener& listener)
105 {
106         _ListImpl* pImpl = _ListImpl::GetInstance(*this);
107         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
108
109         result r = pImpl->RemoveItemEventListener(listener);
110         SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
111
112         SetLastResult(E_SUCCESS);
113
114         return;
115 }
116
117 result
118 List::AddItem(const String* pText1, const String* pText2,
119                           const Bitmap* pBitmap1, const Bitmap* pBitmap2, int itemId)
120 {
121         _ListImpl* pImpl = _ListImpl::GetInstance(*this);
122         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
123
124         result r = pImpl->AddItem(pText1, pText2, pBitmap1, pBitmap2, itemId);
125         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
126
127         return r;
128 }
129
130 result
131 List::InsertItemAt(int index, const String* pText1, const String* pText2,
132                                    const Bitmap* pBitmap1, const Bitmap* pBitmap2, int itemId)
133 {
134         _ListImpl* pImpl = _ListImpl::GetInstance(*this);
135         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
136
137         result r = pImpl->InsertItemAt(index, pText1, pText2, pBitmap1, pBitmap2, itemId);
138         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
139
140         return r;
141 }
142
143 result
144 List::SetItemAt(int index, const String* pText1, const String* pText2,
145                                 const Bitmap* pBitmap1, const Bitmap* pBitmap2, int itemId)
146 {
147         _ListImpl* pImpl = _ListImpl::GetInstance(*this);
148         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
149
150         result r = pImpl->SetItemAt(index, pText1, pText2, pBitmap1, pBitmap2, itemId);
151         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
152
153         return r;
154 }
155
156 result
157 List::RemoveItemAt(int index)
158 {
159         _ListImpl* pImpl = _ListImpl::GetInstance(*this);
160         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
161
162         result r = pImpl->RemoveItemAt(index);
163         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
164
165         return r;
166 }
167
168 result
169 List::RemoveAllItems(void)
170 {
171         _ListImpl* pImpl = _ListImpl::GetInstance(*this);
172         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
173
174         result r = pImpl->RemoveAllItems();
175         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
176
177         return r;
178 }
179
180 int
181 List::GetItemCount(void) const
182 {
183         const _ListImpl* pImpl = _ListImpl::GetInstance(*this);
184         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
185
186         SetLastResult(E_SUCCESS);
187
188         return pImpl->GetItemCount();
189 }
190
191 result
192 List::SetItemEnabled(int index, bool enable)
193 {
194         _ListImpl* pImpl = _ListImpl::GetInstance(*this);
195         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
196
197         result r = pImpl->SetItemEnabled(index, enable);
198         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
199
200         return r;
201 }
202
203 bool
204 List::IsItemEnabled(int index) const
205 {
206         const _ListImpl* pImpl = _ListImpl::GetInstance(*this);
207         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
208
209         SetLastResult(E_SUCCESS);
210         return pImpl->IsItemEnabled(index);
211 }
212
213 void
214 List::SetFocusedItemBackgroundBitmap(const Bitmap& bitmap)
215 {
216         _ListImpl* pImpl = _ListImpl::GetInstance(*this);
217         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
218
219         pImpl->SetFocusedItemBackgroundBitmap(bitmap);
220         SetLastResult(E_SUCCESS);
221
222         return;
223 }
224
225 void
226 List::SetHighlightedItemBackgroundBitmap(const Bitmap& bitmap)
227 {
228         _ListImpl* pImpl = _ListImpl::GetInstance(*this);
229         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
230
231         pImpl->SetHighlightedItemBackgroundBitmap(bitmap);
232         SetLastResult(E_SUCCESS);
233
234         return;
235 }
236
237 void
238 List::SetNormalItemBackgroundBitmap(const Bitmap& bitmap)
239 {
240         _ListImpl* pImpl = _ListImpl::GetInstance(*this);
241         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
242
243         pImpl->SetNormalItemBackgroundBitmap(bitmap);
244         SetLastResult(E_SUCCESS);
245
246         return;
247 }
248
249 int
250 List::GetTopDrawnItemIndex(void) const
251 {
252         const _ListImpl* pImpl = _ListImpl::GetInstance(*this);
253         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
254
255         int groupIndex = -1;
256         int itemIndex = -1;
257
258         result r = pImpl->GetTopDrawnItemIndex(groupIndex, itemIndex);
259         SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r));
260
261         return itemIndex;
262 }
263
264 int
265 List::GetBottomDrawnItemIndex(void) const
266 {
267         const _ListImpl* pImpl = _ListImpl::GetInstance(*this);
268         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
269
270         int groupIndex = -1;
271         int itemIndex = -1;
272
273         result r = pImpl->GetBottomDrawnItemIndex(groupIndex, itemIndex);
274         SysTryReturnResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r));
275
276         return itemIndex;
277 }
278
279 void
280 List::SetTextOfEmptyList(const String& text)
281 {
282         _ListImpl* pImpl = _ListImpl::GetInstance(*this);
283         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
284
285         pImpl->SetTextOfEmptyList(text);
286         SetLastResult(E_SUCCESS);
287
288         return;
289 }
290
291 void
292 List::SetTextColorOfEmptyList(const Color& color)
293 {
294         _ListImpl* pImpl = _ListImpl::GetInstance(*this);
295         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
296
297         pImpl->SetTextColorOfEmptyList(color);
298         SetLastResult(E_SUCCESS);
299
300         return;
301 }
302
303 Color
304 List::GetTextColorOfEmptyList(void) const
305 {
306         const _ListImpl* pImpl = _ListImpl::GetInstance(*this);
307         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
308         SetLastResult(E_SUCCESS);
309
310         return pImpl->GetTextColorOfEmptyList();
311 }
312
313 void
314 List::SetBackgroundColor(const Color& color)
315 {
316         _ListImpl* pImpl = _ListImpl::GetInstance(*this);
317         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
318
319         pImpl->SetBackgroundColor(color);
320         SetLastResult(E_SUCCESS);
321
322         return;
323 }
324
325 void
326 List::SetItemTextColor(ListItemText textIndex, const Color& textColor)
327 {
328         _ListImpl* pImpl = _ListImpl::GetInstance(*this);
329         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
330
331         pImpl->SetItemTextColor(textIndex, textColor);
332         SetLastResult(E_SUCCESS);
333
334         return;
335 }
336
337 Color
338 List::GetItemTextColor(ListItemText textIndex) const
339 {
340         const _ListImpl* pImpl = _ListImpl::GetInstance(*this);
341         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
342         SetLastResult(E_SUCCESS);
343
344         return pImpl->GetItemTextColor(textIndex);
345 }
346
347 void
348 List::EnableTextSlide(ListItemText textIndex)
349 {
350         _ListImpl* pImpl = _ListImpl::GetInstance(*this);
351         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
352
353         pImpl->EnableTextSlide(textIndex);
354         SetLastResult(E_SUCCESS);
355
356         return;
357 }
358
359 void
360 List::DisableTextSlide(void)
361 {
362         _ListImpl* pImpl = _ListImpl::GetInstance(*this);
363         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
364
365         pImpl->DisableTextSlide();
366         SetLastResult(E_SUCCESS);
367
368         return;
369 }
370
371 int
372 List::GetItemHeight(void) const
373 {
374         const _ListImpl* pImpl = _ListImpl::GetInstance(*this);
375         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
376         SetLastResult(E_SUCCESS);
377
378         return pImpl->GetItemHeight();
379 }
380
381 int
382 List::GetRow1Height(void) const
383 {
384         const _ListImpl* pImpl = _ListImpl::GetInstance(*this);
385         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
386         SetLastResult(E_SUCCESS);
387
388         return pImpl->GetRow1Height();
389 }
390
391 int
392 List::GetRow2Height(void) const
393 {
394         const _ListImpl* pImpl = _ListImpl::GetInstance(*this);
395         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
396         SetLastResult(E_SUCCESS);
397
398         return pImpl->GetRow2Height();
399 }
400
401 int
402 List::GetColumn1Width(void) const
403 {
404         const _ListImpl* pImpl = _ListImpl::GetInstance(*this);
405         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
406         SetLastResult(E_SUCCESS);
407
408         return pImpl->GetColumn1Width();
409 }
410
411 int
412 List::GetColumn2Width(void) const
413 {
414         const _ListImpl* pImpl = _ListImpl::GetInstance(*this);
415         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
416         SetLastResult(E_SUCCESS);
417
418         return pImpl->GetColumn2Width();
419 }
420
421 result
422 List::SetRow1Height(int row1Height)
423 {
424         _ListImpl* pImpl = _ListImpl::GetInstance(*this);
425         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
426
427         SysTryReturn(NID_UI_CTRL, row1Height > 0,
428                                  E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] row1Height must be greater than 0.");
429
430         result r = pImpl->SetRow1Height(row1Height);
431         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
432
433         return r;
434 }
435
436 result
437 List::SetRow2Height(int row2Height)
438 {
439         _ListImpl* pImpl = _ListImpl::GetInstance(*this);
440         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
441
442         SysTryReturn(NID_UI_CTRL, row2Height >= 0,
443                                  E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] row2Height must be greater than or equal to 0.");
444
445         result r = pImpl->SetRow2Height(row2Height);
446         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
447
448         return r;
449 }
450
451 result
452 List::SetColumn1Width(int column1Width)
453 {
454         _ListImpl* pImpl = _ListImpl::GetInstance(*this);
455         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
456
457         SysTryReturn(NID_UI_CTRL, column1Width > 0,
458                                  E_SYSTEM, E_SYSTEM, "[E_SYSTEM] column1Width must be greater than 0.");
459
460         result r = pImpl->SetColumn1Width(column1Width);
461         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
462
463         return r;
464 }
465
466 result
467 List::SetColumn2Width(int column2Width)
468 {
469         _ListImpl* pImpl = _ListImpl::GetInstance(*this);
470         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
471
472         SysTryReturn(NID_UI_CTRL, column2Width >= 0,
473                                  E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] column2Width must be greater than or equal to 0.");
474
475         result r = pImpl->SetColumn2Width(column2Width);
476         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
477
478         return r;
479 }
480
481 result
482 List::SetItemChecked(int index, bool check)
483 {
484         _ListImpl* pImpl = _ListImpl::GetInstance(*this);
485         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
486
487         result r = pImpl->SetItemChecked(index, check);
488         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
489
490         return r;
491 }
492
493 bool
494 List::IsItemChecked(int index) const
495 {
496         const _ListImpl* pImpl = _ListImpl::GetInstance(*this);
497         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
498         SetLastResult(E_SUCCESS);
499
500         return pImpl->IsItemChecked(index);
501 }
502
503 result
504 List::SetAllItemsChecked(bool check)
505 {
506         _ListImpl* pImpl = _ListImpl::GetInstance(*this);
507         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
508
509         result r = pImpl->SetAllItemsChecked(check);
510         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
511
512         return r;
513 }
514
515 result
516 List::RemoveAllCheckedItems(void)
517 {
518         _ListImpl* pImpl = _ListImpl::GetInstance(*this);
519         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
520
521         result r = pImpl->RemoveAllCheckedItems();
522         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
523
524         return r;
525 }
526
527 int
528 List::GetFirstCheckedItemIndex(void) const
529 {
530         const _ListImpl* pImpl = _ListImpl::GetInstance(*this);
531         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
532         SetLastResult(E_SUCCESS);
533
534         return pImpl->GetFirstCheckedItemIndex();
535 }
536
537 int
538 List::GetLastCheckedItemIndex(void) const
539 {
540         const _ListImpl* pImpl = _ListImpl::GetInstance(*this);
541         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
542         SetLastResult(E_SUCCESS);
543
544         return pImpl->GetLastCheckedItemIndex();
545 }
546
547 int
548 List::GetNextCheckedItemIndexAfter(int index) const
549 {
550         const _ListImpl* pImpl = _ListImpl::GetInstance(*this);
551         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
552         SetLastResult(E_SUCCESS);
553
554         return pImpl->GetNextCheckedItemIndexAfter(index);
555 }
556
557 int
558 List::GetItemIndexFromItemId(int itemId) const
559 {
560         const _ListImpl* pImpl = _ListImpl::GetInstance(*this);
561         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
562         SetLastResult(E_SUCCESS);
563
564         return pImpl->GetItemIndexFromItemId(itemId);
565 }
566
567 int
568 List::GetItemIndexFromPosition(int x, int y) const
569 {
570         const _ListImpl* pImpl = _ListImpl::GetInstance(*this);
571         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
572
573         int groupIndex = -1;
574         int itemIndex = -1;
575
576         result r = pImpl->GetItemIndexFromPosition(Point(x, y), groupIndex, itemIndex);
577         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), -1, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r));
578
579         return itemIndex;
580 }
581
582 int
583 List::GetItemIndexFromPosition(const Point& position) const
584 {
585         const _ListImpl* pImpl = _ListImpl::GetInstance(*this);
586         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
587
588         int groupIndex = -1;
589         int itemIndex = -1;
590
591         result r = pImpl->GetItemIndexFromPosition(position, groupIndex, itemIndex);
592         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), -1, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(r));
593
594         return itemIndex;
595 }
596
597 int
598 List::GetItemIdAt(int index) const
599 {
600         const _ListImpl* pImpl = _ListImpl::GetInstance(*this);
601         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
602         SetLastResult(E_SUCCESS);
603
604         return pImpl->GetItemIdAt(index);
605 }
606
607 void
608 List::ScrollToBottom(void)
609 {
610         _ListImpl* pImpl = _ListImpl::GetInstance(*this);
611         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
612
613         pImpl->ScrollToBottom();
614         SetLastResult(E_SUCCESS);
615
616         return;
617 }
618
619 void
620 List::ScrollToTop(void)
621 {
622         _ListImpl* pImpl = _ListImpl::GetInstance(*this);
623         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
624
625         pImpl->ScrollToTop();
626         SetLastResult(E_SUCCESS);
627
628         return;
629 }
630
631 result
632 List::ScrollToTop(int index)
633 {
634         _ListImpl* pImpl = _ListImpl::GetInstance(*this);
635         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
636
637         result r = pImpl->ScrollToTop(index);
638         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
639
640         return r;
641 }
642
643 result
644 List::RefreshItem(int index)
645 {
646         _ListImpl* pImpl = _ListImpl::GetInstance(*this);
647         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
648
649         result r = pImpl->RefreshItem(index);
650         SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), r, r, "[%s] Propagating.", GetErrorMessage(r));
651
652         return r;
653 }
654
655 }}} //Tizen::Ui::Controls