2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
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
9 // http://floralicense.org/license/
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.
19 * @file FUiCtrl_GroupedListViewImpl.cpp
20 * @brief This is the implementation file for
21 * _GroupedListViewImpl class.
23 * This file contains the implementation of _GroupedListViewImpl
27 #include <FBaseSysLog.h>
28 #include <FApp_AppInfo.h>
29 #include <FGrp_TextTextSimple.h>
30 #include "FUi_CoordinateSystemUtils.h"
31 #include "FUi_ITouchLongPressGestureEventListener.h"
33 #include "FUi_ResourceManager.h"
34 #include "FUi_TouchEventArg.h"
35 #include "FUi_TouchLongPressGestureDetector.h"
36 #include "FUi_TouchManager.h"
37 #include "FUi_UiBuilder.h"
38 #include "FUiCtrl_FastScrollEvent.h"
39 #include "FUiCtrl_FastScrollEventArg.h"
40 #include "FUiCtrl_GroupedListViewImpl.h"
41 #include "FUiCtrl_GroupedListViewItemProviderAdaptor.h"
42 #include "FUiCtrl_Label.h"
43 #include "FUiCtrl_ListItemEvent.h"
44 #include "FUiCtrl_ListItemEventArg.h"
45 #include "FUiCtrl_ListViewItem.h"
46 #include "FUiCtrl_PublicLinkEvent.h"
47 #include "FUiCtrl_ScrollEvent.h"
48 #include "FUiCtrl_ScrollEventArg.h"
50 using namespace Tizen::Base;
51 using namespace Tizen::Base::Collection;
52 using namespace Tizen::Base::Runtime;
53 using namespace Tizen::Base::Utility;
54 using namespace Tizen::Graphics;
55 using namespace Tizen::Graphics::_Text;
57 namespace Tizen { namespace Ui { namespace Controls
60 class _GroupedListViewImpl::_GroupedListViewPropagatedTouchEventListener
61 : public Tizen::Ui::_IPropagatedTouchEventListener
62 , public Tizen::Ui::_ITouchLongPressGestureEventListener
66 _GroupedListViewPropagatedTouchEventListener(_GroupedListViewImpl& impl)
68 , __core(impl.GetCore())
69 , __public(impl.GetPublic())
70 , __oldPreviousPressedTime(0)
71 , __previousPressedTime(0)
72 , __currentPressedTime(0)
73 , __previousPressedPoint(0.0f, 0.0f)
74 , __currentPressedPoint(0.0f, 0.0f)
75 , __pLongPressedGesture(null)
77 __pTouchManager = _TouchManager::GetInstance();
78 SysTryReturnVoidResult(NID_UI_CTRL, (__pTouchManager != null), E_SYSTEM, "[E_SYSTEM] System error occurred.");
80 // Add _TouchLongPressGestureDetector
81 __pLongPressedGesture = new (std::nothrow) _TouchLongPressGestureDetector();
82 SysTryReturnVoidResult(NID_UI_CTRL, (__pLongPressedGesture != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
84 __core.AddGestureDetector(*__pLongPressedGesture);
85 result r = __pLongPressedGesture->AddGestureListener(*this);
86 SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] propagating.", GetErrorMessage(r));
89 virtual ~_GroupedListViewPropagatedTouchEventListener(void)
91 if (__pLongPressedGesture != null)
93 __pLongPressedGesture->RemoveGestureListener(*this);
94 __core.RemoveGestureDetector(*__pLongPressedGesture);
96 delete __pLongPressedGesture;
97 __pLongPressedGesture = null;
101 virtual bool OnTouchPressed(const _Control& source, const _TouchInfo& touchInfo)
103 return __impl.CallOnTouchPressed(source, touchInfo);
106 virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchInfo)
108 return __impl.CallOnTouchReleased(source, touchInfo);
111 virtual bool OnTouchMoved(const _Control& source, const _TouchInfo& touchInfo)
113 return __impl.CallOnTouchMoved(source, touchInfo);
116 virtual bool OnTouchCanceled(const _Control& source, const _TouchInfo& touchInfo)
118 return __impl.CallOnTouchCanceled(source, touchInfo);
121 virtual _UiTouchEventDelivery OnPreviewTouchPressed(const _Control& source, const _TouchInfo& touchInfo)
123 _UiTouchEventDelivery isFiltered = _UI_TOUCH_EVENT_DELIVERY_NO;
124 IPropagatedTouchEventListener* pListener = __impl.GetPublicPropagatedTouchEventListener();
126 if (pListener != null)
128 Control& control = __impl.GetPublic();
130 TouchEventInfo publicTouchInfo;
132 _TouchEventArg* pEventArg = GetTouchEventArgN(touchInfo);
133 SysTryReturn(NID_UI, pEventArg, _UI_TOUCH_EVENT_DELIVERY_YES, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
135 publicTouchInfo.Construct(*pEventArg);
143 if (pListener->OnTouchPressed(control, publicTouchInfo) == true)
145 return _UI_TOUCH_EVENT_DELIVERY_NO;
149 // public TouchEventListener
150 if (ProcessTouchEventListener(touchInfo) == true)
152 return _UI_TOUCH_EVENT_DELIVERY_NO;
155 isFiltered = __impl.OnPreviewTouchPressed(__impl, touchInfo);
156 if (isFiltered == _UI_TOUCH_EVENT_DELIVERY_NO)
158 return _UI_TOUCH_EVENT_DELIVERY_NO;
161 isFiltered = __core.OnPreviewTouchPressed(source, touchInfo);
166 virtual _UiTouchEventDelivery OnPreviewTouchReleased(const _Control& source, const _TouchInfo& touchInfo)
168 _UiTouchEventDelivery isFiltered = _UI_TOUCH_EVENT_DELIVERY_NO;
169 IPropagatedTouchEventListener* pListener = __impl.GetPublicPropagatedTouchEventListener();
171 if (pListener != null)
173 Control& control = __impl.GetPublic();
175 TouchEventInfo publicTouchInfo;
177 _TouchEventArg* pEventArg = GetTouchEventArgN(touchInfo);
178 SysTryReturn(NID_UI, pEventArg, _UI_TOUCH_EVENT_DELIVERY_YES, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
180 publicTouchInfo.Construct(*pEventArg);
188 if (pListener->OnTouchReleased(control, publicTouchInfo) == true)
190 return _UI_TOUCH_EVENT_DELIVERY_NO;
194 // public TouchEventListener
195 if (ProcessTouchEventListener(touchInfo) == true)
197 return _UI_TOUCH_EVENT_DELIVERY_NO;
200 isFiltered = __impl.OnPreviewTouchReleased(__impl, touchInfo);
201 if (isFiltered == _UI_TOUCH_EVENT_DELIVERY_NO)
203 return _UI_TOUCH_EVENT_DELIVERY_NO;
206 isFiltered = __core.OnPreviewTouchReleased(source, touchInfo);
211 virtual _UiTouchEventDelivery OnPreviewTouchMoved(const _Control& source, const _TouchInfo& touchInfo)
213 _UiTouchEventDelivery isFiltered = _UI_TOUCH_EVENT_DELIVERY_NO;
214 IPropagatedTouchEventListener* pListener = __impl.GetPublicPropagatedTouchEventListener();
216 if (pListener != null)
218 Control& control = __impl.GetPublic();
220 TouchEventInfo publicTouchInfo;
222 _TouchEventArg* pEventArg = GetTouchEventArgN(touchInfo);
223 SysTryReturn(NID_UI, pEventArg, _UI_TOUCH_EVENT_DELIVERY_YES, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
225 publicTouchInfo.Construct(*pEventArg);
233 if (pListener->OnTouchMoved(control, publicTouchInfo) == true)
235 return _UI_TOUCH_EVENT_DELIVERY_NO;
239 // public TouchEventListener
240 if (ProcessTouchEventListener(touchInfo) == true)
242 return _UI_TOUCH_EVENT_DELIVERY_NO;
245 isFiltered = __impl.OnPreviewTouchMoved(__impl, touchInfo);
246 if (isFiltered == _UI_TOUCH_EVENT_DELIVERY_NO)
248 return _UI_TOUCH_EVENT_DELIVERY_NO;
251 isFiltered = __core.OnPreviewTouchMoved(source, touchInfo);
256 virtual _UiTouchEventDelivery OnPreviewTouchCanceled(const _Control& source, const _TouchInfo& touchInfo)
258 IPropagatedTouchEventListener* pListener = __impl.GetPublicPropagatedTouchEventListener();
260 if (pListener != null)
262 Control& control = __impl.GetPublic();
264 TouchEventInfo publicTouchInfo;
266 _TouchEventArg* pEventArg = GetTouchEventArgN(touchInfo);
267 SysTryReturn(NID_UI, pEventArg, _UI_TOUCH_EVENT_DELIVERY_YES, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory shortage.");
269 publicTouchInfo.Construct(*pEventArg);
277 if (pListener->OnTouchCanceled(control, publicTouchInfo) == true)
279 return _UI_TOUCH_EVENT_DELIVERY_NO;
283 // public TouchEventListener
284 if (ProcessTouchEventListener(touchInfo) == true)
286 return _UI_TOUCH_EVENT_DELIVERY_NO;
289 return _UI_TOUCH_EVENT_DELIVERY_YES;
292 virtual void OnTouchPressHandled(const _Control& source)
294 __impl.OnTouchPressHandled(source);
297 virtual void OnTouchReleaseHandled(const _Control& source)
299 __impl.OnTouchReleaseHandled(source);
302 virtual void OnTouchMoveHandled(const _Control& source)
304 __impl.OnTouchMoveHandled(source);
307 virtual void OnTouchCancelHandled(const _Control& source)
309 __impl.OnTouchCancelHandled(source);
312 bool OnLongPressGestureDetected(_TouchLongPressGestureDetector& gesture)
314 bool filtered = ProcessTouchEventListener();
318 __impl.FireListViewItemLongPressedEvent();
324 bool OnLongPressGestureCanceled(_TouchLongPressGestureDetector& gesture)
331 bool ProcessTouchEventListener(const _TouchInfo& touchInfo)
333 bool filtered = false;
335 if (touchInfo.GetTouchStatus() == _TOUCH_PRESSED)
337 filtered = ProcessTouchDoublePressed(touchInfo);
342 ProcessTouchEvent(touchInfo);
345 filtered = __impl.IsInputEventConsumed();
349 __impl.ResetInputEventConsumed();
355 bool ProcessTouchEventListener(void)
357 // for TouchLongPressed
358 _TouchInfo touchInfo(0, _TOUCH_LONG_PRESSED, __currentPressedPoint, false, 0);
360 return ProcessTouchEventListener(touchInfo);
363 void ProcessTouchEvent(const _TouchInfo& touchInfo)
365 TouchEventInfo publicTouchInfo;
367 _TouchEventArg* pEventArg = GetTouchEventArgN(touchInfo);
368 SysTryReturnVoidResult(NID_UI, pEventArg, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
370 publicTouchInfo.Construct(*pEventArg);
372 _Control* pDraggedControl = __pTouchManager->GetTouchControlSource();
374 IEnumeratorT<IEventListener*>* pEnumerator = __impl.GetTouchEventListener()->GetEnumeratorN();
377 while (pEnumerator->MoveNext() == E_SUCCESS)
379 IEventListener* pListener = null;
380 pEnumerator->GetCurrent(pListener);
382 ITouchEventListener* pTouchEventListener = dynamic_cast <ITouchEventListener*>(pListener);
383 if (pTouchEventListener != null)
385 FirePublicListener(*pTouchEventListener, publicTouchInfo);
387 if (touchInfo.GetTouchStatus() == _TOUCH_RELEASED)
389 if (pDraggedControl == null) //if exist dragged control, don't send focus event
391 FireFocusListener(*pTouchEventListener, publicTouchInfo);
394 else if (touchInfo.GetTouchStatus() == _TOUCH_MOVED)
396 FireFocusListener(*pTouchEventListener, publicTouchInfo);
407 bool ProcessTouchDoublePressed(const _TouchInfo& touchinfo)
409 if (__pTouchManager->GetPointCount() == 1)
411 __oldPreviousPressedTime = __previousPressedTime;
412 __previousPressedTime = __currentPressedTime;
413 __currentPressedTime = touchinfo.GetTimeStamp();
414 __previousPressedPoint.x = __currentPressedPoint.x;
415 __previousPressedPoint.y = __currentPressedPoint.y;
416 __currentPressedPoint.x = touchinfo.GetCurrentPosition().x;
417 __currentPressedPoint.y = touchinfo.GetCurrentPosition().y;
419 if (Math::Abs(__previousPressedTime - __currentPressedTime) < DOUBLE_PRESS_TIME)
421 if (Math::Abs(__previousPressedTime - __oldPreviousPressedTime) > DOUBLE_PRESS_TIME)
423 if ((Math::Abs(__previousPressedPoint.x - __currentPressedPoint.x) < DOUBLE_PRESS_MOVE_ALLOWANCE)
424 && (Math::Abs(__previousPressedPoint.y - __currentPressedPoint.y) < DOUBLE_PRESS_MOVE_ALLOWANCE))
426 _TouchInfo touchInfo(0, _TOUCH_DOUBLE_PRESSED, __currentPressedPoint, false, 0);
427 ProcessTouchEvent(touchInfo);
438 void FirePublicListener(ITouchEventListener& listener, const TouchEventInfo& touchEventInfo)
440 switch (touchEventInfo.GetTouchStatus())
443 listener.OnTouchPressed(__public, touchEventInfo.GetCurrentPosition(), touchEventInfo);
445 case TOUCH_LONG_PRESSED:
446 listener.OnTouchLongPressed(__public, touchEventInfo.GetCurrentPosition(), touchEventInfo);
449 listener.OnTouchReleased(__public, touchEventInfo.GetCurrentPosition(), touchEventInfo);
452 listener.OnTouchMoved(__public, touchEventInfo.GetCurrentPosition(), touchEventInfo);
454 case TOUCH_DOUBLE_PRESSED:
455 listener.OnTouchDoublePressed(__public, touchEventInfo.GetCurrentPosition(), touchEventInfo);
458 listener.OnTouchFocusIn(__public, touchEventInfo.GetCurrentPosition(), touchEventInfo);
460 case TOUCH_FOCUS_OUT:
461 listener.OnTouchFocusOut(__public, touchEventInfo.GetCurrentPosition(), touchEventInfo);
464 listener.OnTouchCanceled(__public, touchEventInfo.GetCurrentPosition(), touchEventInfo);
471 void FireFocusListener(ITouchEventListener& listener, const TouchEventInfo& touchEventInfo)
473 _ControlManager* pControlManager = _ControlManager::GetInstance();
474 SysTryReturnVoidResult(NID_UI, pControlManager, E_SYSTEM, "[E_SYSTEM] System error occurred.");
476 Point screenPoint(__pTouchManager->GetScreenPoint(touchEventInfo.GetPointId()).x,
477 __pTouchManager->GetScreenPoint(touchEventInfo.GetPointId()).y);
479 _Control* pTouchedControl = pControlManager->GetTopmostTouchedControl(screenPoint);
480 SysTryReturnVoidResult(NID_UI, pTouchedControl, E_INVALID_CONDITION, "[E_INVALID_CONDITION] pTouchedControl is null.");
482 if (__pTouchManager->GetFocusedControlSource() != pTouchedControl)
484 if (&(__core) != pTouchedControl)
486 if (__pTouchManager->GetFocusedControlSource() == &(__core))
488 listener.OnTouchFocusOut(__public, touchEventInfo.GetCurrentPosition(), touchEventInfo);
493 listener.OnTouchFocusIn(__public, touchEventInfo.GetCurrentPosition(), touchEventInfo);
496 __pTouchManager->SetFocusedControlSource(*pTouchedControl);
500 _TouchEventArg* GetTouchEventArgN(const _TouchInfo& touchInfo)
502 FloatPoint startPoint;
504 _TouchEventArg* pEventArg = new (std::nothrow) _TouchEventArg(__public, touchInfo.GetTouchStatus());
505 SysTryReturn(NID_UI, pEventArg, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
507 startPoint.SetPosition(__pTouchManager->GetStartPoint(touchInfo.GetPointId()).x - __core.GetAbsoluteBoundsF().x,
508 __pTouchManager->GetStartPoint(touchInfo.GetPointId()).y - __core.GetAbsoluteBoundsF().y);
510 pEventArg->SetTouchPosition(touchInfo.GetPointId(), startPoint.x, startPoint.y,
511 touchInfo.GetCurrentPosition().x, touchInfo.GetCurrentPosition().y);
513 // need to flick distance setting
519 static const int DOUBLE_PRESS_TIME = 500;
520 static const int DOUBLE_PRESS_MOVE_ALLOWANCE = 10;
522 _GroupedListViewImpl& __impl;
525 _TouchManager* __pTouchManager;
527 unsigned int __oldPreviousPressedTime;
528 unsigned int __previousPressedTime;
529 unsigned int __currentPressedTime;
530 Tizen::Graphics::FloatPoint __previousPressedPoint;
531 Tizen::Graphics::FloatPoint __currentPressedPoint;
532 _TouchLongPressGestureDetector* __pLongPressedGesture;
535 _GroupedListViewImpl*
536 _GroupedListViewImpl::GetInstance(GroupedListView& groupedListView)
538 return static_cast <_GroupedListViewImpl*>(groupedListView._pControlImpl);
541 const _GroupedListViewImpl*
542 _GroupedListViewImpl::GetInstance(const GroupedListView& groupedListView)
544 return static_cast <const _GroupedListViewImpl*>(groupedListView._pControlImpl);
547 _GroupedListViewImpl::_GroupedListViewImpl(GroupedListView* pGroupedList, _TableView* pCore)
548 : _ControlImpl(pGroupedList, pCore)
549 , __pListItemEvent(null)
551 , __pScrollEvent(null)
552 , __pFastScrollEvent(null)
553 , __pEmptyBitmap(null)
555 , __redrawListView(true)
556 , __isBoundsChanged(false)
557 , __needReloadItems(false)
558 , __pItemNeedsLazyDeletion(null)
559 , __pPropagatedTouchEventListener(null)
561 GET_COLOR_CONFIG(TABLEVIEW::EMPTY_CONTENTS_TEXT_NORMAL, __emptyTextColor);
564 _GroupedListViewImpl::~_GroupedListViewImpl()
566 delete __pListItemEvent;
567 __pListItemEvent = null;
572 delete __pScrollEvent;
573 __pScrollEvent = null;
575 delete __pFastScrollEvent;
576 __pFastScrollEvent = null;
578 if (__pEmptyBitmap != null)
580 GetCore().DetachChild(*__pEmptyBitmap);
582 delete __pEmptyBitmap;
583 __pEmptyBitmap = null;
586 if (__pEmptyText != null)
588 GetCore().DetachChild(*__pEmptyText);
594 delete __pPropagatedTouchEventListener;
595 __pPropagatedTouchEventListener = null;
599 _GroupedListViewImpl::GetPublicClassName(void) const
601 return "Tizen::Ui::Controls::GroupedListView";
604 const GroupedListView&
605 _GroupedListViewImpl::GetPublic(void) const
607 return static_cast <const GroupedListView&>(_ControlImpl::GetPublic());
611 _GroupedListViewImpl::GetPublic(void)
613 return static_cast <GroupedListView&>(_ControlImpl::GetPublic());
617 _GroupedListViewImpl::GetCore(void) const
619 return static_cast <const _TableView&>(_ControlImpl::GetCore());
623 _GroupedListViewImpl::GetCore(void)
625 return static_cast <_TableView&>(_ControlImpl::GetCore());
628 _GroupedListViewImpl*
629 _GroupedListViewImpl::CreateGroupedListViewImplN(GroupedListView* pControl, GroupedListViewStyle style, bool itemDivider, ListScrollStyle scrollStyle)
631 result r = E_SUCCESS;
632 TableViewScrollBarStyle scrollBarStyle;
636 case SCROLL_STYLE_FADE_OUT:
637 scrollBarStyle = TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT;
640 case SCROLL_STYLE_FIXED:
641 scrollBarStyle = TABLE_VIEW_SCROLL_BAR_STYLE_FIXED;
644 case SCROLL_STYLE_FAST_SCROLL:
645 scrollBarStyle = TABLE_VIEW_SCROLL_BAR_STYLE_FAST_SCROLL;
648 case SCROLL_STYLE_JUMP_TO_TOP:
649 scrollBarStyle = TABLE_VIEW_SCROLL_BAR_STYLE_JUMP_TO_TOP;
652 case SCROLL_STYLE_THUMB:
653 scrollBarStyle = TABLE_VIEW_SCROLL_BAR_STYLE_THUMB;
657 scrollBarStyle = TABLE_VIEW_SCROLL_BAR_STYLE_NONE;
661 TableViewStyle tableViewStyle = ((style == GROUPED_LIST_VIEW_STYLE_SECTION) ? TABLE_VIEW_STYLE_SECTION : TABLE_VIEW_STYLE_GROUPED);
663 _TableView* pCore = _TableView::CreateTableViewN(tableViewStyle, itemDivider, scrollBarStyle);
664 SysTryReturn(NID_UI_CTRL, (pCore != null), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
666 _GroupedListViewImpl* pImpl = new (std::nothrow) _GroupedListViewImpl(pControl, pCore);
668 r = CheckConstruction(pCore, pImpl);
669 SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), null, r, "[%s] Propagating.", GetErrorMessage(GetLastResult()));
671 pImpl->__pPropagatedTouchEventListener = new (std::nothrow) _GroupedListViewPropagatedTouchEventListener(*pImpl);
673 if (pImpl->__pPropagatedTouchEventListener != null)
675 pCore->SetPropagatedTouchEventListener(pImpl->__pPropagatedTouchEventListener);
682 _GroupedListViewImpl::SetItemProvider(IGroupedListViewItemProvider& provider)
684 result r = E_SUCCESS;
685 float itemWidth = GetCore().GetBoundsF().width;
687 if (GetCore().GetTableViewStyle() == TABLE_VIEW_STYLE_SECTION)
690 GET_SHAPE_CONFIG(TABLEVIEW::GROUPITEM_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, margin);
692 itemWidth -= (margin * 2.0f);
695 _GroupedListViewItemProviderAdaptor* pProviderAdaptor =
696 static_cast <_GroupedListViewItemProviderAdaptor*>(GetCore().GetItemProviderAdaptor());
698 if (pProviderAdaptor == null)
700 pProviderAdaptor = new (std::nothrow) _GroupedListViewItemProviderAdaptor(provider);
701 SysTryReturn(NID_UI_CTRL, (pProviderAdaptor != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY,
702 "[E_OUT_OF_MEMORY] The memory is insufficient.");
704 pProviderAdaptor->SetListViewItemEventListener(*this);
706 r = pProviderAdaptor->SetListWidth(itemWidth);
707 GetCore().SetItemProviderAdaptor(pProviderAdaptor);
711 pProviderAdaptor->SetItemProvider(provider);
712 r = pProviderAdaptor->SetListWidth(itemWidth);
717 __redrawListView = true;
719 SetLastResultReturn(r);
723 _GroupedListViewImpl::SetItemProvider(IGroupedListViewItemProviderF& provider)
725 result r = E_SUCCESS;
726 float itemWidth = GetCore().GetBoundsF().width;
728 if (GetCore().GetTableViewStyle() == TABLE_VIEW_STYLE_SECTION)
731 GET_SHAPE_CONFIG(TABLEVIEW::GROUPITEM_LEFT_MARGIN, _CONTROL_ORIENTATION_PORTRAIT, margin);
733 itemWidth -= (margin * 2.0f);
736 _GroupedListViewItemProviderAdaptor* pProviderAdaptor =
737 static_cast <_GroupedListViewItemProviderAdaptor*>(GetCore().GetItemProviderAdaptor());
739 if (pProviderAdaptor == null)
741 pProviderAdaptor = new (std::nothrow) _GroupedListViewItemProviderAdaptor(provider);
742 SysTryReturn(NID_UI_CTRL, (pProviderAdaptor != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY,
743 "[E_OUT_OF_MEMORY] The memory is insufficient.");
745 pProviderAdaptor->SetListViewItemEventListener(*this);
747 r = pProviderAdaptor->SetListWidth(itemWidth);
748 GetCore().SetItemProviderAdaptor(pProviderAdaptor);
752 pProviderAdaptor->SetItemProvider(provider);
753 r = pProviderAdaptor->SetListWidth(itemWidth);
758 __redrawListView = true;
760 SetLastResultReturn(r);
766 _GroupedListViewImpl::AddGroupedListViewItemEventListener(IGroupedListViewItemEventListener& listener)
768 result r = E_SUCCESS;
770 if (__pListItemEvent == null)
772 __pListItemEvent = new (std::nothrow) _ListItemEvent();
773 SysTryReturnVoidResult(NID_UI_CTRL, (__pListItemEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
775 r = __pListItemEvent->Construct(GetPublic(), CLASSNAME_GROUPEDLISTVIEW);
776 SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] Unable to construct Item Event.");
779 __pListItemEvent->AddListener(listener);
781 r = GetCore().AddGroupedTableViewItemEventListener(*this);
787 _GroupedListViewImpl::RemoveGroupedListViewItemEventListener(IGroupedListViewItemEventListener& listener)
789 result r = E_SUCCESS;
791 if (__pListItemEvent != null)
793 r = __pListItemEvent->RemoveListener(listener);
800 _GroupedListViewImpl::AddFastScrollListener(IFastScrollListener& listener)
802 result r = E_SUCCESS;
804 if (__pFastScrollEvent == null)
806 __pFastScrollEvent = new (std::nothrow) _FastScrollEvent();
807 SysTryReturnVoidResult(NID_UI_CTRL, (__pFastScrollEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
809 r = __pFastScrollEvent->Construct(GetPublic());
810 SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] Unable to construct FastScroll Event.");
813 __pFastScrollEvent->AddListener(listener);
815 r = GetCore().AddFastScrollListener(*this);
821 _GroupedListViewImpl::RemoveFastScrollListener(IFastScrollListener& listener)
823 result r = E_SUCCESS;
825 if (__pFastScrollEvent != null)
827 r = __pFastScrollEvent->RemoveListener(listener);
834 _GroupedListViewImpl::AddScrollEventListener(IScrollEventListener& listener)
836 result r = E_SUCCESS;
838 if (__pScrollEvent == null)
840 __pScrollEvent = new (std::nothrow) _ScrollEvent();
841 SysTryReturnVoidResult(NID_UI_CTRL, (__pScrollEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
843 r = __pScrollEvent->Construct(GetPublic());
844 SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] Unable to construct Scroll Event.");
847 __pScrollEvent->AddListener(listener);
849 GetCore().AddScrollEventListener(*this);
855 _GroupedListViewImpl::AddScrollEventListener(IScrollEventListenerF& listener)
857 result r = E_SUCCESS;
859 if (__pScrollEvent == null)
861 __pScrollEvent = new (std::nothrow) _ScrollEvent();
862 SysTryReturnVoidResult(NID_UI_CTRL, (__pScrollEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
864 r = __pScrollEvent->Construct(GetPublic());
865 SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, "[E_SYSTEM] Unable to construct Scroll Event.");
868 __pScrollEvent->AddListener(listener);
870 GetCore().AddScrollEventListener(*this);
876 _GroupedListViewImpl::RemoveScrollEventListener(IScrollEventListener& listener)
878 result r = E_SUCCESS;
880 if (__pScrollEvent != null)
882 r = __pScrollEvent->RemoveListener(listener);
889 _GroupedListViewImpl::RemoveScrollEventListener(IScrollEventListenerF& listener)
891 result r = E_SUCCESS;
893 if (__pScrollEvent != null)
895 r = __pScrollEvent->RemoveListener(listener);
902 _GroupedListViewImpl::AddUiLinkEventListener(const IUiLinkEventListener& listener)
904 result r = E_SUCCESS;
906 if (__pLinkEvent == null)
908 __pLinkEvent = _PublicLinkEvent::CreateInstanceN(GetPublic());
909 SysTryReturnVoidResult(NID_UI, (__pLinkEvent != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
912 r = __pLinkEvent->AddListener(listener);
918 _GroupedListViewImpl::RemoveUiLinkEventListener(const IUiLinkEventListener& listener)
920 result r = E_SUCCESS;
922 if (__pLinkEvent != null)
924 r = __pLinkEvent->RemoveListener(listener);
931 _GroupedListViewImpl::SetSweepEnabled(bool enable)
933 GetCore().SetSweepEnabled(enable);
935 SetLastResultReturn(E_SUCCESS);
939 _GroupedListViewImpl::SetFastScrollIndex(const String& text, bool useSearchIcon)
941 result r = GetCore().SetFastScrollIndex(text, useSearchIcon);
942 SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS) || (r == E_SYSTEM), E_INVALID_STATE, E_INVALID_STATE,
943 "[E_INVALID_STATE] This instance is in an invalid state.");
945 SetLastResultReturn(r);
949 _GroupedListViewImpl::GetTopDrawnItemIndex(int& groupIndex, int& itemIndex) const
951 return GetCore().GetTopDrawnItemIndex(groupIndex, itemIndex);
955 _GroupedListViewImpl::GetBottomDrawnItemIndex(int& groupIndex, int& itemIndex) const
957 return GetCore().GetBottomDrawnItemIndex(groupIndex, itemIndex);
961 _GroupedListViewImpl::ScrollToItem(int groupIndex, int itemIndex, ListScrollItemAlignment itemAlignment)
963 result r = E_SUCCESS;
965 // for lazy delete item
966 SetItemNeedsLazyDeletion();
968 if (itemAlignment == LIST_SCROLL_ITEM_ALIGNMENT_TOP)
970 r = GetCore().SetTopDrawnItemIndex(groupIndex, itemIndex);
972 else if (itemAlignment == LIST_SCROLL_ITEM_ALIGNMENT_BOTTOM)
974 r = GetCore().SetBottomDrawnItemIndex(groupIndex, itemIndex);
978 SysTryReturn(NID_UI_CTRL, false, E_OUT_OF_RANGE, E_OUT_OF_RANGE,
979 "[E_OUT_OF_RANGE] The specified itemAlignment is out of range.");
982 SetLastResultReturn(r);
986 _GroupedListViewImpl::SetItemChecked(int groupIndex, int itemIndex, bool check)
988 return GetCore().SetItemChecked(groupIndex, itemIndex, check);
992 _GroupedListViewImpl::IsItemChecked(int groupIndex, int itemIndex) const
994 return GetCore().IsItemChecked(groupIndex, itemIndex);
998 _GroupedListViewImpl::SetItemEnabled(int groupIndex, int itemIndex, bool enable)
1000 return GetCore().SetItemEnabled(groupIndex, itemIndex, enable);
1004 _GroupedListViewImpl::IsItemEnabled(int groupIndex, int itemIndex) const
1006 return GetCore().IsItemEnabled(groupIndex, itemIndex);
1010 _GroupedListViewImpl::GetGroupCount(void) const
1012 return GetCore().GetGroupCount();
1016 _GroupedListViewImpl::GetItemCountAt(int groupIndex) const
1018 return GetCore().GetItemCountAt(groupIndex);
1022 _GroupedListViewImpl::ShowItemDescriptionText(int groupIndex, int itemIndex)
1024 return SetItemDescriptionTextShowState(groupIndex, itemIndex, true);
1028 _GroupedListViewImpl::HideItemDescriptionText(int groupIndex, int itemIndex)
1030 return SetItemDescriptionTextShowState(groupIndex, itemIndex, false);
1034 _GroupedListViewImpl::SetItemDescriptionTextShowState(int groupIndex, int itemIndex, bool show)
1036 result r = E_SUCCESS;
1038 SysTryReturn(NID_UI_CTRL, (groupIndex >= 0) && (groupIndex < GetGroupCount()), E_OUT_OF_RANGE, E_OUT_OF_RANGE,
1039 "[E_OUT_OF_RANGE] The specified groupIndex is out of range.");
1041 SysTryReturn(NID_UI_CTRL, (itemIndex >= 0) && (itemIndex < GetItemCountAt(groupIndex)), E_OUT_OF_RANGE, E_OUT_OF_RANGE,
1042 "[E_OUT_OF_RANGE] The specified itemIndex is out of range.");
1044 _GroupedListViewItemProviderAdaptor* pProviderAdaptor =
1045 static_cast <_GroupedListViewItemProviderAdaptor*>(GetCore().GetItemProviderAdaptor());
1046 SysTryReturn(NID_UI_CTRL, (pProviderAdaptor != null), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] _GroupedListItemProviderAdaptor is not set.");
1048 // Save description text show state to provider adaptor
1049 pProviderAdaptor->SetDescriptionTextShowState(groupIndex, itemIndex, show);
1051 if (GetCore().FindItem(groupIndex, itemIndex) != null)
1053 r = GetCore().RefreshTableView(groupIndex, itemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
1056 SetLastResultReturn(r);
1060 _GroupedListViewImpl::RefreshList(int groupIndex, int itemIndex, ListRefreshType type, bool needFlush)
1062 result r = E_SUCCESS;
1064 if (__needReloadItems)
1069 int groupCount = GetCore().GetGroupCount();
1070 int itemCount = GetCore().GetItemCountAt(groupIndex);
1072 if ((groupIndex < 0) || (groupIndex > groupCount) || (itemIndex < -1) || (itemIndex > itemCount) ||
1073 ((type != LIST_REFRESH_TYPE_ITEM_ADD) && (itemIndex == itemCount)))
1075 SysLogException(NID_UI_CTRL, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The index is out of range.");
1076 return E_OUT_OF_RANGE;
1079 _ListViewItem* pListViewItem = static_cast<_ListViewItem*>(GetCore().FindItem(groupIndex, itemIndex));
1081 // for lazy delete item
1082 if (type != LIST_REFRESH_TYPE_ITEM_ADD)
1084 if (__pItemNeedsLazyDeletion == pListViewItem)
1086 SetItemNeedsLazyDeletion();
1090 if (type == LIST_REFRESH_TYPE_ITEM_MODIFY)
1092 int sweepGroupIndex = -1;
1093 int sweepItemIndex = -1;
1095 GetCore().GetSweepItemIndex(sweepGroupIndex, sweepItemIndex);
1097 if ((sweepGroupIndex == groupIndex) && (sweepItemIndex == itemIndex))
1099 GetCore().ResetSweepItem();
1102 int topGroupIndex = -1;
1103 int topItemIndex = -1;
1104 int bottomGroupIndex = -1;
1105 int bottomItemIndex = -1;
1107 GetCore().GetFirstLoadedItemIndex(topGroupIndex, topItemIndex);
1108 GetCore().GetLastLoadedItemIndex(bottomGroupIndex, bottomItemIndex);
1110 if ((topGroupIndex > groupIndex) || (bottomGroupIndex < groupIndex) ||
1111 ((topGroupIndex == groupIndex) && (topItemIndex > itemIndex)) ||
1112 ((bottomGroupIndex == groupIndex) && (bottomItemIndex < itemIndex)))
1114 // not yet loaded item
1115 SetLastResultReturn(r);
1119 _ListViewItemStatus itemStatus;
1120 memset(&itemStatus, 0, sizeof(_ListViewItemStatus));
1121 bool needChangeEventTarget = false;
1123 if (pListViewItem != null && pListViewItem->IsItemSelected())
1125 needChangeEventTarget = true;
1128 if (needChangeEventTarget && (pListViewItem != null))
1130 pListViewItem->GetCurrentStatus(itemStatus);
1131 pListViewItem = null;
1135 GetCore().UnloadItem(groupIndex, itemIndex);
1137 pListViewItem = static_cast<_ListViewItem*>(GetCore().LoadItem(groupIndex, itemIndex));
1139 if (needChangeEventTarget && (pListViewItem != null))
1141 pListViewItem->SetCurrentStatus(itemStatus);
1143 _Control* pTarget = static_cast<_Control*>(pListViewItem);
1145 for (int i = 0; i < pListViewItem->GetChildCount(); i++)
1147 if (pListViewItem->GetChild(i)->GetBoundsF().Contains(itemStatus.currentTouchPosition))
1149 pTarget = pListViewItem->GetChild(i);
1153 // change touch event target
1154 pTarget->SetChangingEventTarget(true);
1155 _TouchManager::GetInstance()->SetChangedTouchableTarget(pTarget);
1161 r = GetCore().RefreshTableView(groupIndex, itemIndex, static_cast<TableViewRefreshType>(type));
1164 CheckEmptyListShowState();
1172 SetLastResultReturn(r);
1176 _GroupedListViewImpl::RefreshList(int groupIndex, int itemIndex, int elementId)
1178 if ((groupIndex < 0) || (groupIndex >= GetCore().GetGroupCount()) || (itemIndex < 0) || (itemIndex >= GetCore().GetItemCountAt(groupIndex)))
1180 return E_OUT_OF_RANGE;
1183 result r = E_SUCCESS;
1184 _ListViewItem* pListViewItem = static_cast<_ListViewItem*>(GetCore().FindItem(groupIndex, itemIndex));
1186 if (pListViewItem != null)
1188 r = (pListViewItem->RefreshElement(elementId)) ? E_SUCCESS : E_OUT_OF_RANGE;
1191 SetLastResultReturn(r);
1195 _GroupedListViewImpl::UpdateList(void)
1197 __needReloadItems = true;
1199 // for lazy delete item
1200 SetItemNeedsLazyDeletion();
1202 result r = GetCore().UpdateTableView();
1204 CheckEmptyListShowState();
1208 // API versioning for initial Show() operation
1209 if (Tizen::App::_AppInfo::GetApiVersion() == _API_VERSION_2_0 && Tizen::App::_AppInfo::IsOspCompat())
1214 __needReloadItems = false;
1216 SetLastResultReturn(r);
1220 _GroupedListViewImpl::SetItemNeedsLazyDeletion(void)
1222 if (__pItemNeedsLazyDeletion != null)
1224 _GroupedListViewItemProviderAdaptor* pProviderAdaptor =
1225 static_cast <_GroupedListViewItemProviderAdaptor*>(GetCore().GetItemProviderAdaptor());
1227 if (pProviderAdaptor != null)
1229 pProviderAdaptor->SetItemNeedsLazyDeletion(__pItemNeedsLazyDeletion);
1235 _GroupedListViewImpl::GetItemIndexFromPosition(const FloatPoint& position, int& groupIndex, int& itemIndex) const
1237 result r = GetCore().GetItemIndexFromPosition(position, groupIndex, itemIndex);
1239 SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] There is no item at the specified position.");
1241 SetLastResultReturn(r);
1245 _GroupedListViewImpl::GetItemIndexFromPosition(const FloatPoint& position, int& groupIndex, int& itemIndex, int& elementId) const
1249 result r = GetCore().GetItemIndexFromPosition(position, groupIndex, itemIndex);
1250 SysTryReturn(NID_UI_CTRL, (r == E_SUCCESS), E_SYSTEM, E_SYSTEM, "[E_SYSTEM] There is no item at the specified position.");
1252 _ListViewItem* pListViewItem = static_cast<_ListViewItem*>(GetCore().FindItem(groupIndex, itemIndex));
1254 if (pListViewItem != null)
1256 FloatPoint originPosition = pListViewItem->GetPositionF();
1257 originPosition.y -= GetCore().GetScrollPosition();
1259 elementId = pListViewItem->GetElementIdFromPosition(FloatPoint(position.x - originPosition.x, position.y - originPosition.y));
1262 SetLastResultReturn(r);
1266 _GroupedListViewImpl::SetSectionColor(const Color& color)
1268 return GetCore().SetSectionColor(color);
1272 _GroupedListViewImpl::GetSectionColor(void) const
1274 return GetCore().GetSectionColor();
1278 _GroupedListViewImpl::SetItemDividerColor(const Color& color)
1280 return GetCore().SetItemDividerColor(color);
1284 _GroupedListViewImpl::GetItemDividerColor(void) const
1286 return GetCore().GetItemDividerColor();
1290 _GroupedListViewImpl::SetListBackgroundColor(const Color& color)
1292 SetBackgroundColor(color);
1296 _GroupedListViewImpl::SetBackgroundBitmap(const Bitmap* pBitmap)
1298 GetCore().SetBackgroundBitmap(const_cast<Bitmap*>(pBitmap));
1299 GetCore().SetBackgroundBitmapStretch(true);
1301 SetLastResultReturn(E_SUCCESS);
1305 _GroupedListViewImpl::SetBitmapOfEmptyList(const Bitmap* pBitmap)
1307 if (pBitmap == null)
1309 if (__pEmptyBitmap != null)
1311 GetCore().DetachChild(*__pEmptyBitmap);
1313 delete __pEmptyBitmap;
1314 __pEmptyBitmap = null;
1319 if (__pEmptyBitmap == null)
1321 __pEmptyBitmap = _Label::CreateLabelN();
1322 SysTryReturn(NID_UI_CTRL, (__pEmptyBitmap != null), E_SYSTEM, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(GetLastResult()));
1324 __pEmptyBitmap->SetVisibleState(false);
1325 __pEmptyBitmap->SetMargin(0.0f, 0.0f);
1327 GetCore().AttachChild(*__pEmptyBitmap);
1330 __pEmptyBitmap->SetSize(FloatDimension(pBitmap->GetWidthF(), pBitmap->GetHeightF()));
1331 __pEmptyBitmap->SetBackgroundColor(Color(0, 0, 0, 0));
1332 __pEmptyBitmap->SetBackgroundBitmap(*pBitmap);
1335 AdjustLayoutOfEmptyList();
1337 SetLastResultReturn(E_SUCCESS);
1341 _GroupedListViewImpl::SetTextOfEmptyList(const String& text)
1345 if (__pEmptyText != null)
1347 GetCore().DetachChild(*__pEmptyText);
1349 delete __pEmptyText;
1350 __pEmptyText = null;
1355 if (__pEmptyText == null)
1357 __pEmptyText = _Label::CreateLabelN();
1358 SysTryReturn(NID_UI_CTRL, (__pEmptyText != null), E_SYSTEM, E_SYSTEM, "[%s] Propagating.", GetErrorMessage(GetLastResult()));
1360 __pEmptyText->SetVisibleState(false);
1361 __pEmptyText->SetMargin(0.0f, 0.0f);
1363 GetCore().AttachChild(*__pEmptyText);
1366 TextObject* pText = new (std::nothrow) TextObject;
1367 SysTryReturn(NID_UI_CTRL, (pText != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Propagating.", GetErrorMessage(GetLastResult()));
1371 TextSimple* pSimpleText = new (std::nothrow) TextSimple(const_cast <wchar_t*>(text.GetPointer()), text.GetLength());
1372 SysTryReturn(NID_UI_CTRL, (pSimpleText != null), E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[%s] Propagating.", GetErrorMessage(GetLastResult()));
1373 pText->AppendElement(*pSimpleText);
1375 float fontSize = 0.0f;
1376 GET_SHAPE_CONFIG(LISTVIEW::EMPTY_LIST_TEXT_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, fontSize);
1379 font.Construct(GetFont(), FONT_STYLE_PLAIN, fontSize);
1380 pText->SetFont(&font, 0, pText->GetTextLength());
1382 FloatDimension listDimension = GetCore().GetSizeF();
1384 pText->SetBounds(FloatRectangle(0.0f, 0.0f, listDimension.width, 1.0f));
1387 FloatDimension labelDimension = pText->GetTextExtentF(0, pText->GetTextLength());
1388 labelDimension.height = pText->GetTotalHeightF();
1390 if (labelDimension.width > listDimension.width)
1392 pText->SetBounds(FloatRectangle(0.0f, 0.0f, listDimension.width, 1.0f));
1395 float labelHeight = pText->GetTotalHeightF();
1397 labelDimension.width = listDimension.width;
1398 labelDimension.height = ((listDimension.height < labelHeight) ? listDimension.height : labelHeight);
1403 __pEmptyText->SetSize(labelDimension);
1404 __pEmptyText->SetBackgroundColor(Color(0, 0, 0, 0));
1405 __pEmptyText->SetMargin(0.0f, 0.0f, 0.0f, 0.0f);
1406 __pEmptyText->SetTextColor(__emptyTextColor);
1407 __pEmptyText->SetTextConfig(fontSize, LABEL_TEXT_STYLE_NORMAL);
1408 __pEmptyText->SetText(text);
1411 AdjustLayoutOfEmptyList();
1413 SetLastResultReturn(E_SUCCESS);
1417 _GroupedListViewImpl::GetTextOfEmptyList(void) const
1419 return ((__pEmptyText != null) ? __pEmptyText->GetText() : String());
1423 _GroupedListViewImpl::SetTextColorOfEmptyList(const Color& color)
1425 __emptyTextColor = color;
1427 if (__pEmptyText != null)
1429 __pEmptyText->SetTextColor(color);
1432 SetLastResultReturn(E_SUCCESS);
1436 _GroupedListViewImpl::GetTextColorOfEmptyList(void) const
1438 return __emptyTextColor;
1442 _GroupedListViewImpl::ExpandGroup(int groupIndex)
1444 SysTryReturn(NID_UI_CTRL, (GetCore().GetTableViewStyle() == TABLE_VIEW_STYLE_GROUPED), E_INVALID_OPERATION, E_INVALID_OPERATION,
1445 "[E_INVALID_OPERATION] The control should be indexed style.");
1447 return GetCore().ExpandGroup(groupIndex);
1451 _GroupedListViewImpl::CollapseGroup(int groupIndex)
1453 SysTryReturn(NID_UI_CTRL, (GetCore().GetTableViewStyle() == TABLE_VIEW_STYLE_GROUPED), E_INVALID_OPERATION, E_INVALID_OPERATION,
1454 "[E_INVALID_OPERATION] The control should be indexed style.");
1456 return GetCore().CollapseGroup(groupIndex);
1460 _GroupedListViewImpl::IsGroupExpanded(int groupIndex) const
1462 return GetCore().IsGroupExpanded(groupIndex);
1466 _GroupedListViewImpl::ExpandAllGroups(void)
1468 SysTryReturn(NID_UI_CTRL, (GetCore().GetTableViewStyle() == TABLE_VIEW_STYLE_GROUPED), E_INVALID_OPERATION, E_INVALID_OPERATION,
1469 "[E_INVALID_OPERATION] The control should be indexed style.");
1471 return GetCore().ExpandAllGroup(true);
1475 _GroupedListViewImpl::CollapseAllGroups(void)
1477 SysTryReturn(NID_UI_CTRL, (GetCore().GetTableViewStyle() == TABLE_VIEW_STYLE_GROUPED), E_INVALID_OPERATION, E_INVALID_OPERATION,
1478 "[E_INVALID_OPERATION] The control should be indexed style.");
1480 return GetCore().CollapseAllGroup(true);
1484 _GroupedListViewImpl::CheckEmptyListShowState(void)
1486 bool isEmpty = (GetGroupCount() == 0);
1488 if (__pEmptyBitmap != null)
1490 __pEmptyBitmap->SetVisibleState(isEmpty);
1492 if (__pEmptyText != null)
1494 __pEmptyText->SetVisibleState(isEmpty);
1500 _GroupedListViewImpl::AdjustLayoutOfEmptyList(void)
1502 FloatDimension listDimension = GetCore().GetSizeF();
1503 FloatDimension emptyBitmap;
1504 FloatDimension emptyText;
1505 FloatPoint bitmapPos;
1507 float totalHeight = 0.0f;
1508 float horizontalSpacing = 0.0f;
1510 if (__pEmptyBitmap != null)
1512 emptyBitmap = __pEmptyBitmap->GetSizeF();
1514 if (__pEmptyText != null)
1516 emptyText = __pEmptyText->GetSizeF();
1518 if (__pEmptyBitmap != null)
1520 GET_SHAPE_CONFIG(LISTVIEW::EMPTY_LIST_HORIZONTAL_SPACING, _CONTROL_ORIENTATION_PORTRAIT, horizontalSpacing);
1524 totalHeight = emptyBitmap.height + horizontalSpacing + emptyText.height;
1526 if ((__pEmptyBitmap != null) && (__pEmptyText != null) && (totalHeight < listDimension.height))
1528 bitmapPos.x = ((_FloatCompare(listDimension.width, emptyBitmap.width)) ? 0.0f : (listDimension.width - emptyBitmap.width) / 2.0f);
1529 bitmapPos.y = (listDimension.height - totalHeight) / 2.0f;
1531 textPos.x = ((_FloatCompare(listDimension.width, emptyText.width)) ? 0.0f : (listDimension.width - emptyText.width) / 2.0f);
1532 textPos.y = bitmapPos.y + emptyBitmap.height + horizontalSpacing;
1536 if (__pEmptyBitmap != null)
1538 bitmapPos.x = ((_FloatCompare(listDimension.width, emptyBitmap.width)) ? 0.0f : (listDimension.width - emptyBitmap.width) / 2.0f);
1539 bitmapPos.y = ((listDimension.height <= totalHeight) ? 0.0f : (listDimension.height - totalHeight) / 2.0f);
1542 if (__pEmptyText != null)
1544 textPos.x = ((_FloatCompare(listDimension.width, emptyText.width)) ? 0.0f : (listDimension.width - emptyText.width) / 2.0f);
1545 textPos.y = ((listDimension.height <= totalHeight ) ? (bitmapPos.y + emptyBitmap.height + horizontalSpacing) : (listDimension.height - totalHeight) / 2.0f);
1549 if (__pEmptyBitmap != null)
1551 __pEmptyBitmap->SetPosition(bitmapPos);
1553 if (__pEmptyText != null)
1555 __pEmptyText->SetPosition(textPos);
1558 CheckEmptyListShowState();
1563 _GroupedListViewImpl::BeginReorderingMode(void)
1565 SysTryReturn(NID_UI_CTRL, (GetCore().GetTableViewStyle() == TABLE_VIEW_STYLE_GROUPED), E_INVALID_OPERATION, E_INVALID_OPERATION,
1566 "[E_INVALID_OPERATION] Reordering mode is supported only Indexed style.");
1568 result r = GetCore().SetReorderModeEnabled(true);
1570 SetLastResultReturn(r);
1574 _GroupedListViewImpl::EndReorderingMode(void)
1576 SysTryReturn(NID_UI_CTRL, (GetCore().GetTableViewStyle() == TABLE_VIEW_STYLE_GROUPED), E_INVALID_OPERATION, E_INVALID_OPERATION,
1577 "[E_INVALID_OPERATION] Reordering mode is supported only Indexed style.");
1579 result r = GetCore().SetReorderModeEnabled(false);
1581 SetLastResultReturn(r);
1585 _GroupedListViewImpl::IsInReorderingMode(void) const
1587 return GetCore().IsReorderModeEnabled();
1591 _GroupedListViewImpl::SetScrollInputMode(ScrollInputMode mode)
1593 GetCore().SetScrollInputMode(mode);
1597 _GroupedListViewImpl::GetScrollInputMode(void) const
1599 return GetCore().GetScrollInputMode();
1603 _GroupedListViewImpl::OpenContextItem(int groupIndex, int itemIndex)
1605 return GetCore().OpenContextItem(groupIndex, itemIndex);
1609 _GroupedListViewImpl::CloseContextItem(int groupIndex, int itemIndex)
1611 return GetCore().CloseContextItem(groupIndex, itemIndex);
1615 _GroupedListViewImpl::IsContextItemOpened(int groupIndex, int itemIndex) const
1617 return GetCore().IsContextItemOpened(groupIndex, itemIndex);
1621 _GroupedListViewImpl::OnListViewContextItemStateChanged(_Control& source, int groupIndex, int itemIndex, int elementId,
1622 ListContextItemStatus status)
1624 if (__pListItemEvent != null)
1626 GetCore().ResetSweepItem();
1628 __pItemNeedsLazyDeletion = static_cast<_ListViewItem*>(GetCore().FindItem(groupIndex, itemIndex));
1630 _ListItemEventArg* pArg = new (std::nothrow) _ListItemEventArg(groupIndex, itemIndex, elementId, 0, NOTIFY_TYPE_SELCTED_CONTEXT_ITEM);
1631 __pListItemEvent->Fire(*pArg);
1633 __pItemNeedsLazyDeletion = null;
1638 _GroupedListViewImpl::OnGroupedTableViewGroupItemStateChanged(_TableView& tableView, int groupIndex, _TableViewItem* pItem,
1639 TableViewItemStatus status)
1641 FireListViewItemEvent(groupIndex, -1, pItem, status);
1645 _GroupedListViewImpl::OnGroupedTableViewItemStateChanged(_TableView& tableView, int groupIndex, int itemIndex, _TableViewItem* pItem,
1646 TableViewItemStatus status)
1648 FireListViewItemEvent(groupIndex, itemIndex, pItem, status);
1652 _GroupedListViewImpl::OnGroupedTableViewContextItemActivationStateChanged(_TableView& tableView, int groupIndex, int itemIndex,
1653 _TableViewItem* pContextItem, bool activated)
1655 _ListViewItem* pListViewItem = static_cast<_ListViewItem*>(GetCore().FindItem(groupIndex, itemIndex));
1657 if (pListViewItem != null)
1659 pListViewItem->SetContextItemActivationState(activated);
1664 _GroupedListViewImpl::OnGroupedTableViewItemReordered(_TableView& tableView, int groupIndexFrom, int itemIndexFrom,
1665 int groupIndexTo, int itemIndexTo)
1667 if (__pListItemEvent != null)
1669 _ListItemEventArg* pArg = new (std::nothrow) _ListItemEventArg(groupIndexFrom, itemIndexFrom, groupIndexTo, itemIndexTo,
1670 NOTIFY_TYPE_REORDERED_ITEM);
1671 __pListItemEvent->Fire(*pArg);
1676 _GroupedListViewImpl::OnSectionTableViewItemStateChanged(_TableView& tableView, int sectionIndex, int itemIndex, _TableViewItem* pItem,
1677 TableViewItemStatus status)
1679 FireListViewItemEvent(sectionIndex, itemIndex, pItem, status);
1683 _GroupedListViewImpl::OnSectionTableViewContextItemActivationStateChanged(_TableView& tableView, int sectionIndex, int itemIndex,
1684 _TableViewItem* pContextItem, bool activated)
1686 _ListViewItem* pListViewItem = static_cast<_ListViewItem*>(GetCore().FindItem(sectionIndex, itemIndex));
1688 if (pListViewItem != null)
1690 pListViewItem->SetContextItemActivationState(activated);
1695 _GroupedListViewImpl::OnTableViewItemSwept(_TableView& tableView, int groupIndex, int itemIndex, TableViewSweepDirection direction)
1697 if (__pListItemEvent != null)
1699 __pItemNeedsLazyDeletion = static_cast<_ListViewItem*>(GetCore().FindItem(groupIndex, itemIndex));
1701 _ListItemEventArg* pArg = new (std::nothrow) _ListItemEventArg(groupIndex, itemIndex, direction, 0, NOTIFY_TYPE_SWEPT_ITEM);
1702 __pListItemEvent->Fire(*pArg);
1704 __pItemNeedsLazyDeletion = null;
1709 _GroupedListViewImpl::FireListViewItemEvent(int groupIndex, int itemIndex, _TableViewItem* pItem, TableViewItemStatus status)
1711 if (__pListItemEvent != null)
1713 _ListViewItem* pListViewItem = static_cast<_ListViewItem*>(pItem);
1715 __pItemNeedsLazyDeletion = pListViewItem;
1717 if (pListViewItem != null)
1719 _ListViewItemStateChangedInfo itemInfo;
1720 pListViewItem->GetLastStateChangedInfo(itemInfo);
1722 if ((__pLinkEvent != null) && (itemInfo.pUiLinkInfo != null))
1724 IEventArg* pLinkEventArg = _PublicLinkEvent::CreateLinkEventArgN(itemInfo.pUiLinkInfo->textInfo,
1725 itemInfo.pUiLinkInfo->linkType, itemInfo.pUiLinkInfo->linkInfo);
1726 SysTryReturnVoidResult(NID_UI_CTRL, (pLinkEventArg != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create _LinkEventArg.");
1727 __pLinkEvent->Fire(*pLinkEventArg);
1732 _ListItemEventArg* pArg = new (std::nothrow) _ListItemEventArg(groupIndex, itemIndex, itemInfo.elementId, 0,
1733 static_cast<NotifyType>(status));
1734 __pListItemEvent->Fire(*pArg);
1737 pListViewItem->ClearLastStateChangedInfo();
1740 __pItemNeedsLazyDeletion = null;
1745 _GroupedListViewImpl::FireListViewItemLongPressedEvent(void)
1747 if (__pListItemEvent != null)
1749 int groupIndex = -1;
1753 if ((GetItemIndexFromPosition(GetCurrentTouchPosition(), groupIndex, itemIndex, elementId) == E_SUCCESS) && (itemIndex != -1))
1755 __pItemNeedsLazyDeletion = static_cast<_ListViewItem*>(GetCore().FindItem(groupIndex, itemIndex));
1757 if ((__pItemNeedsLazyDeletion != null) && (!__pItemNeedsLazyDeletion->IsContextItem()))
1759 _ListItemEventArg* pArg = new (std::nothrow) _ListItemEventArg(groupIndex, itemIndex, elementId, 0, NOTIFY_TYPE_LONG_PRESSED_ITEM);
1760 __pListItemEvent->Fire(*pArg);
1762 __pItemNeedsLazyDeletion = null;
1769 _GroupedListViewImpl::OnScrollEndReached(_Control& source, ScrollEndEvent type)
1771 if (__pScrollEvent != null)
1773 _ScrollEventArg* pEventArg = _ScrollEventArg::GetScrollEventArgN(GetPublic(), type);
1774 result r = GetLastResult();
1775 SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r));
1777 __pScrollEvent->Fire(*pEventArg);
1782 _GroupedListViewImpl::OnScrollPositionChanged(_Control& source, float scrollPosition)
1784 if (__pScrollEvent != null)
1786 _ScrollEventArg* pEventArg = _ScrollEventArg::GetScrollEventArgN(GetPublic(), scrollPosition);
1787 result r = GetLastResult();
1788 SysTryReturnVoidResult(NID_UI_CTRL, (pEventArg != null), r, "[%s] Propagating.", GetErrorMessage(r));
1790 __pScrollEvent->Fire(*pEventArg);
1795 _GroupedListViewImpl::OnScrollStopped(_Control& source)
1797 if (__pScrollEvent != null)
1799 _ScrollEventArg* pEventArg = _ScrollEventArg::GetScrollEventArgN(GetPublic());
1800 result r = GetLastResult();
1801 SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r));
1803 __pScrollEvent->Fire(*pEventArg);
1808 _GroupedListViewImpl::OnUiFastScrollIndexSelected(_Control& source, _FastScrollIndex& index)
1810 if (__pFastScrollEvent != null)
1812 String* pIndexText = index.GetIndexText();
1813 if (pIndexText != null)
1815 _FastScrollEventArg* pEventArg = new (std::nothrow) _FastScrollEventArg(GetPublic(), *pIndexText);
1816 __pFastScrollEvent->Fire(*pEventArg);
1822 _GroupedListViewImpl::OnDraw(void)
1824 _ControlImpl::OnDraw();
1826 if (__redrawListView)
1828 CheckEmptyListShowState();
1829 __redrawListView = false;
1834 _GroupedListViewImpl::OnChangeLayout(_ControlOrientation orientation)
1836 _ControlImpl::OnChangeLayout(orientation);
1838 __isBoundsChanged = true;
1842 _GroupedListViewImpl::OnBoundsChanged(void)
1844 _ControlImpl::OnBoundsChanged();
1846 if (__pEmptyBitmap != null)
1848 SetBitmapOfEmptyList(__pEmptyBitmap->GetBackgroundBitmap());
1850 if (__pEmptyText != null)
1852 SetTextOfEmptyList(__pEmptyText->GetText());
1855 if (__isBoundsChanged)
1857 int firstGroup = -1;
1861 int currentItem = -1;
1862 int lastItemInGroup = -1;
1864 GetCore().GetFirstLoadedItemIndex(firstGroup, firstItem);
1865 GetCore().GetLastLoadedItemIndex(lastGroup, lastItem);
1867 for (int i = firstGroup; i <= lastGroup; i++)
1869 currentItem = ((i == firstGroup) ? firstItem : -1);
1870 lastItemInGroup = ((i == lastGroup) ? lastItem : GetCore().GetItemCountAt(i));
1872 for (; currentItem <= lastItemInGroup; currentItem++)
1874 _ListViewItem* pListViewItem = static_cast<_ListViewItem*>(GetCore().FindItem(i, currentItem));
1876 if (pListViewItem != null)
1878 RefreshList(i, currentItem, LIST_REFRESH_TYPE_ITEM_MODIFY, false);
1883 __isBoundsChanged = false;
1888 _GroupedListViewImpl::OnFontChanged(Font* pFont)
1890 String fontName = GetFont();
1891 _GroupedListViewItemProviderAdaptor* pProviderAdaptor =
1892 static_cast <_GroupedListViewItemProviderAdaptor*>(GetCore().GetItemProviderAdaptor());
1894 if (__pEmptyText != null)
1896 __pEmptyText->SetFont(fontName);
1897 SetTextOfEmptyList(__pEmptyText->GetText());
1900 if (pProviderAdaptor != null)
1902 pProviderAdaptor->SetItemFont(fontName);
1905 int firstGroup = -1;
1909 int currentItem = -1;
1910 int lastItemInGroup = -1;
1912 GetCore().GetFirstLoadedItemIndex(firstGroup, firstItem);
1913 GetCore().GetLastLoadedItemIndex(lastGroup, lastItem);
1915 for (int i = firstGroup; i <= lastGroup; i++)
1917 currentItem = ((i == firstGroup) ? firstItem : -1);
1918 lastItemInGroup = ((i == lastGroup) ? lastItem : GetCore().GetItemCountAt(i));
1920 for (; currentItem <= lastItemInGroup; currentItem++)
1922 _ListViewItem* pListViewItem = static_cast<_ListViewItem*>(GetCore().FindItem(i, currentItem));
1924 if (pListViewItem != null)
1926 pListViewItem->SetFont(fontName);
1933 _GroupedListViewImpl::OnFontInfoRequested(unsigned long& style, int& size)
1935 float textSize = 0.0f;
1936 OnFontInfoRequested(style, textSize);
1938 size = _CoordinateSystemUtils::ConvertToInteger(textSize);
1942 _GroupedListViewImpl::OnFontInfoRequested(unsigned long& style, float& size)
1944 GET_SHAPE_CONFIG(LISTVIEW::EMPTY_LIST_TEXT_HEIGHT, _CONTROL_ORIENTATION_PORTRAIT, size);
1945 style = FONT_STYLE_PLAIN;
1949 _GroupedListViewImpl::GetCurrentTouchPosition(void)
1951 FloatPoint currentTouchPos = _TouchManager::GetInstance()->GetScreenPoint(0);
1952 FloatRectangle bounds = GetCore().GetAbsoluteBoundsF();
1954 currentTouchPos.x -= bounds.x;
1955 currentTouchPos.y -= bounds.y;
1957 return currentTouchPos;
1961 _GroupedListViewImpl::OnTouchEventListenerAdded(void)
1967 _GroupedListViewImpl::OnTouchEventListenerRemoved(void)
1972 class _GroupedListViewMaker
1973 : public _UiBuilderControlMaker
1976 _GroupedListViewMaker(_UiBuilder* uibuilder)
1977 : _UiBuilderControlMaker(uibuilder){};
1979 virtual ~_GroupedListViewMaker(){};
1981 static _UiBuilderControlMaker*
1982 GetInstance(_UiBuilder* uibuilder)
1984 _GroupedListViewMaker* pGroupedListViewMaker = new (std::nothrow) _GroupedListViewMaker(uibuilder);
1985 return pGroupedListViewMaker;
1988 virtual Tizen::Ui::Control*
1989 Make(_UiBuilderControl* pControl)
1991 result r = E_SYSTEM;
1992 _UiBuilderControlLayout* pControlProperty = null;
1993 GroupedListView* pGroupedListView = null;
1994 FloatRectangle rect;
1996 ListScrollStyle scrollStyle = SCROLL_STYLE_FADE_OUT;
1997 GroupedListViewStyle style = GROUPED_LIST_VIEW_STYLE_INDEXED;
1998 ScrollInputMode scrollInputMode = SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION;
2000 String elementString;
2001 bool itemDividerState = true;
2003 bool sweepEnabledState = false;
2006 GetProperty(pControl, &pControlProperty);
2007 if (pControlProperty == null)
2012 pGroupedListView = new (std::nothrow) GroupedListView();
2013 if (pGroupedListView == null)
2018 rect = pControlProperty->GetRectF();
2021 styleString = pControlProperty->GetStyle();
2023 if (styleString.Equals(L"GROUPED_LIST_VIEW_STYLE_SECTION", false))
2025 style = GROUPED_LIST_VIEW_STYLE_SECTION;
2029 style = GROUPED_LIST_VIEW_STYLE_INDEXED;
2033 if (pControl->GetElement(L"itemDivider", elementString))
2035 if (elementString.Equals(L"true", false))
2037 itemDividerState = true;
2041 itemDividerState = false;
2045 if (pControl->GetElement(L"listScrollStyle", elementString))
2047 if (elementString.Equals(L"SCROLL_STYLE_FIXED", false))
2049 scrollStyle = SCROLL_STYLE_FIXED;
2051 else if (elementString.Equals(L"SCROLL_STYLE_FAST_SCROLL", false))
2053 scrollStyle = SCROLL_STYLE_FAST_SCROLL;
2055 else if (elementString.Equals(L"SCROLL_STYLE_JUMP_TO_TOP", false))
2057 scrollStyle = SCROLL_STYLE_JUMP_TO_TOP;
2059 else if (elementString.Equals(L"SCROLL_STYLE_THUMB", false))
2061 scrollStyle = SCROLL_STYLE_THUMB;
2064 else if (pControl->GetElement(L"fastScroll", elementString))
2066 if (elementString.Equals(L"true", false))
2068 scrollStyle = SCROLL_STYLE_FAST_SCROLL;
2072 r = pGroupedListView->Construct(rect, style, itemDividerState, scrollStyle);
2073 SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
2075 // Set BackgroundsBitmap
2076 if (pControl->GetElement("backgroundBitmapPath", elementString))
2078 Bitmap* pBackgroundBitmap = null;
2079 pBackgroundBitmap = LoadBitmapN(elementString);
2080 if (pBackgroundBitmap != null)
2082 r = pGroupedListView->SetBackgroundBitmap(pBackgroundBitmap);
2083 delete pBackgroundBitmap;
2084 pBackgroundBitmap = null;
2086 SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
2091 if (pControl->GetElement(L"textOfEmptyList", elementString))
2093 r = pGroupedListView->SetTextOfEmptyList(elementString);
2094 SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
2097 if (pControl->GetElement(L"colorOfEmptyListText", elementString))
2099 ConvertStringToColor(elementString, color);
2100 r = pGroupedListView->SetTextColorOfEmptyList(color);
2101 SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
2104 if (pControl->GetElement(L"bitmapPathOfEmptyList", elementString))
2106 Bitmap* pBackgroundBitmap = null;
2107 pBackgroundBitmap = LoadBitmapN(elementString); //__image->DecodeN(path,BITMAP_PIXEL_FORMAT_RGB565);
2108 if (pBackgroundBitmap != null)
2110 r = pGroupedListView->SetBitmapOfEmptyList(pBackgroundBitmap);
2111 delete pBackgroundBitmap;
2112 pBackgroundBitmap = null;
2114 SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
2118 if (pControl->GetElement(L"backgroundColorOpacity", elementString) || pControl->GetElement(L"BGColorOpacity", elementString))
2120 Base::Integer::Parse(elementString, opacity);
2123 if (pControl->GetElement(L"backgroundColor", elementString) || pControl->GetElement(L"BGColor", elementString))
2125 ConvertStringToColor32(elementString, opacity, color);
2126 r = pGroupedListView->SetBackgroundColor(color);
2127 SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
2130 if (pControl->GetElement(L"itemDividerColor", elementString))
2132 ConvertStringToColor(elementString, color);
2133 r = pGroupedListView->SetItemDividerColor(color);
2134 SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
2137 if (pControl->GetElement(L"sectionColor", elementString))
2139 ConvertStringToColor(elementString, color);
2140 r = pGroupedListView->SetSectionColor(color);
2141 SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
2144 if (pControl->GetElement(L"sweepEnabled", elementString))
2147 if (elementString.Equals(L"true", false))
2149 sweepEnabledState = true;
2153 sweepEnabledState = false;
2156 r = pGroupedListView->SetSweepEnabled(sweepEnabledState);
2157 SysTryCatch(NID_UI, (r == E_SUCCESS), , r, "[%s] Propagating.", GetErrorMessage(r));
2160 // scroll Input Mode
2161 if (pControl->GetElement(L"scrollInputMode", elementString))
2163 if (elementString.Equals(L"SCROLL_INPUT_MODE_RESTRICT_TO_INITIAL_DIRECTION", false))
2165 scrollInputMode = SCROLL_INPUT_MODE_RESTRICT_TO_INITIAL_DIRECTION;
2168 pGroupedListView->SetScrollInputMode(scrollInputMode);
2171 return pGroupedListView;
2174 delete pGroupedListView;
2179 }; // _GroupedListViewMaker
2181 _GroupedListViewRegister::_GroupedListViewRegister()
2183 _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance();
2184 pUiBuilderControlTableManager->RegisterControl(L"GroupedListView", _GroupedListViewMaker::GetInstance);
2187 _GroupedListViewRegister::~_GroupedListViewRegister()
2189 _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance();
2190 pUiBuilderControlTableManager->UnregisterControl(L"GroupedListView");
2192 static _GroupedListViewRegister GroupedListViewRegisterToUIbuilder;
2193 }}} // Tizen::Ui::Controls