Changed indicator bg color.
[platform/framework/native/uifw.git] / src / ui / controls / FUiCtrlGroupedListView.cpp
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0/
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        FUiCtrlGroupedListView.cpp
20  * @brief       This is the implementation file for GroupedListView class.
21  *
22  * This header file contains the implementation of GroupedListView class.
23  */
24
25 #include <FBaseSysLog.h>
26 #include <FUiCtrlGroupedListView.h>
27 #include "FUiCtrl_GroupedListViewImpl.h"
28 #include "FUi_CoordinateSystemUtils.h"
29
30 using namespace Tizen::Base;
31 using namespace Tizen::Graphics;
32
33 namespace Tizen { namespace Ui { namespace Controls
34 {
35
36 GroupedListView::GroupedListView(void)
37 {
38 }
39
40 GroupedListView::~GroupedListView(void)
41 {
42 }
43
44 result
45 GroupedListView::Construct(const Rectangle& rect, GroupedListViewStyle style, bool itemDivider, bool fastScroll)
46 {
47         result r = E_SUCCESS;
48
49         _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
50         SysAssertf(pImpl == null,
51                                   "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
52
53         if (fastScroll == true)
54         {
55                 pImpl = _GroupedListViewImpl::CreateGroupedListViewImplN(this, style, itemDivider, SCROLL_STYLE_FAST_SCROLL);
56         }
57         else
58         {
59                 pImpl = _GroupedListViewImpl::CreateGroupedListViewImplN(this, style, itemDivider, SCROLL_STYLE_FADE_OUT);
60         }
61         SysTryReturn(NID_UI_CTRL, pImpl != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
62
63         _pControlImpl = pImpl;
64
65         r = Control::SetBounds(_CoordinateSystemUtils::ConvertToFloat(rect));
66         SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
67
68         return E_SUCCESS;
69
70 CATCH:
71         Control::Dispose();
72         return r;
73 }
74
75 result
76 GroupedListView::Construct(const Rectangle& rect, GroupedListViewStyle style, bool itemDivider, ListScrollStyle scrollStyle)
77 {
78         result r = E_SUCCESS;
79
80         SysAssertf((_GroupedListViewImpl::GetInstance(*this) == null),
81                                   "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
82
83         _GroupedListViewImpl* pImpl = _GroupedListViewImpl::CreateGroupedListViewImplN(this, style, itemDivider, scrollStyle);
84         SysTryReturn(NID_UI_CTRL, (pImpl != null), GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
85
86         _pControlImpl = pImpl;
87
88         r = Control::SetBounds(_CoordinateSystemUtils::ConvertToFloat(rect));
89         SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
90
91         return r;
92
93 CATCH:
94         Control::Dispose();
95         return r;
96 }
97
98 result
99 GroupedListView::Construct(const FloatRectangle& rect, GroupedListViewStyle style, bool itemDivider, ListScrollStyle scrollStyle)
100 {
101         result r = E_SUCCESS;
102
103         SysAssertf((_GroupedListViewImpl::GetInstance(*this) == null),
104                                   "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
105
106         _GroupedListViewImpl* pImpl = _GroupedListViewImpl::CreateGroupedListViewImplN(this, style, itemDivider, scrollStyle);
107         SysTryReturn(NID_UI_CTRL, (pImpl != null), GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
108
109         _pControlImpl = pImpl;
110
111         r = Control::SetBounds(rect);
112         SysTryCatch(NID_UI_CTRL, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
113
114         return r;
115
116 CATCH:
117         Control::Dispose();
118         return r;
119 }
120
121 result
122 GroupedListView::SetItemProvider(IGroupedListViewItemProvider& provider)
123 {
124         _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
125         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
126
127         return pImpl->SetItemProvider(provider);
128 }
129
130 result
131 GroupedListView::SetItemProvider(IGroupedListViewItemProviderF& provider)
132 {
133         _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
134         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
135
136         return pImpl->SetItemProvider(provider);
137 }
138
139 void
140 GroupedListView::AddGroupedListViewItemEventListener(IGroupedListViewItemEventListener& listener)
141 {
142         _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
143         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
144
145         pImpl->AddGroupedListViewItemEventListener(listener);
146         SysTryReturnVoidResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
147 }
148
149 void
150 GroupedListView::RemoveGroupedListViewItemEventListener(IGroupedListViewItemEventListener& listener)
151 {
152         _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
153         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
154
155         pImpl->RemoveGroupedListViewItemEventListener(listener);
156         SysTryReturnVoidResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
157 }
158
159 void
160 GroupedListView::AddFastScrollListener(IFastScrollListener& listener)
161 {
162         _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
163         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
164
165         pImpl->AddFastScrollListener(listener);
166         SysTryReturnVoidResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
167 }
168
169 void
170 GroupedListView::RemoveFastScrollListener(IFastScrollListener& listener)
171 {
172         _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
173         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
174
175         pImpl->RemoveFastScrollListener(listener);
176         SysTryReturnVoidResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
177 }
178
179 void
180 GroupedListView::AddScrollEventListener(IScrollEventListener& listener)
181 {
182         _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
183         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
184
185         pImpl->AddScrollEventListener(listener);
186         SysTryReturnVoidResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
187 }
188
189 void
190 GroupedListView::AddScrollEventListener(IScrollEventListenerF& listener)
191 {
192         _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
193         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
194
195         pImpl->AddScrollEventListener(listener);
196         SysTryReturnVoidResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
197 }
198
199 void
200 GroupedListView::RemoveScrollEventListener(IScrollEventListener& listener)
201 {
202         _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
203         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
204
205         pImpl->RemoveScrollEventListener(listener);
206         SysTryReturnVoidResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
207 }
208
209 void
210 GroupedListView::RemoveScrollEventListener(IScrollEventListenerF& listener)
211 {
212         _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
213         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
214
215         pImpl->RemoveScrollEventListener(listener);
216         SysTryReturnVoidResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
217 }
218
219 void
220 GroupedListView::AddUiLinkEventListener(IUiLinkEventListener& listener)
221 {
222         _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
223         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
224
225         pImpl->AddUiLinkEventListener(listener);
226         SysTryReturnVoidResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
227 }
228
229 void
230 GroupedListView::RemoveUiLinkEventListener(IUiLinkEventListener& listener)
231 {
232         _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
233         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
234
235         pImpl->RemoveUiLinkEventListener(listener);
236         SysTryReturnVoidResult(NID_UI_CTRL, GetLastResult() == E_SUCCESS, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
237 }
238
239 result
240 GroupedListView::SetSweepEnabled(bool enable)
241 {
242         _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
243         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
244
245         return pImpl->SetSweepEnabled(enable);
246 }
247
248 result
249 GroupedListView::SetFastScrollIndex(const String& text, bool useSearchIcon)
250 {
251         _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
252         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
253
254         return pImpl->SetFastScrollIndex(text, useSearchIcon);
255 }
256
257 result
258 GroupedListView::GetTopDrawnItemIndex(int& groupIndex, int& itemIndex) const
259 {
260         const _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
261         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
262
263         return pImpl->GetTopDrawnItemIndex(groupIndex, itemIndex);
264 }
265
266 result
267 GroupedListView::GetBottomDrawnItemIndex(int& groupIndex, int& itemIndex) const
268 {
269         const _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
270         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
271
272         return pImpl->GetBottomDrawnItemIndex(groupIndex, itemIndex);
273 }
274
275 result
276 GroupedListView::ScrollToItem(int groupIndex, int itemIndex)
277 {
278         return ScrollToItem(groupIndex, itemIndex, LIST_SCROLL_ITEM_ALIGNMENT_TOP);
279 }
280
281 result
282 GroupedListView::ScrollToItem(int groupIndex, int itemIndex, ListScrollItemAlignment itemAlignment)
283 {
284         _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
285         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
286
287         return pImpl->ScrollToItem(groupIndex, itemIndex, itemAlignment);
288 }
289
290 result
291 GroupedListView::SetItemChecked(int groupIndex, int itemIndex, bool check)
292 {
293         _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
294         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
295
296         return pImpl->SetItemChecked(groupIndex, itemIndex, check);
297 }
298
299 bool
300 GroupedListView::IsItemChecked(int groupIndex, int itemIndex) const
301 {
302         const _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
303         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
304
305         return pImpl->IsItemChecked(groupIndex, itemIndex);
306 }
307
308 result
309 GroupedListView::SetItemEnabled(int groupIndex, int itemIndex, bool enable)
310 {
311         _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
312         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
313
314         return pImpl->SetItemEnabled(groupIndex, itemIndex, enable);
315 }
316
317 bool
318 GroupedListView::IsItemEnabled(int groupIndex, int itemIndex) const
319 {
320         const _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
321         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
322
323         return pImpl->IsItemEnabled(groupIndex, itemIndex);
324 }
325
326 int
327 GroupedListView::GetGroupCount(void) const
328 {
329         const _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
330         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
331
332         return pImpl->GetGroupCount();
333 }
334
335 int
336 GroupedListView::GetItemCountAt(int groupIndex) const
337 {
338         const _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
339         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
340
341         return pImpl->GetItemCountAt(groupIndex);
342 }
343
344 result
345 GroupedListView::ShowItemDescriptionText(int groupIndex, int itemIndex)
346 {
347         _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
348         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
349
350         return pImpl->ShowItemDescriptionText(groupIndex, itemIndex);
351 }
352
353 result
354 GroupedListView::HideItemDescriptionText(int groupIndex, int itemIndex)
355 {
356         _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
357         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
358
359         return pImpl->HideItemDescriptionText(groupIndex, itemIndex);
360 }
361
362 result
363 GroupedListView::RefreshList(int groupIndex, int itemIndex, ListRefreshType type)
364 {
365         _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
366         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
367
368         return pImpl->RefreshList(groupIndex, itemIndex, type);
369 }
370
371 result
372 GroupedListView::RefreshList(int groupIndex, int itemIndex, int elementId)
373 {
374         _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
375         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
376
377         return pImpl->RefreshList(groupIndex, itemIndex, elementId);
378 }
379
380 result
381 GroupedListView::UpdateList(void)
382 {
383         _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
384         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
385
386         return pImpl->UpdateList();
387 }
388
389 result
390 GroupedListView::GetItemIndexFromPosition(int x, int y, int& groupIndex, int& itemIndex) const
391 {
392         return GetItemIndexFromPosition(Point(x, y), groupIndex, itemIndex);
393 }
394
395 result
396 GroupedListView::GetItemIndexFromPosition(float x, float y, int& groupIndex, int& itemIndex) const
397 {
398         return GetItemIndexFromPosition(FloatPoint(x, y), groupIndex, itemIndex);
399 }
400
401 result
402 GroupedListView::GetItemIndexFromPosition(const Point& position, int& groupIndex, int& itemIndex) const
403 {
404         const _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
405         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
406
407         return pImpl->GetItemIndexFromPosition(_CoordinateSystemUtils::ConvertToFloat(position), groupIndex, itemIndex);
408 }
409
410 result
411 GroupedListView::GetItemIndexFromPosition(const FloatPoint& position, int& groupIndex, int& itemIndex) const
412 {
413         const _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
414         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
415
416         return pImpl->GetItemIndexFromPosition(position, groupIndex, itemIndex);
417 }
418
419 result
420 GroupedListView::GetItemIndexFromPosition(int x, int y, int& groupIndex, int& itemIndex, int& elementId) const
421 {
422         return GetItemIndexFromPosition(Point(x, y), groupIndex, itemIndex, elementId);
423 }
424
425 result
426 GroupedListView::GetItemIndexFromPosition(float x, float y, int& groupIndex, int& itemIndex, int& elementId) const
427 {
428         return GetItemIndexFromPosition(FloatPoint(x, y), groupIndex, itemIndex, elementId);
429 }
430
431 result
432 GroupedListView::GetItemIndexFromPosition(const Point& position, int& groupIndex, int& itemIndex, int& elementId) const
433 {
434         const _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
435         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
436
437         return pImpl->GetItemIndexFromPosition(_CoordinateSystemUtils::ConvertToFloat(position), groupIndex, itemIndex, elementId);
438 }
439
440 result
441 GroupedListView::GetItemIndexFromPosition(const FloatPoint& position, int& groupIndex, int& itemIndex, int& elementId) const
442 {
443         const _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
444         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
445
446         return pImpl->GetItemIndexFromPosition(position, groupIndex, itemIndex, elementId);
447 }
448
449 result
450 GroupedListView::SetSectionColor(const Color& color)
451 {
452         _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
453         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
454
455         return pImpl->SetSectionColor(color);
456 }
457
458 Color
459 GroupedListView::GetSectionColor(void) const
460 {
461         const _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
462         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
463
464         return pImpl->GetSectionColor();
465 }
466
467 result
468 GroupedListView::SetItemDividerColor(const Color& color)
469 {
470         _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
471         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
472
473         return pImpl->SetItemDividerColor(color);
474 }
475
476 Color
477 GroupedListView::GetItemDividerColor(void) const
478 {
479         const _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
480         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
481
482         return pImpl->GetItemDividerColor();
483 }
484
485 result
486 GroupedListView::SetBackgroundColor(const Color& color)
487 {
488         _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
489         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
490
491         pImpl->SetListBackgroundColor(color);
492
493         return E_SUCCESS;
494 }
495
496 Color
497 GroupedListView::GetBackgroundColor(void) const
498 {
499         const _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
500         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
501
502         return pImpl->GetBackgroundColor();
503 }
504
505 result
506 GroupedListView::SetBackgroundBitmap(const Bitmap* pBitmap)
507 {
508         _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
509         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
510
511         return pImpl->SetBackgroundBitmap(pBitmap);
512 }
513
514 result
515 GroupedListView::SetBitmapOfEmptyList(const Bitmap* pBitmap)
516 {
517         _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
518         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
519
520         return pImpl->SetBitmapOfEmptyList(pBitmap);
521 }
522
523 result
524 GroupedListView::SetTextOfEmptyList(const String& text)
525 {
526         _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
527         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
528
529         return pImpl->SetTextOfEmptyList(text);
530 }
531
532 String
533 GroupedListView::GetTextOfEmptyList(void) const
534 {
535         const _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
536         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
537
538         return pImpl->GetTextOfEmptyList();
539 }
540
541 result
542 GroupedListView::SetTextColorOfEmptyList(const Color& color)
543 {
544         _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
545         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
546
547         return pImpl->SetTextColorOfEmptyList(color);
548 }
549
550 Color
551 GroupedListView::GetTextColorOfEmptyList(void) const
552 {
553         const _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
554         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
555
556         return pImpl->GetTextColorOfEmptyList();
557 }
558
559 result
560 GroupedListView::ExpandGroup(int groupIndex)
561 {
562         _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
563         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
564
565         return pImpl->ExpandGroup(groupIndex);
566 }
567
568 result
569 GroupedListView::CollapseGroup(int groupIndex)
570 {
571         _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
572         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
573
574         return pImpl->CollapseGroup(groupIndex);
575 }
576
577 bool
578 GroupedListView::IsGroupExpanded(int groupIndex) const
579 {
580         const _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
581         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
582
583         return pImpl->IsGroupExpanded(groupIndex);
584 }
585
586 result
587 GroupedListView::ExpandAllGroups(void)
588 {
589         _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
590         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
591
592         return pImpl->ExpandAllGroups();
593 }
594
595 result
596 GroupedListView::CollapseAllGroups(void)
597 {
598         _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
599         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
600
601         return pImpl->CollapseAllGroups();
602 }
603
604 result
605 GroupedListView::BeginReorderingMode(void)
606 {
607         _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
608         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
609
610         return pImpl->BeginReorderingMode();
611 }
612
613 result
614 GroupedListView::EndReorderingMode(void)
615 {
616         _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
617         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
618
619         return pImpl->EndReorderingMode();
620 }
621
622 bool
623 GroupedListView::IsInReorderingMode(void) const
624 {
625         const _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
626         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
627
628         return pImpl->IsInReorderingMode();
629 }
630
631 void
632 GroupedListView::SetScrollInputMode(ScrollInputMode mode)
633 {
634         _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
635         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
636
637         pImpl->SetScrollInputMode(mode);
638 }
639
640 ScrollInputMode
641 GroupedListView::GetScrollInputMode(void) const
642 {
643         const _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
644         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
645
646         return pImpl->GetScrollInputMode();
647 }
648
649 result
650 GroupedListView::OpenContextItem(int groupIndex, int itemIndex)
651 {
652         _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
653         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
654
655         return pImpl->OpenContextItem(groupIndex, itemIndex);
656 }
657
658 result
659 GroupedListView::CloseContextItem(int groupIndex, int itemIndex)
660 {
661         _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
662         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
663
664         return pImpl->CloseContextItem(groupIndex, itemIndex);
665 }
666
667 bool
668 GroupedListView::IsContextItemOpened(int groupIndex, int itemIndex) const
669 {
670         const _GroupedListViewImpl* pImpl = _GroupedListViewImpl::GetInstance(*this);
671         SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
672
673         return pImpl->IsContextItemOpened(groupIndex, itemIndex);
674 }
675
676 }}} //Tizen::Ui::Controls