2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.1 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://floralicense.org/license/
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an AS IS BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
18 * @file CtGroupContactListForm.cpp
19 * @brief This is the implementation file for the GroupContactListForm class.
22 #include "CtContactListItem.h"
23 #include "CtContactsApp.h"
24 #include "CtGroupContactListForm.h"
25 #include "CtGroupContactListPresentationModel.h"
26 #include "CtResourceManager.h"
27 #include "CtSceneRegister.h"
28 #include "CtSearchListEventListener.h"
29 #include "CtSearchListItem.h"
32 using namespace Tizen::App;
33 using namespace Tizen::Base;
34 using namespace Tizen::Base::Collection;
35 using namespace Tizen::Base::Utility;
36 using namespace Tizen::Graphics;
37 using namespace Tizen::Ui;
38 using namespace Tizen::Ui::Controls;
39 using namespace Tizen::Ui::Scenes;
40 using namespace Tizen::Social;
42 static const int IDA_FOOTER_ADD_MEMBER = 11;
43 static const int IDA_MORE_REMOVE = 12;
44 static const int IDA_LIST_ELEMENT_DELETE = 40;
45 static const int IDA_LIST_ELEMENT_CALL = 41;
46 static const int IDA_LIST_ELEMENT_MESSAGE = 42;
47 static const int IDA_LIST_ELEMENT_VIDEO_CALL = 43;
48 static const int IDA_POPUP_DELETE_YES = 30;
49 static const int IDA_POPUP_DELETE_CANCEL = 31;
50 static const int IDA_POPUP_CONTACT_VALUE_CLOSE = 32;
52 static const wchar_t* IDB_NO_CONTENTS = L"00_Nocontents_text.png";
54 static const int H_SEARCHBAR = 86;
55 static const int H_GROUP_ITEM = 76;
57 static const int X_EMPTY_IMAGE = 220;
58 static const int Y_EMPTY_IMAGE = 300;
59 static const int W_EMPTY_IMAGE = 280;
60 static const int H_EMPTY_IMAGE = 280;
61 static const int Y_EMPTY_COMMENT = 618;
62 static const int H_EMPTY_COMMENT = 38;
63 static const int W_DELETE_BUTTON_GAP = 20;
64 static const int W_CONTACT_VALUE_POPUP = 688;
65 static const int H_CONTACT_VALUE_POPUP = 532;
66 static const int H_CONTACT_VALUE_POPUP_LIST_VIEW = 338;
67 static const int Y_CLOSE_BUTTON = 358;
68 static const int H_CLOSE_BUTTON = 74;
69 static const int W_CLOSE_BUTTON = 394;
71 static const int FONT_SIZE_EMPTY_COMMENT = 32;
73 static const RequestId REQ_ID_MOVE_TO_GROUP_LIST = 1000;
75 static const unsigned int COLOR_EMPTY_COMMENT = Color32<102, 102, 102>::Value;
76 static const unsigned int COLOR_DELETE_BUTTON_NORMAL = Color32<213, 82, 82>::Value;
77 static const unsigned int COLOR_DELETE_BUTTON_PRESSED = Color32<194, 71, 71>::Value;
78 static const unsigned int COLOR_DELETE_BUTTON_TEXT = Color32<248, 246, 239>::Value;
79 static const unsigned int COLOR_DELETE_ELEMENT_NORMAL = Color32<208, 82, 82>::Value;
80 static const unsigned int COLOR_DELETE_ELEMENT_PRESSED = Color32<194, 71, 71>::Value;
81 static const unsigned int COLOR_DELETE_ELEMENT_TEXT = Color32<248, 246, 239>::Value;
83 static const int LIST_VIEW_GROUP_INDEX_SHIFT = 16;
84 static const int LIST_VIEW_MASK = 0xFFFF;
86 static const wchar_t* INPUT_KEY_CALL_TYPE = L"http://tizen.org/appcontrol/data/call/type";
87 static const wchar_t* INPUT_KEY_MESSAGE_TYPE = L"http://tizen.org/appcontrol/data/message/type";
88 static const wchar_t* INPUT_KEY_MESSAGE_TO = L"http://tizen.org/appcontrol/data/to";
89 static const wchar_t* INPUT_TYPE_VIDEO = L"video";
90 static const wchar_t* INPUT_TYPE_VOICE = L"voice";
91 static const wchar_t* INPUT_TYPE_SMS = L"sms";
92 static const wchar_t* INPUT_URI_TEL = L"tel:";
94 GroupContactListForm::GroupContactListForm(void)
97 , __pSearchListView(null)
99 , __pDeletePopup(null)
100 , __pMultipleContactValuePopup(null)
101 , __pEmptyImageLabel(null)
102 , __pEmptyCommentLabel(null)
103 , __pOptionMenu(null)
105 , __pContactValueListEvent(null)
106 , __pPresentationModel(null)
107 , __pSearchListEvent(null)
108 , __isCategoryUpdating(false)
109 , __sweptItemIndex(-1)
110 , __selectedIndex(-1)
114 GroupContactListForm::~GroupContactListForm(void)
119 GroupContactListForm::Initialize(void)
121 Construct(FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR | FORM_STYLE_HEADER | FORM_STYLE_FOOTER);
125 GroupContactListForm::OnInitializing(void)
127 Footer* pFooter = GetFooter();
128 pFooter->AddActionEventListener(*this);
130 SetFormBackEventListener(this);
131 SetFormMenuEventListener(this);
133 __pPresentationModel = GroupContactListPresentationModel::GetInstance();
135 __pListView = new (std::nothrow) GroupedListView();
136 __pListView->Construct(Rectangle(0, H_SEARCHBAR, GetClientAreaBounds().width, GetClientAreaBounds().height - H_SEARCHBAR), GROUPED_LIST_VIEW_STYLE_INDEXED, true, true);
137 __pListView->SetItemProvider(*this);
138 __pListView->AddFastScrollListener(*this);
139 __pListView->AddGroupedListViewItemEventListener(*this);
140 __pListView->AddTouchEventListener(*this);
141 AddControl(__pListView);
143 __pSearchBar = new (std::nothrow) SearchBar();
144 __pSearchBar->Construct(Rectangle(0, 0, GetClientAreaBounds().width, H_SEARCHBAR));
145 __pSearchBar->SetGuideText(ResourceManager::GetString(L"IDS_COM_BODY_SEARCH"));
146 __pSearchBar->AddSearchBarEventListener(*this);
147 __pSearchBar->AddFocusEventListener(*this);
148 __pSearchBar->AddTextEventListener(*this);
149 __pSearchBar->AddKeypadEventListener(*this);
150 __pSearchBar->SetContentAreaSize(Dimension(0, 0));
152 __pSearchListEvent = new (std::nothrow) SearchListEventListener(LIST_ANNEX_STYLE_NORMAL, __pPresentationModel);
153 AddControl(__pSearchBar);
155 __pSearchListView = new (std::nothrow) GroupedListView();
156 __pSearchListView->Construct(Rectangle(0, H_SEARCHBAR, GetClientAreaBounds().width, GetClientAreaBounds().height - H_SEARCHBAR), GROUPED_LIST_VIEW_STYLE_INDEXED, true, false);
157 __pSearchListView->SetItemProvider(*__pSearchListEvent);
158 __pSearchListView->AddGroupedListViewItemEventListener(*this);
159 __pSearchListView->AddTouchEventListener(*this);
160 __pSearchListView->SetTextOfEmptyList(ResourceManager::GetString(L"IDS_PB_BODY_NO_CONTACTS"));
161 __pSearchListView->SetShowState(false);
162 __pListView->AddTouchEventListener(*this);
163 AddControl(__pSearchListView);
165 __pEmptyImageLabel = new (std::nothrow) Label();
166 __pEmptyImageLabel->Construct(Rectangle(X_EMPTY_IMAGE, Y_EMPTY_IMAGE, W_EMPTY_IMAGE, H_EMPTY_IMAGE), L"");
167 Bitmap* pBitmap = ResourceManager::GetBitmapN(IDB_NO_CONTENTS);
170 __pEmptyImageLabel->SetBackgroundBitmap(*pBitmap);
173 __pEmptyImageLabel->SetShowState(false);
175 AddControl(__pEmptyImageLabel);
177 __pEmptyCommentLabel = new (std::nothrow) Label();
178 __pEmptyCommentLabel->Construct(Rectangle(0, Y_EMPTY_COMMENT, GetClientAreaBounds().width, H_EMPTY_COMMENT),
179 ResourceManager::GetString(L"IDS_PB_BODY_NO_CONTACTS"));
180 __pEmptyCommentLabel->SetTextConfig(FONT_SIZE_EMPTY_COMMENT, LABEL_TEXT_STYLE_NORMAL);
181 __pEmptyCommentLabel->SetTextColor(Color(COLOR_EMPTY_COMMENT));
182 __pEmptyCommentLabel->SetShowState(false);
184 AddControl(__pEmptyCommentLabel);
186 __pOptionMenu = new (std::nothrow) OptionMenu();
187 __pOptionMenu->Construct();
188 __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_REMOVE"), IDA_MORE_REMOVE);
189 __pOptionMenu->AddActionEventListener(*this);
190 __pOptionMenu->SetShowState(false);
196 GroupContactListForm::OnTerminating(void)
198 result r = E_SUCCESS;
200 if (__pPresentationModel != null)
202 __pPresentationModel->RemoveContactChangeListener(*this);
204 if (__pDeletePopup != null)
206 delete __pDeletePopup;
208 if (__pSearchListEvent != null)
210 delete __pSearchListEvent;
212 delete __pAppControl;
213 delete __pOptionMenu;
214 delete __pMultipleContactValuePopup;
220 GroupContactListForm::OnFormMenuRequested(Tizen::Ui::Controls::Form& source)
222 if (__pListView->GetShowState() == true)
224 __pListView->SetFocus();
226 else if (__pSearchListView->GetShowState() == true)
228 __pSearchListView->SetFocus();
231 if(__pPresentationModel->GetContactCount() > 0)
233 __pOptionMenu->SetShowState(true);
234 __pOptionMenu->Show();
239 GroupContactListForm::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
241 SceneManager* pSceneManager = SceneManager::GetInstance();
242 pSceneManager->GoBackward(BackwardSceneTransition(IDSCN_GROUP_LIST, SCENE_TRANSITION_ANIMATION_TYPE_RIGHT));
246 GroupContactListForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
248 SceneManager* pSceneManager = SceneManager::GetInstance();
250 if (__pSearchBar->GetMode() == SEARCH_BAR_MODE_INPUT)
252 __pSearchBar->SetMode(SEARCH_BAR_MODE_NORMAL);
257 case IDA_FOOTER_ADD_MEMBER:
259 ArrayList* pArgList = new (std::nothrow) ArrayList();
260 pArgList->Construct();
262 for (int groupIndex = 0; groupIndex < __pListView->GetGroupCount(); groupIndex++)
264 for (int itemIndex = 0; itemIndex < __pListView->GetItemCountAt(groupIndex); itemIndex++)
266 pArgList->Add(*(new (std::nothrow) Integer(__pPresentationModel->GetContactId(groupIndex, itemIndex))));
269 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_CONTACT_SELECTOR, SCENE_TRANSITION_ANIMATION_TYPE_LEFT), pArgList);
272 case IDA_MORE_REMOVE:
274 ArrayList* pArgList = new (std::nothrow) ArrayList();
275 pArgList->Construct();
276 pArgList->Add(*(new (std::nothrow) Integer(__categoryId)));
277 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_GROUP_CONTACT_LIST_EDITOR), pArgList);
280 case IDA_POPUP_DELETE_YES:
282 int groupIndex = (__sweptItemIndex >> LIST_VIEW_GROUP_INDEX_SHIFT) & LIST_VIEW_MASK;
283 int itemIndex = __sweptItemIndex & LIST_VIEW_MASK;
285 __pPresentationModel->RemoveContactFromCategory(groupIndex, itemIndex);
289 case IDA_POPUP_DELETE_CANCEL:
294 case IDA_POPUP_CONTACT_VALUE_CLOSE:
296 HideContactValuePopup();
305 GroupContactListForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs)
307 ContactsApp* pContactsApp = static_cast<ContactsApp*>(ContactsApp::GetInstance());
311 if (previousSceneId.Equals(IDSCN_GROUP_LIST, true))
313 Integer* pCategoryId = null;
314 IEnumerator* pEnum = pArgs->GetEnumeratorN();
315 while (pEnum->MoveNext() == E_SUCCESS)
317 pCategoryId = static_cast<Integer*>(pEnum->GetCurrent());
318 if (pCategoryId != null)
320 __categoryId = pCategoryId->ToInt();
322 if (__categoryId == ID_GROUP_CONTACT_NOT_ASSIGNED)
324 __pPresentationModel->InitializeGroupContactList(Tizen::Social::INVALID_RECORD_ID);
325 GetFooter()->SetShowState(false);
329 __pPresentationModel->InitializeGroupContactList(__categoryId);
330 GetFooter()->SetShowState(true);
332 __pListView->SetSize(__pListView->GetWidth(), GetClientAreaBounds().height - __pSearchBar->GetHeight());
333 __pSearchListView->SetSize(__pListView->GetWidth(), GetClientAreaBounds().height - __pSearchBar->GetHeight());
339 else if (previousSceneId.Equals(IDSCN_CONTACT_SELECTOR, true))
341 result r = __pPresentationModel->AddContactToCategory(pArgs);
345 __isCategoryUpdating = true;
349 pArgs->RemoveAll(true);
354 if (previousSceneId.Equals(IDSCN_CONTACT_DETAILS, true))
356 if (__categoryId == ID_GROUP_CONTACT_NOT_ASSIGNED)
358 __pPresentationModel->InitializeGroupContactList(Tizen::Social::INVALID_RECORD_ID);
362 result r = __pPresentationModel->InitializeGroupContactList(__categoryId);
365 SendUserEvent(REQ_ID_MOVE_TO_GROUP_LIST, null);
371 if (__categoryId == ID_GROUP_CONTACT_NOT_ASSIGNED && __pSearchListEvent != null)
373 __pSearchListEvent->SetShowDeleteOption(false);
376 if (__pPresentationModel->IsCategoryValid())
378 String groupName = __pPresentationModel->GetCategoryName();
380 Header* pHeader = GetHeader();
381 pHeader->SetTitleText(groupName);
383 Footer* pFooter = GetFooter();
384 SetFormMenuEventListener(null);
386 if (pContactsApp->GetOperationId() == OPERATION_ID_PICK)
388 pFooter->SetShowState(false);
389 __pListView->SetSize(__pListView->GetWidth(), GetClientAreaBounds().height - H_SEARCHBAR );
390 __pSearchListView->SetSize(__pSearchListView->GetWidth(), GetClientAreaBounds().height - H_SEARCHBAR);
393 if (__pPresentationModel->GetContactCount() == 0)
395 __pSearchBar->SetShowState(false);
396 __pListView->SetShowState(false);
397 __pEmptyImageLabel->SetShowState(true);
398 __pEmptyCommentLabel->SetShowState(true);
400 __pPresentationModel->AddContactChangeListener(*this);
404 if (__categoryId != ID_GROUP_CONTACT_NOT_ASSIGNED)
406 if (pFooter->GetItemCount() == 0)
408 FooterItem footerItemAdd;
409 footerItemAdd.Construct(IDA_FOOTER_ADD_MEMBER);
410 footerItemAdd.SetText(ResourceManager::GetString(L"IDS_PB_SK_ADD_MEMBER"));
411 pFooter->AddItem(footerItemAdd);
414 if (__pPresentationModel->GetAllContactsCount() <= __pPresentationModel->GetContactCount())
416 pFooter->SetItemEnabled(0, false);
420 pFooter->SetItemEnabled(0, true);
423 if (__pPresentationModel->GetContactCount() > 0)
425 SetFormMenuEventListener(this);
429 SetFormMenuEventListener(null);
433 if (__pPresentationModel->GetContactCount() > 0)
435 __pSearchBar->SetShowState(true);
436 __pListView->SetShowState(true);
437 __pEmptyImageLabel->SetShowState(false);
438 __pEmptyCommentLabel->SetShowState(false);
440 __pListView->SetFastScrollIndex(__pPresentationModel->GetAllKeys(), false);
441 __pListView->UpdateList();
443 if (__pSearchBar->GetMode() == SEARCH_BAR_MODE_INPUT && __pSearchBar->GetTextLength() != 0)
445 String searchText = __pSearchBar->GetText();
448 ContactsApp* pContactsApp = static_cast<ContactsApp*>(ContactsApp::GetInstance());
449 if (pContactsApp->GetReturnType() == APP_CONTROL_RETURN_TYPE_PHONE)
451 __pPresentationModel->SetSearchText(searchText, SEARCH_TYPE_HAS_PHONE_ONLY);
453 else if (pContactsApp->GetReturnType() == APP_CONTROL_RETURN_TYPE_EMAIL)
455 __pPresentationModel->SetSearchText(searchText, SEARCH_TYPE_HAS_EMAIL_ONLY);
459 __pPresentationModel->SetSearchText(searchText, SEARCH_TYPE_NORMAL);
461 __pSearchListView->UpdateList();
462 __pListView->SetShowState(false);
463 __pSearchListView->SetShowState(true);
467 __pListView->SetShowState(true);
468 __pSearchListView->SetShowState(false);
473 __pSearchBar->SetShowState(false);
474 __pListView->SetShowState(false);
475 __pSearchListView->SetShowState(false);
476 __pEmptyImageLabel->SetShowState(true);
477 __pEmptyCommentLabel->SetShowState(true);
482 if (previousSceneId.Equals(IDSCN_CONTACT_SELECTOR, true))
484 SendUserEvent(REQ_ID_MOVE_TO_GROUP_LIST, null);
488 __pPresentationModel->AddContactChangeListener(*this);
489 pContactsApp->AddContactsAppChangeEventListener(*this);
493 GroupContactListForm::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId)
495 ContactsApp* pContactsApp = static_cast<ContactsApp*>(ContactsApp::GetInstance());
497 __pPresentationModel->RemoveContactChangeListener(*this);
498 pContactsApp->RemoveContactsAppChangeEventListener(*this);
500 delete __pAppControl;
501 __pAppControl = null;
505 GroupContactListForm::OnUserEventReceivedN (RequestId requestId, Tizen::Base::Collection::IList* pArgs)
507 if (requestId == REQ_ID_MOVE_TO_GROUP_LIST)
509 SceneManager::GetInstance()->GoBackward(BackwardSceneTransition(IDSCN_GROUP_LIST));
514 GroupContactListForm::GetGroupCount(void)
516 return __pPresentationModel->GetKeyCount();
520 GroupContactListForm::GetItemCount(int groupIndex)
522 return __pPresentationModel->GetContactCount(groupIndex);
525 Tizen::Ui::Controls::ListItemBase*
526 GroupContactListForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
529 Bitmap* pThumbnail = null;
531 ContactsApp* pContactsApp = static_cast<ContactsApp*>(ContactsApp::GetInstance());
532 CustomItem* pItem = new (std::nothrow) CustomItem();
533 pItem->Construct(Dimension(itemWidth, pContactsApp->GetListItemSingleLineHeight()), LIST_ANNEX_STYLE_NORMAL);
535 __pPresentationModel->GetContactItemInfoN(groupIndex, itemIndex, name, pThumbnail);
537 ContactListItem* pCustomElement = new (std::nothrow) ContactListItem(name, pThumbnail);
538 pItem->AddElement(Rectangle(0, 0, itemWidth, pContactsApp->GetListItemSingleLineHeight()), 0, *(static_cast<ICustomElement*>(pCustomElement)));
540 if (pContactsApp->GetOperationId().IsEmpty() == false)
545 bool isCallEnabled = true;
546 bool isMessageEnabled = true;
547 if (__pPresentationModel->GetDefaultPhoneNumber(groupIndex, itemIndex).IsEmpty())
549 isCallEnabled = false;
552 if ((__pPresentationModel->GetDefaultPhoneNumber(groupIndex, itemIndex).IsEmpty()) && (__pPresentationModel->GetDefaultEmail(groupIndex, itemIndex).IsEmpty()))
554 isMessageEnabled = false;
557 ListContextItem* pItemContext = new (std::nothrow) ListContextItem();
558 pItemContext->Construct();
559 pItemContext->AddElement(IDA_LIST_ELEMENT_CALL, ResourceManager::GetString(L"IDS_COM_BODY_CALL"), isCallEnabled);
560 pItemContext->AddElement(IDA_LIST_ELEMENT_MESSAGE, ResourceManager::GetString(L"IDS_COM_BODY_MESSAGE"), isMessageEnabled);
561 #if __SUPPORT_VIDEO_CALL
562 pItemContext->AddElement(IDA_LIST_ELEMENT_VIDEO_CALL, ResourceManager::GetString(L"IDS_COM_BODY_VIDEO_CALL"), isEnabled);
564 if (__categoryId != ID_GROUP_CONTACT_NOT_ASSIGNED)
566 pItemContext->AddElement(IDA_LIST_ELEMENT_DELETE, ResourceManager::GetString(L"IDS_COM_SK_DELETE"));
568 pItemContext->SetElementBackgroundColor(IDA_LIST_ELEMENT_DELETE, LIST_CONTEXT_ITEM_ELEMENT_STATUS_NORMAL, COLOR_DELETE_ELEMENT_NORMAL);
569 pItemContext->SetElementBackgroundColor(IDA_LIST_ELEMENT_DELETE, LIST_CONTEXT_ITEM_ELEMENT_STATUS_PRESSED, COLOR_DELETE_ELEMENT_PRESSED);
570 pItemContext->SetElementTextColor(IDA_LIST_ELEMENT_DELETE, LIST_CONTEXT_ITEM_ELEMENT_STATUS_NORMAL, COLOR_DELETE_ELEMENT_TEXT);
572 pItem->SetContextItem(pItemContext);
577 Tizen::Ui::Controls::GroupItem*
578 GroupContactListForm::CreateGroupItem(int groupIndex, int itemWidth)
580 GroupItem* pItem = new (std::nothrow) GroupItem();
581 pItem->Construct(Dimension(itemWidth, H_GROUP_ITEM));
582 pItem->SetElement(__pPresentationModel->GetKey(groupIndex), null);
588 GroupContactListForm::DeleteItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth)
590 CustomItem* pCustomItem = static_cast<CustomItem *>(pItem);
591 pCustomItem->RemoveAllElements();
600 GroupContactListForm::DeleteGroupItem(int groupIndex, Tizen::Ui::Controls::GroupItem* pItem, int itemWidth)
609 GroupContactListForm::OnGroupedListViewContextItemStateChanged(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, int elementId, Tizen::Ui::Controls::ListContextItemStatus state)
613 if (listView.Equals(*__pSearchListView) == true)
615 __pPresentationModel->GetItemMainIndex(itemIndex, groupIndex, itemIndex);
618 index |= groupIndex << LIST_VIEW_GROUP_INDEX_SHIFT;
621 __sweptItemIndex = index;
625 case IDA_LIST_ELEMENT_DELETE:
630 case IDA_LIST_ELEMENT_CALL:
632 String phoneNumber = __pPresentationModel->GetDefaultPhoneNumber(groupIndex, itemIndex);
633 LaunchAppControl(PROVIDER_ID_PHONE, OPERATION_ID_CALL, phoneNumber, INPUT_TYPE_VOICE);
636 case IDA_LIST_ELEMENT_MESSAGE:
638 if (!(__pPresentationModel->GetDefaultPhoneNumber(groupIndex, itemIndex).IsEmpty()))
640 String phoneNumber = __pPresentationModel->GetDefaultPhoneNumber(groupIndex, itemIndex);
641 LaunchAppControl(PROVIDER_ID_MESSAGE, OPERATION_ID_COMPOSE, phoneNumber, INPUT_TYPE_SMS);
643 else if (!(__pPresentationModel->GetDefaultEmail(groupIndex, itemIndex).IsEmpty()))
645 String emailId = __pPresentationModel->GetDefaultEmail(groupIndex, itemIndex);
646 LaunchAppControl(PROVIDER_ID_MESSAGE, OPERATION_ID_COMPOSE, emailId, null);
650 case IDA_LIST_ELEMENT_VIDEO_CALL:
652 String phoneNumber = __pPresentationModel->GetDefaultPhoneNumber(groupIndex, itemIndex);
653 LaunchAppControl(PROVIDER_ID_PHONE, OPERATION_ID_CALL, phoneNumber, INPUT_TYPE_VIDEO);
662 GroupContactListForm::OnGroupedListViewItemStateChanged(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, int elementId, Tizen::Ui::Controls::ListItemStatus state)
664 ContactsApp* pContactsApp = static_cast<ContactsApp*>(ContactsApp::GetInstance());
666 if (listView.Equals(*__pSearchListView) == true)
668 __pPresentationModel->GetItemMainIndex(itemIndex, groupIndex, itemIndex);
673 index |= groupIndex << LIST_VIEW_GROUP_INDEX_SHIFT;
676 __selectedIndex = index;
678 if (pContactsApp->GetOperationId() == OPERATION_ID_PICK)
681 HashMap* pReturnValue = new (std::nothrow) HashMap();
682 pReturnValue->Construct();
684 if (pContactsApp->GetReturnType() == APP_CONTROL_RETURN_TYPE_PHONE)
686 pList = __pPresentationModel->GetAllPhoneNumbersN(groupIndex, itemIndex);
690 ReturnValues(pContactsApp->GetRequestId(), APP_CTRL_RESULT_FAILED, pReturnValue);
694 if (pList->GetCount() > 1)
696 __pContactValueListEvent = new (std::nothrow) ContactValueListItemProvider(pList);
697 ShowContactValuePopup(groupIndex, itemIndex);
699 else if (pList->GetCount() == 1)
701 String* pPhoneNumberInfo = static_cast<String *>(pList->GetAt(0));
703 ArrayList* pValueList = new (std::nothrow) ArrayList();
704 pValueList->Construct();
706 pPhoneNumberInfo->IndexOf(CHARACTER_SPACE, 0, blankIndex);
707 pPhoneNumberInfo->Remove(0, blankIndex + 1);
708 pValueList->Add(new (std::nothrow) String(*pPhoneNumberInfo));
709 pReturnValue->Add(new (std::nothrow) String(CONTACT_KEY_PHONE), pValueList);
711 ReturnValues(pContactsApp->GetRequestId(), APP_CTRL_RESULT_SUCCEEDED, pReturnValue);
716 else if (pContactsApp->GetReturnType() == APP_CONTROL_RETURN_TYPE_EMAIL)
718 pList = __pPresentationModel->GetAllEmailsN(groupIndex, itemIndex);
722 ReturnValues(pContactsApp->GetRequestId(), APP_CTRL_RESULT_FAILED, pReturnValue);
726 if (pList->GetCount() > 1)
728 __pContactValueListEvent = new (std::nothrow) ContactValueListItemProvider(pList);
729 ShowContactValuePopup(groupIndex, itemIndex);
731 else if (pList->GetCount() == 1)
733 String* pEmailInfo = static_cast<String *>(pList->GetAt(0));
735 ArrayList* pValueList = new (std::nothrow) ArrayList();
736 pValueList->Construct();
738 pEmailInfo->IndexOf(CHARACTER_SPACE, 0, blankIndex);
739 pEmailInfo->Remove(0, blankIndex + 1);
740 pValueList->Add(new (std::nothrow) String(*pEmailInfo));
741 pReturnValue->Add(new (std::nothrow) String(CONTACT_KEY_EMAIL), pValueList);
743 ReturnValues(pContactsApp->GetRequestId(), APP_CTRL_RESULT_SUCCEEDED, pReturnValue);
748 else if (pContactsApp->GetReturnType() == APP_CONTROL_RETURN_TYPE_ITEM_ID)
750 AppCtrlResult appCtrlResult = APP_CTRL_RESULT_SUCCEEDED;
751 RecordId contactId = __pPresentationModel->GetContactId(groupIndex, itemIndex);
752 if (contactId == INVALID_RECORD_ID)
754 appCtrlResult = APP_CTRL_RESULT_FAILED;
758 String contactIdString;
759 ArrayList* pValueList = new (std::nothrow) ArrayList();
760 pValueList->Construct();
762 contactIdString.Append(contactId);
763 pValueList->Add(new (std::nothrow) String(contactIdString));
764 pReturnValue->Add(new (std::nothrow) String(CONTACT_KEY_ITEM_ID), pValueList);
767 ReturnValues(pContactsApp->GetRequestId(), appCtrlResult, pReturnValue);
769 else if (pContactsApp->GetReturnType() == APP_CONTROL_RETURN_TYPE_VCARD)
771 AppCtrlResult appCtrlResult = APP_CTRL_RESULT_SUCCEEDED;
772 String vCardPath = __pPresentationModel->ExportToVcard(groupIndex, itemIndex);
774 if (vCardPath.IsEmpty())
776 appCtrlResult = APP_CTRL_RESULT_FAILED;
780 pReturnValue->Add(new (std::nothrow) String(CONTACT_KEY_PATH), new (std::nothrow) String(vCardPath));
783 ReturnValues(pContactsApp->GetRequestId(), appCtrlResult, pReturnValue);
790 ArrayList* pContactId = new (std::nothrow) ArrayList();
791 pContactId->Construct();
793 pContactId->Add(*(new (std::nothrow) Integer(__pPresentationModel->GetContactId(groupIndex, itemIndex))));
794 SceneManager* pSceneManager = SceneManager::GetInstance();
796 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_CONTACT_DETAILS, SCENE_TRANSITION_ANIMATION_TYPE_LEFT), pContactId);
801 GroupContactListForm::OnGroupedListViewItemSwept(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, Tizen::Ui::Controls::SweepDirection direction)
806 GroupContactListForm::OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListContextItemStatus state)
811 GroupContactListForm::OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListItemStatus status)
813 ContactsApp* pContactsApp = static_cast<ContactsApp*>(ContactsApp::GetInstance());
817 HashMap* pReturnValue = new (std::nothrow) HashMap();
818 pReturnValue->Construct();
820 int groupIndex = (__selectedIndex >> LIST_VIEW_GROUP_INDEX_SHIFT) & LIST_VIEW_MASK;
821 int itemIndex = __selectedIndex & LIST_VIEW_MASK;
823 if (pContactsApp->GetReturnType() == APP_CONTROL_RETURN_TYPE_PHONE)
825 pList = __pPresentationModel->GetAllPhoneNumbersN(groupIndex, itemIndex);
826 String* pPhoneNumberInfo = static_cast<String *>(pList->GetAt(index));
828 ArrayList* pValueList = new (std::nothrow) ArrayList();
829 pValueList->Construct();
831 pPhoneNumberInfo->IndexOf(CHARACTER_SPACE, 0, blankIndex);
832 pPhoneNumberInfo->Remove(0, blankIndex + 1);
833 pValueList->Add(new (std::nothrow) String(*pPhoneNumberInfo));
834 pReturnValue->Add(new (std::nothrow) String(CONTACT_KEY_PHONE), pValueList);
836 else if (pContactsApp->GetReturnType() == APP_CONTROL_RETURN_TYPE_EMAIL)
838 pList = __pPresentationModel->GetAllEmailsN(groupIndex, itemIndex);
839 String* pEmailInfo = static_cast<String *>(pList->GetAt(index));
841 ArrayList* pValueList = new (std::nothrow) ArrayList();
842 pValueList->Construct();
844 pEmailInfo->IndexOf(CHARACTER_SPACE, 0, blankIndex);
845 pEmailInfo->Remove(0, blankIndex + 1);
846 pValueList->Add(new (std::nothrow) String(*pEmailInfo));
847 pReturnValue->Add(new (std::nothrow) String(CONTACT_KEY_EMAIL), pValueList);
852 ReturnValues(pContactsApp->GetRequestId(), APP_CTRL_RESULT_SUCCEEDED, pReturnValue);
856 GroupContactListForm::OnListViewItemSwept(Tizen::Ui::Controls::ListView& listView, int index, Tizen::Ui::Controls::SweepDirection direction)
861 GroupContactListForm::OnSearchBarModeChanged(Tizen::Ui::Controls::SearchBar& source, SearchBarMode mode)
863 if (mode == SEARCH_BAR_MODE_NORMAL)
865 __pListView->SetShowState(true);
866 __pSearchListView->SetShowState(false);
867 __pPresentationModel->ResetSearchedContactList();
868 __pSearchListView->UpdateList();
869 __pListView->UpdateList();
873 //[TODO] to restore swept item.
874 // need to be fixed with better idea..
875 Rectangle bounds = __pListView->GetBounds();
876 __pListView->SetBounds(bounds.x, bounds.y, bounds.width, bounds.height + 1);
877 __pListView->Invalidate(true);
878 __pListView->SetBounds(bounds);
883 GroupContactListForm::OnTextValueChanged(const Tizen::Ui::Control& source)
885 String searchText = __pSearchBar->GetText();
888 ContactsApp* pContactsApp = static_cast<ContactsApp*>(ContactsApp::GetInstance());
889 if (pContactsApp->GetReturnType() == APP_CONTROL_RETURN_TYPE_PHONE)
891 __pPresentationModel->SetSearchText(searchText, SEARCH_TYPE_HAS_PHONE_ONLY);
893 else if (pContactsApp->GetReturnType() == APP_CONTROL_RETURN_TYPE_EMAIL)
895 __pPresentationModel->SetSearchText(searchText, SEARCH_TYPE_HAS_EMAIL_ONLY);
899 __pPresentationModel->SetSearchText(searchText, SEARCH_TYPE_NORMAL);
902 if (searchText.GetLength() != 0)
904 __pSearchListView->SetShowState(true);
905 __pListView->SetShowState(false);
909 __pSearchListView->SetShowState(false);
910 __pListView->SetShowState(true);
913 __pSearchListView->UpdateList();
917 GroupContactListForm::OnFastScrollIndexSelected (Tizen::Ui::Control& source, Tizen::Base::String& index)
919 __pListView->ScrollToItem(__pPresentationModel->GetKeyIndex(index), -1);
920 __pListView->Invalidate(false);
924 GroupContactListForm::OnFocusGained(const Tizen::Ui::Control& source)
926 if (source.Equals(*__pSearchBar))
928 if (__pListView->GetShowState() == true )
930 int groupCount = __pPresentationModel->GetKeyCount();
931 bool isContextItemOpenend = false;
933 for (int i = 0; i < groupCount; i++)
935 int contactCount = __pPresentationModel->GetContactCount(i);
936 for (int j = 0; j < contactCount; j++)
938 if (__pListView->IsContextItemOpened(i, j) == true)
940 isContextItemOpenend = true;
946 if (isContextItemOpenend == true)
948 __pListView->UpdateList();
951 else if (__pSearchListView->GetShowState() == true )
954 bool isContextItemOpenend = false;
956 if (__pSearchListEvent == null)
960 groupCount = __pSearchListEvent->GetGroupCount();
961 for (int i = 0; i < groupCount; i++)
963 int contactCount = __pSearchListEvent->GetItemCount(i);
964 for (int j = 0; j < contactCount; j++)
966 if (__pSearchListView->IsContextItemOpened(i, j) == true)
968 isContextItemOpenend = true;
974 if (isContextItemOpenend == true)
976 __pSearchListView->UpdateList();
983 GroupContactListForm::OnFocusLost(const Tizen::Ui::Control& source)
988 GroupContactListForm::OnTextValueChangeCanceled(const Tizen::Ui::Control& source)
993 GroupContactListForm::OnContactsChanged(void)
995 HideContactValuePopup();
998 if (__isCategoryUpdating)
1000 __isCategoryUpdating = false;
1005 if (__categoryId == ID_GROUP_CONTACT_NOT_ASSIGNED)
1007 __pPresentationModel->InitializeGroupContactList(Tizen::Social::INVALID_RECORD_ID);
1011 __pPresentationModel->InitializeGroupContactList(__categoryId);
1014 if (__pSearchBar->GetMode() == SEARCH_BAR_MODE_INPUT)
1016 __pSearchBar->SetMode(SEARCH_BAR_MODE_NORMAL);
1020 if (__categoryId != ID_GROUP_CONTACT_NOT_ASSIGNED)
1022 Footer* pFooter = GetFooter();
1024 if (__pPresentationModel->GetAllContactsCount() <= __pPresentationModel->GetContactCount())
1026 pFooter->SetItemEnabled(0, false);
1027 pFooter->Invalidate(true);
1031 pFooter->SetItemEnabled(0, true);
1032 pFooter->Invalidate(true);
1035 if (__pPresentationModel->GetContactCount() > 0)
1037 SetFormMenuEventListener(this);
1041 SetFormMenuEventListener(null);
1045 if (__pPresentationModel->GetContactCount() > 0)
1047 __pSearchBar->SetShowState(true);
1048 __pListView->SetShowState(true);
1049 __pEmptyImageLabel->SetShowState(false);
1050 __pEmptyCommentLabel->SetShowState(false);
1052 __pPresentationModel->InitializeContactList();
1053 __pListView->SetFastScrollIndex(__pPresentationModel->GetAllKeys(), false);
1054 __pListView->UpdateList();
1058 __pSearchBar->SetShowState(false);
1059 __pListView->SetShowState(false);
1060 __pEmptyImageLabel->SetShowState(true);
1061 __pEmptyCommentLabel->SetShowState(true);
1066 GroupContactListForm::OnCategoriesChanged(void)
1068 if (__pPresentationModel->IsCategoryValid() == false)
1070 SceneManager::GetInstance()->GoBackward(BackwardSceneTransition(IDSCN_GROUP_LIST));
1075 GroupContactListForm::ShowDeletePopup(void)
1077 if (__pDeletePopup == null)
1079 __pDeletePopup = new (std::nothrow) Popup();
1080 __pDeletePopup->Construct(false, Dimension(W_DELETE_POPUP, H_DELETE_POPUP));
1081 __pDeletePopup->SetPropagatedKeyEventListener(this);
1083 Rectangle popupClientBounds = __pDeletePopup->GetClientAreaBounds();
1085 Label* pLabel = new (std::nothrow) Label();
1086 pLabel->Construct(Rectangle(X_DELETE_LABEL, Y_DELETE_LABEL, W_DELETE_LABEL, H_DELETE_LABEL), ResourceManager::GetString(L"IDS_COM_POP_DELETE_Q"));
1087 pLabel->SetTextConfig(FONT_SIZE_DELETE_CONFIRM, LABEL_TEXT_STYLE_NORMAL);
1088 pLabel->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
1089 pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
1091 Button* pDeleteButton = new (std::nothrow) Button();
1092 pDeleteButton->Construct(Rectangle(X_DELETE_LABEL + W_DELETE_BUTTON + W_DELETE_BUTTON_GAP, Y_DELETE_BUTTON, W_DELETE_BUTTON, H_DELETE_BUTTON), ResourceManager::GetString(L"IDS_COM_SK_DELETE"));
1093 pDeleteButton->SetColor(BUTTON_STATUS_NORMAL, COLOR_DELETE_BUTTON_NORMAL);
1094 pDeleteButton->SetColor(BUTTON_STATUS_PRESSED, COLOR_DELETE_BUTTON_PRESSED);
1095 pDeleteButton->SetTextColor(COLOR_DELETE_BUTTON_TEXT);
1096 pDeleteButton->SetTextSize(FONT_SIZE_DELETE_BUTTON);
1097 pDeleteButton->SetActionId(IDA_POPUP_DELETE_YES);
1098 pDeleteButton->AddActionEventListener(*this);
1100 Button* pCancelButton = new (std::nothrow) Button();
1101 pCancelButton->Construct(Rectangle(X_DELETE_LABEL, Y_DELETE_BUTTON, W_DELETE_BUTTON, H_DELETE_BUTTON), ResourceManager::GetString(L"IDS_PB_SK_CANCEL"));
1102 pCancelButton->SetTextSize(FONT_SIZE_DELETE_BUTTON);
1103 pCancelButton->SetActionId(IDA_POPUP_DELETE_CANCEL);
1104 pCancelButton->AddActionEventListener(*this);
1106 __pDeletePopup->AddControl(pLabel);
1107 __pDeletePopup->AddControl(pDeleteButton);
1108 __pDeletePopup->AddControl(pCancelButton);
1111 __pDeletePopup->SetShowState(true);
1112 __pDeletePopup->Show();
1116 GroupContactListForm::HideDeletePopup(void)
1118 if (__pDeletePopup != null)
1120 __pDeletePopup->SetShowState(false);
1124 delete __pContactValueListEvent;
1125 __pContactValueListEvent = null;
1129 GroupContactListForm::ShowContactValuePopup(int groupIndex, int itemIndex)
1131 delete __pMultipleContactValuePopup;
1132 __pMultipleContactValuePopup = new (std::nothrow) Popup();
1133 __pMultipleContactValuePopup->Construct(true, Dimension(W_CONTACT_VALUE_POPUP, H_CONTACT_VALUE_POPUP));
1134 __pMultipleContactValuePopup->SetTitleText(__pPresentationModel->GetName(groupIndex, itemIndex));
1135 __pMultipleContactValuePopup->SetPropagatedKeyEventListener(this);
1137 Rectangle popupClientBounds = __pMultipleContactValuePopup->GetClientAreaBounds();
1139 ListView* pListView = new (std::nothrow) ListView();
1140 pListView->Construct(Rectangle(0, 0, popupClientBounds.width, H_CONTACT_VALUE_POPUP_LIST_VIEW));
1141 pListView->SetItemProvider(*__pContactValueListEvent);
1142 pListView->AddListViewItemEventListener(*this);
1144 __pMultipleContactValuePopup->AddControl(pListView);
1146 Button* pCancelButton = new (std::nothrow) Button();
1147 pCancelButton->Construct(Rectangle((popupClientBounds.width - W_CLOSE_BUTTON) / 2, Y_CLOSE_BUTTON, W_CLOSE_BUTTON, H_CLOSE_BUTTON), ResourceManager::GetString(L"IDS_COM_POP_CLOSE"));
1148 pCancelButton->SetActionId(IDA_POPUP_CONTACT_VALUE_CLOSE);
1149 pCancelButton->AddActionEventListener(*this);
1151 __pMultipleContactValuePopup->AddControl(pCancelButton);
1152 __pMultipleContactValuePopup->SetShowState(true);
1153 __pMultipleContactValuePopup->Show();
1157 GroupContactListForm::HideContactValuePopup(void)
1159 if (__pMultipleContactValuePopup != null)
1161 __pMultipleContactValuePopup->SetShowState(false);
1167 GroupContactListForm::ParseAppControlArgument(const Tizen::Base::String& argument, Tizen::Base::String& type, Tizen::Base::String& content)
1169 result r = E_SUCCESS;
1171 if (argument.IsEmpty() || argument.Contains(DELIMITER) == false)
1176 StringTokenizer stringToken(argument, DELIMITER);
1178 r = stringToken.GetNextToken(type);
1179 TryReturn(r == E_SUCCESS, r, "[%s] Unable to get type", GetErrorMessage(r));
1181 r = stringToken.GetNextToken(content);
1182 TryReturn(r == E_SUCCESS, r, "[%s] Unable to get content", GetErrorMessage(r));
1188 GroupContactListForm::ReturnValues(RequestId requestId, Tizen::App::AppCtrlResult appCtrlResult, const Tizen::Base::Collection::IMap* pReturnValue)
1190 AppControlProviderManager* pAppManager = AppControlProviderManager::GetInstance();
1192 result r = pAppManager->SendAppControlResult(requestId, appCtrlResult, pReturnValue);
1193 AppLogDebug("[%s] The return result from SendAppControlResult(), AppCtrlResult value : %d.", GetErrorMessage(r), appCtrlResult);
1195 UiApp::GetInstance()->Terminate();
1199 GroupContactListForm::LaunchAppControl(const Tizen::App::AppId& appId, const Tizen::Base::String& operationId, const Tizen::Base::String& argument, const Tizen::Base::String& type)
1201 result r = E_SUCCESS;
1203 if (__pAppControl != null)
1210 extraData.Construct();
1212 if (appId.Equals(String(PROVIDER_ID_PHONE)))
1214 uri.Append(INPUT_URI_TEL);
1215 uri.Append(argument);
1216 extraData.Add(new (std::nothrow) String(INPUT_KEY_CALL_TYPE), new (std::nothrow) String(type));
1218 else if (appId.Equals(String(PROVIDER_ID_MESSAGE)))
1220 extraData.Add(new (std::nothrow) String(INPUT_KEY_MESSAGE_TO), new (std::nothrow) String(argument));
1221 extraData.Add(new (std::nothrow) String(INPUT_KEY_MESSAGE_TYPE), new (std::nothrow) String(INPUT_TYPE_SMS));
1224 __pAppControl = AppManager::FindAppControlN(appId, operationId);
1225 if (__pAppControl != null)
1227 r = __pAppControl->Start(&uri, null, &extraData, null);
1230 AppLogDebug("[%s] Unable to launch app control", GetErrorMessage(r));
1234 if (__pListView->GetShowState() == true)
1236 __pListView->SetEnabled(false);
1239 if (__pSearchListView->GetShowState() == true)
1241 __pSearchListView->SetEnabled(false);
1246 extraData.RemoveAll(true);
1252 GroupContactListForm::OnKeypadWillOpen(Tizen::Ui::Control& source)
1257 GroupContactListForm::OnKeypadOpened(Tizen::Ui::Control& source)
1259 __pSearchListView->SetSize(__pListView->GetWidth(), GetClientAreaBounds().height - __pSearchBar->GetHeight());
1263 GroupContactListForm::OnKeypadClosed(Tizen::Ui::Control& source)
1265 if (__categoryId == ID_GROUP_CONTACT_NOT_ASSIGNED)
1267 __pPresentationModel->InitializeGroupContactList(Tizen::Social::INVALID_RECORD_ID);
1268 GetFooter()->SetShowState(false);
1272 ContactsApp* pContactsApp = static_cast<ContactsApp*>(ContactsApp::GetInstance());
1273 __pPresentationModel->InitializeGroupContactList(__categoryId);
1274 if (pContactsApp->GetOperationId() != OPERATION_ID_PICK)
1276 GetFooter()->SetShowState(true);
1279 __pListView->SetSize(__pListView->GetWidth(), GetClientAreaBounds().height - __pSearchBar->GetHeight());
1280 __pSearchListView->SetSize(__pListView->GetWidth(), GetClientAreaBounds().height - __pSearchBar->GetHeight());
1285 GroupContactListForm::OnKeypadBoundsChanged(Tizen::Ui::Control& source)
1287 __pSearchListView->SetSize(__pListView->GetWidth(), GetClientAreaBounds().height - __pSearchBar->GetHeight());
1291 GroupContactListForm::OnKeypadActionPerformed(Tizen::Ui::Control& source, Tizen::Ui::KeypadAction keypadAction)
1293 if (keypadAction == KEYPAD_ACTION_SEARCH)
1295 __pSearchBar->HideKeypad();
1300 GroupContactListForm::OnForeground(void)
1302 delete __pAppControl;
1303 __pAppControl = null;
1305 if (__pListView->IsEnabled() == false)
1307 __pListView->SetEnabled(true);
1310 if (__pSearchListView->IsEnabled() == false)
1312 __pSearchListView->SetEnabled(true);
1317 GroupContactListForm::OnBackground(void)
1322 GroupContactListForm::OnTouchPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo & touchInfo)
1324 GroupedListView* pList = static_cast<GroupedListView*>(&const_cast<Control&>(source));
1332 GroupContactListForm::OnTouchReleased(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
1337 GroupContactListForm::OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
1342 GroupContactListForm::OnTouchFocusIn(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
1347 GroupContactListForm::OnTouchFocusOut(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
1352 GroupContactListForm::OnKeyPressed(Control& source, const KeyEventInfo& keyEventInfo)
1358 GroupContactListForm::OnKeyReleased(Control& source, const KeyEventInfo& keyEventInfo)
1360 if (keyEventInfo.GetKeyCode() == KEY_BACK || keyEventInfo.GetKeyCode() == KEY_ESC)
1362 if (__pMultipleContactValuePopup && __pMultipleContactValuePopup->GetShowState() == true)
1364 HideContactValuePopup();
1367 else if (__pDeletePopup && __pDeletePopup->GetShowState() == true)
1377 GroupContactListForm::OnPreviewKeyPressed(Control& source, const KeyEventInfo& keyEventInfo)
1383 GroupContactListForm::OnPreviewKeyReleased(Control& source, const KeyEventInfo& keyEventInfo)