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 unsigned int COLOR_EMPTY_COMMENT = Color32<102, 102, 102>::Value;
74 static const unsigned int COLOR_DELETE_BUTTON_NORMAL = Color32<213, 82, 82>::Value;
75 static const unsigned int COLOR_DELETE_BUTTON_PRESSED = Color32<194, 71, 71>::Value;
76 static const unsigned int COLOR_DELETE_BUTTON_TEXT = Color32<248, 246, 239>::Value;
77 static const unsigned int COLOR_DELETE_ELEMENT_NORMAL = Color32<208, 82, 82>::Value;
78 static const unsigned int COLOR_DELETE_ELEMENT_PRESSED = Color32<194, 71, 71>::Value;
79 static const unsigned int COLOR_DELETE_ELEMENT_TEXT = Color32<248, 246, 239>::Value;
81 static const int LIST_VIEW_GROUP_INDEX_SHIFT = 16;
82 static const int LIST_VIEW_MASK = 0xFFFF;
84 static const wchar_t* INPUT_KEY_CALL_TYPE = L"http://tizen.org/appcontrol/data/call/type";
85 static const wchar_t* INPUT_KEY_MESSAGE_TYPE = L"http://tizen.org/appcontrol/data/message/type";
86 static const wchar_t* INPUT_KEY_MESSAGE_TO = L"http://tizen.org/appcontrol/data/to";
87 static const wchar_t* INPUT_TYPE_VIDEO = L"video";
88 static const wchar_t* INPUT_TYPE_VOICE = L"voice";
89 static const wchar_t* INPUT_TYPE_SMS = L"sms";
90 static const wchar_t* INPUT_URI_TEL = L"tel:";
92 GroupContactListForm::GroupContactListForm(void)
95 , __pSearchListView(null)
97 , __pDeletePopup(null)
98 , __pMultipleContactValuePopup(null)
99 , __pEmptyImageLabel(null)
100 , __pEmptyCommentLabel(null)
101 , __pOptionMenu(null)
103 , __pContactValueListEvent(null)
104 , __pPresentationModel(null)
105 , __pSearchListEvent(null)
106 , __isCategoryUpdating(false)
107 , __sweptItemIndex(-1)
108 , __selectedIndex(-1)
112 GroupContactListForm::~GroupContactListForm(void)
117 GroupContactListForm::Initialize(void)
119 Construct(FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR | FORM_STYLE_HEADER | FORM_STYLE_FOOTER);
123 GroupContactListForm::OnInitializing(void)
125 Footer* pFooter = GetFooter();
126 pFooter->AddActionEventListener(*this);
128 SetFormBackEventListener(this);
129 SetFormMenuEventListener(this);
131 __pPresentationModel = GroupContactListPresentationModel::GetInstance();
133 __pListView = new (std::nothrow) GroupedListView();
134 __pListView->Construct(Rectangle(0, H_SEARCHBAR, GetClientAreaBounds().width, GetClientAreaBounds().height - H_SEARCHBAR), GROUPED_LIST_VIEW_STYLE_INDEXED, true, true);
135 __pListView->SetItemProvider(*this);
136 __pListView->AddFastScrollListener(*this);
137 __pListView->AddGroupedListViewItemEventListener(*this);
138 __pListView->AddTouchEventListener(*this);
139 AddControl(__pListView);
141 __pSearchBar = new (std::nothrow) SearchBar();
142 __pSearchBar->Construct(Rectangle(0, 0, GetClientAreaBounds().width, H_SEARCHBAR));
143 __pSearchBar->SetGuideText(ResourceManager::GetString(L"IDS_COM_BODY_SEARCH"));
144 __pSearchBar->AddSearchBarEventListener(*this);
145 __pSearchBar->AddFocusEventListener(*this);
146 __pSearchBar->AddTextEventListener(*this);
147 __pSearchBar->AddKeypadEventListener(*this);
148 __pSearchBar->SetContentAreaSize(Dimension(0, 0));
150 __pSearchListEvent = new (std::nothrow) SearchListEventListener(LIST_ANNEX_STYLE_NORMAL, __pPresentationModel);
151 AddControl(__pSearchBar);
153 __pSearchListView = new (std::nothrow) GroupedListView();
154 __pSearchListView->Construct(Rectangle(0, H_SEARCHBAR, GetClientAreaBounds().width, GetClientAreaBounds().height - H_SEARCHBAR), GROUPED_LIST_VIEW_STYLE_INDEXED, true, false);
155 __pSearchListView->SetItemProvider(*__pSearchListEvent);
156 __pSearchListView->AddGroupedListViewItemEventListener(*this);
157 __pSearchListView->AddTouchEventListener(*this);
158 __pSearchListView->SetTextOfEmptyList(ResourceManager::GetString(L"IDS_PB_BODY_NO_CONTACTS"));
159 __pSearchListView->SetShowState(false);
160 __pListView->AddTouchEventListener(*this);
161 AddControl(__pSearchListView);
163 __pEmptyImageLabel = new (std::nothrow) Label();
164 __pEmptyImageLabel->Construct(Rectangle(X_EMPTY_IMAGE, Y_EMPTY_IMAGE, W_EMPTY_IMAGE, H_EMPTY_IMAGE), L"");
165 Bitmap* pBitmap = ResourceManager::GetBitmapN(IDB_NO_CONTENTS);
168 __pEmptyImageLabel->SetBackgroundBitmap(*pBitmap);
171 __pEmptyImageLabel->SetShowState(false);
173 AddControl(__pEmptyImageLabel);
175 __pEmptyCommentLabel = new (std::nothrow) Label();
176 __pEmptyCommentLabel->Construct(Rectangle(0, Y_EMPTY_COMMENT, GetClientAreaBounds().width, H_EMPTY_COMMENT),
177 ResourceManager::GetString(L"IDS_PB_BODY_NO_CONTACTS"));
178 __pEmptyCommentLabel->SetTextConfig(FONT_SIZE_EMPTY_COMMENT, LABEL_TEXT_STYLE_NORMAL);
179 __pEmptyCommentLabel->SetTextColor(Color(COLOR_EMPTY_COMMENT));
180 __pEmptyCommentLabel->SetShowState(false);
182 AddControl(__pEmptyCommentLabel);
184 __pOptionMenu = new (std::nothrow) OptionMenu();
185 __pOptionMenu->Construct();
186 __pOptionMenu->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_REMOVE"), IDA_MORE_REMOVE);
187 __pOptionMenu->AddActionEventListener(*this);
188 __pOptionMenu->SetShowState(false);
194 GroupContactListForm::OnTerminating(void)
196 result r = E_SUCCESS;
198 if (__pPresentationModel != null)
200 __pPresentationModel->RemoveContactChangeListener(*this);
202 if (__pDeletePopup != null)
204 delete __pDeletePopup;
206 if (__pSearchListEvent != null)
208 delete __pSearchListEvent;
210 delete __pAppControl;
211 delete __pOptionMenu;
212 delete __pMultipleContactValuePopup;
218 GroupContactListForm::OnFormMenuRequested(Tizen::Ui::Controls::Form& source)
220 if (__pListView->GetShowState() == true)
222 __pListView->SetFocus();
224 else if (__pSearchListView->GetShowState() == true)
226 __pSearchListView->SetFocus();
229 if(__pPresentationModel->GetContactCount() > 0)
231 __pOptionMenu->SetShowState(true);
232 __pOptionMenu->Show();
237 GroupContactListForm::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
239 SceneManager* pSceneManager = SceneManager::GetInstance();
240 pSceneManager->GoBackward(BackwardSceneTransition(IDSCN_GROUP_LIST, SCENE_TRANSITION_ANIMATION_TYPE_RIGHT));
244 GroupContactListForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
246 SceneManager* pSceneManager = SceneManager::GetInstance();
248 if (__pSearchBar->GetMode() == SEARCH_BAR_MODE_INPUT)
250 __pSearchBar->SetMode(SEARCH_BAR_MODE_NORMAL);
255 case IDA_FOOTER_ADD_MEMBER:
257 ArrayList* pArgList = new (std::nothrow) ArrayList();
258 pArgList->Construct();
260 for (int groupIndex = 0; groupIndex < __pListView->GetGroupCount(); groupIndex++)
262 for (int itemIndex = 0; itemIndex < __pListView->GetItemCountAt(groupIndex); itemIndex++)
264 pArgList->Add(*(new (std::nothrow) Integer(__pPresentationModel->GetContactId(groupIndex, itemIndex))));
267 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_CONTACT_SELECTOR, SCENE_TRANSITION_ANIMATION_TYPE_LEFT), pArgList);
270 case IDA_MORE_REMOVE:
272 ArrayList* pArgList = new (std::nothrow) ArrayList();
273 pArgList->Construct();
274 pArgList->Add(*(new (std::nothrow) Integer(__categoryId)));
275 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_GROUP_CONTACT_LIST_EDITOR), pArgList);
278 case IDA_POPUP_DELETE_YES:
280 int groupIndex = (__sweptItemIndex >> LIST_VIEW_GROUP_INDEX_SHIFT) & LIST_VIEW_MASK;
281 int itemIndex = __sweptItemIndex & LIST_VIEW_MASK;
283 __pPresentationModel->RemoveContactFromCategory(groupIndex, itemIndex);
287 case IDA_POPUP_DELETE_CANCEL:
292 case IDA_POPUP_CONTACT_VALUE_CLOSE:
294 HideContactValuePopup();
303 GroupContactListForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs)
305 ContactsApp* pContactsApp = static_cast<ContactsApp*>(ContactsApp::GetInstance());
309 if (previousSceneId.Equals(IDSCN_GROUP_LIST, true))
311 Integer* pCategoryId = null;
312 IEnumerator* pEnum = pArgs->GetEnumeratorN();
313 while (pEnum->MoveNext() == E_SUCCESS)
315 pCategoryId = static_cast<Integer*>(pEnum->GetCurrent());
316 if (pCategoryId != null)
318 __categoryId = pCategoryId->ToInt();
320 if (__categoryId == ID_GROUP_CONTACT_NOT_ASSIGNED)
322 __pPresentationModel->InitializeGroupContactList(Tizen::Social::INVALID_RECORD_ID);
323 GetFooter()->SetShowState(false);
327 __pPresentationModel->InitializeGroupContactList(__categoryId);
328 GetFooter()->SetShowState(true);
330 __pListView->SetSize(__pListView->GetWidth(), GetClientAreaBounds().height - __pSearchBar->GetHeight());
331 __pSearchListView->SetSize(__pListView->GetWidth(), GetClientAreaBounds().height - __pSearchBar->GetHeight());
337 else if (previousSceneId.Equals(IDSCN_CONTACT_SELECTOR, true))
339 result r = __pPresentationModel->AddContactToCategory(pArgs);
343 __isCategoryUpdating = true;
347 pArgs->RemoveAll(true);
352 if (previousSceneId.Equals(IDSCN_CONTACT_DETAILS, true))
354 if (__categoryId == ID_GROUP_CONTACT_NOT_ASSIGNED)
356 __pPresentationModel->InitializeGroupContactList(Tizen::Social::INVALID_RECORD_ID);
360 __pPresentationModel->InitializeGroupContactList(__categoryId);
364 if (__pPresentationModel->IsCategoryValid())
366 String groupName = __pPresentationModel->GetCategoryName();
368 Header* pHeader = GetHeader();
369 pHeader->SetTitleText(groupName);
371 Footer* pFooter = GetFooter();
372 SetFormMenuEventListener(null);
374 if (pContactsApp->GetOperationId() == OPERATION_ID_PICK)
376 pFooter->SetShowState(false);
377 __pListView->SetSize(__pListView->GetWidth(), GetClientAreaBounds().height - H_SEARCHBAR );
378 __pSearchListView->SetSize(__pSearchListView->GetWidth(), GetClientAreaBounds().height - H_SEARCHBAR);
381 if (__pPresentationModel->GetContactCount() == 0)
383 __pSearchBar->SetShowState(false);
384 __pListView->SetShowState(false);
385 __pEmptyImageLabel->SetShowState(true);
386 __pEmptyCommentLabel->SetShowState(true);
388 __pPresentationModel->AddContactChangeListener(*this);
392 if (__categoryId != ID_GROUP_CONTACT_NOT_ASSIGNED)
394 if (pFooter->GetItemCount() == 0)
396 FooterItem footerItemAdd;
397 footerItemAdd.Construct(IDA_FOOTER_ADD_MEMBER);
398 footerItemAdd.SetText(ResourceManager::GetString(L"IDS_PB_SK_ADD_MEMBER"));
399 pFooter->AddItem(footerItemAdd);
402 if (__pPresentationModel->GetAllContactsCount() <= __pPresentationModel->GetContactCount())
404 pFooter->SetItemEnabled(0, false);
407 if (__pPresentationModel->GetContactCount() > 0)
409 SetFormMenuEventListener(this);
413 SetFormMenuEventListener(null);
417 if (__pPresentationModel->GetContactCount() > 0)
419 __pSearchBar->SetShowState(true);
420 __pListView->SetShowState(true);
421 __pEmptyImageLabel->SetShowState(false);
422 __pEmptyCommentLabel->SetShowState(false);
424 __pListView->SetFastScrollIndex(__pPresentationModel->GetAllKeys(), false);
425 __pListView->UpdateList();
427 if (__pSearchBar->GetMode() == SEARCH_BAR_MODE_INPUT && __pSearchBar->GetTextLength() != 0)
429 String searchText = __pSearchBar->GetText();
432 ContactsApp* pContactsApp = static_cast<ContactsApp*>(ContactsApp::GetInstance());
433 if (pContactsApp->GetReturnType() == APP_CONTROL_RETURN_TYPE_PHONE)
435 __pPresentationModel->SetSearchText(searchText, SEARCH_TYPE_HAS_PHONE_ONLY);
437 else if (pContactsApp->GetReturnType() == APP_CONTROL_RETURN_TYPE_EMAIL)
439 __pPresentationModel->SetSearchText(searchText, SEARCH_TYPE_HAS_EMAIL_ONLY);
443 __pPresentationModel->SetSearchText(searchText, SEARCH_TYPE_NORMAL);
445 __pSearchListView->UpdateList();
446 __pListView->SetShowState(false);
447 __pSearchListView->SetShowState(true);
451 __pListView->SetShowState(true);
452 __pSearchListView->SetShowState(false);
457 __pSearchBar->SetShowState(false);
458 __pListView->SetShowState(false);
459 __pSearchListView->SetShowState(false);
460 __pEmptyImageLabel->SetShowState(true);
461 __pEmptyCommentLabel->SetShowState(true);
464 __pPresentationModel->AddContactChangeListener(*this);
465 pContactsApp->AddContactsAppChangeEventListener(*this);
469 GroupContactListForm::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId)
471 ContactsApp* pContactsApp = static_cast<ContactsApp*>(ContactsApp::GetInstance());
473 __pPresentationModel->RemoveContactChangeListener(*this);
474 pContactsApp->RemoveContactsAppChangeEventListener(*this);
476 delete __pAppControl;
477 __pAppControl = null;
481 GroupContactListForm::GetGroupCount(void)
483 return __pPresentationModel->GetKeyCount();
487 GroupContactListForm::GetItemCount(int groupIndex)
489 return __pPresentationModel->GetContactCount(groupIndex);
492 Tizen::Ui::Controls::ListItemBase*
493 GroupContactListForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
496 Bitmap* pThumbnail = null;
498 ContactsApp* pContactsApp = static_cast<ContactsApp*>(ContactsApp::GetInstance());
499 CustomItem* pItem = new (std::nothrow) CustomItem();
500 pItem->Construct(Dimension(itemWidth, pContactsApp->GetListItemSingleLineHeight()), LIST_ANNEX_STYLE_NORMAL);
502 __pPresentationModel->GetContactItemInfoN(groupIndex, itemIndex, name, pThumbnail);
504 ContactListItem* pCustomElement = new (std::nothrow) ContactListItem(name, pThumbnail);
505 pItem->AddElement(Rectangle(0, 0, itemWidth, pContactsApp->GetListItemSingleLineHeight()), 0, *(static_cast<ICustomElement*>(pCustomElement)));
507 if (pContactsApp->GetOperationId().IsEmpty() == false)
512 bool isCallEnabled = true;
513 bool isMessageEnabled = true;
514 if (__pPresentationModel->GetDefaultPhoneNumber(groupIndex, itemIndex).IsEmpty())
516 isCallEnabled = false;
519 if ((__pPresentationModel->GetDefaultPhoneNumber(groupIndex, itemIndex).IsEmpty()) && (__pPresentationModel->GetDefaultEmail(groupIndex, itemIndex).IsEmpty()))
521 isMessageEnabled = false;
524 ListContextItem* pItemContext = new (std::nothrow) ListContextItem();
525 pItemContext->Construct();
526 pItemContext->AddElement(IDA_LIST_ELEMENT_CALL, ResourceManager::GetString(L"IDS_COM_BODY_CALL"), isCallEnabled);
527 pItemContext->AddElement(IDA_LIST_ELEMENT_MESSAGE, ResourceManager::GetString(L"IDS_COM_BODY_MESSAGE"), isMessageEnabled);
528 #if __SUPPORT_VIDEO_CALL
529 pItemContext->AddElement(IDA_LIST_ELEMENT_VIDEO_CALL, ResourceManager::GetString(L"IDS_COM_BODY_VIDEO_CALL"), isEnabled);
531 if (__categoryId != ID_GROUP_CONTACT_NOT_ASSIGNED)
533 pItemContext->AddElement(IDA_LIST_ELEMENT_DELETE, ResourceManager::GetString(L"IDS_COM_SK_DELETE"));
535 pItemContext->SetElementBackgroundColor(IDA_LIST_ELEMENT_DELETE, LIST_CONTEXT_ITEM_ELEMENT_STATUS_NORMAL, COLOR_DELETE_ELEMENT_NORMAL);
536 pItemContext->SetElementBackgroundColor(IDA_LIST_ELEMENT_DELETE, LIST_CONTEXT_ITEM_ELEMENT_STATUS_PRESSED, COLOR_DELETE_ELEMENT_PRESSED);
537 pItemContext->SetElementTextColor(IDA_LIST_ELEMENT_DELETE, LIST_CONTEXT_ITEM_ELEMENT_STATUS_NORMAL, COLOR_DELETE_ELEMENT_TEXT);
539 pItem->SetContextItem(pItemContext);
544 Tizen::Ui::Controls::GroupItem*
545 GroupContactListForm::CreateGroupItem(int groupIndex, int itemWidth)
547 GroupItem* pItem = new (std::nothrow) GroupItem();
548 pItem->Construct(Dimension(itemWidth, H_GROUP_ITEM));
549 pItem->SetElement(__pPresentationModel->GetKey(groupIndex), null);
555 GroupContactListForm::DeleteItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth)
557 CustomItem* pCustomItem = static_cast<CustomItem *>(pItem);
558 pCustomItem->RemoveAllElements();
567 GroupContactListForm::DeleteGroupItem(int groupIndex, Tizen::Ui::Controls::GroupItem* pItem, int itemWidth)
576 GroupContactListForm::OnGroupedListViewContextItemStateChanged(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, int elementId, Tizen::Ui::Controls::ListContextItemStatus state)
580 if (listView.Equals(*__pSearchListView) == true)
582 __pPresentationModel->GetItemMainIndex(itemIndex, groupIndex, itemIndex);
585 index |= groupIndex << LIST_VIEW_GROUP_INDEX_SHIFT;
588 __sweptItemIndex = index;
592 case IDA_LIST_ELEMENT_DELETE:
597 case IDA_LIST_ELEMENT_CALL:
599 String phoneNumber = __pPresentationModel->GetDefaultPhoneNumber(groupIndex, itemIndex);
600 LaunchAppControl(PROVIDER_ID_PHONE, OPERATION_ID_CALL, phoneNumber, INPUT_TYPE_VOICE);
603 case IDA_LIST_ELEMENT_MESSAGE:
605 if (!(__pPresentationModel->GetDefaultPhoneNumber(groupIndex, itemIndex).IsEmpty()))
607 String phoneNumber = __pPresentationModel->GetDefaultPhoneNumber(groupIndex, itemIndex);
608 LaunchAppControl(PROVIDER_ID_MESSAGE, OPERATION_ID_COMPOSE, phoneNumber, INPUT_TYPE_SMS);
610 else if (!(__pPresentationModel->GetDefaultEmail(groupIndex, itemIndex).IsEmpty()))
612 String emailId = __pPresentationModel->GetDefaultEmail(groupIndex, itemIndex);
613 LaunchAppControl(PROVIDER_ID_MESSAGE, OPERATION_ID_COMPOSE, emailId, null);
617 case IDA_LIST_ELEMENT_VIDEO_CALL:
619 String phoneNumber = __pPresentationModel->GetDefaultPhoneNumber(groupIndex, itemIndex);
620 LaunchAppControl(PROVIDER_ID_PHONE, OPERATION_ID_CALL, phoneNumber, INPUT_TYPE_VIDEO);
629 GroupContactListForm::OnGroupedListViewItemStateChanged(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, int elementId, Tizen::Ui::Controls::ListItemStatus state)
631 ContactsApp* pContactsApp = static_cast<ContactsApp*>(ContactsApp::GetInstance());
633 if (listView.Equals(*__pSearchListView) == true)
635 __pPresentationModel->GetItemMainIndex(itemIndex, groupIndex, itemIndex);
640 index |= groupIndex << LIST_VIEW_GROUP_INDEX_SHIFT;
643 __selectedIndex = index;
645 if (pContactsApp->GetOperationId() == OPERATION_ID_PICK)
648 HashMap* pReturnValue = new (std::nothrow) HashMap();
649 pReturnValue->Construct();
651 if (pContactsApp->GetReturnType() == APP_CONTROL_RETURN_TYPE_PHONE)
653 pList = __pPresentationModel->GetAllPhoneNumbersN(groupIndex, itemIndex);
657 ReturnValues(pContactsApp->GetRequestId(), APP_CTRL_RESULT_FAILED, pReturnValue);
661 if (pList->GetCount() > 1)
663 __pContactValueListEvent = new (std::nothrow) ContactValueListItemProvider(pList);
664 ShowContactValuePopup(groupIndex, itemIndex);
666 else if (pList->GetCount() == 1)
668 String* pPhoneNumberInfo = static_cast<String *>(pList->GetAt(0));
670 ArrayList* pValueList = new (std::nothrow) ArrayList();
671 pValueList->Construct();
673 pPhoneNumberInfo->IndexOf(CHARACTER_SPACE, 0, blankIndex);
674 pPhoneNumberInfo->Remove(0, blankIndex + 1);
675 pValueList->Add(new (std::nothrow) String(*pPhoneNumberInfo));
676 pReturnValue->Add(new (std::nothrow) String(CONTACT_KEY_PHONE), pValueList);
678 ReturnValues(pContactsApp->GetRequestId(), APP_CTRL_RESULT_SUCCEEDED, pReturnValue);
683 else if (pContactsApp->GetReturnType() == APP_CONTROL_RETURN_TYPE_EMAIL)
685 pList = __pPresentationModel->GetAllEmailsN(groupIndex, itemIndex);
689 ReturnValues(pContactsApp->GetRequestId(), APP_CTRL_RESULT_FAILED, pReturnValue);
693 if (pList->GetCount() > 1)
695 __pContactValueListEvent = new (std::nothrow) ContactValueListItemProvider(pList);
696 ShowContactValuePopup(groupIndex, itemIndex);
698 else if (pList->GetCount() == 1)
700 String* pEmailInfo = static_cast<String *>(pList->GetAt(0));
702 ArrayList* pValueList = new (std::nothrow) ArrayList();
703 pValueList->Construct();
705 pEmailInfo->IndexOf(CHARACTER_SPACE, 0, blankIndex);
706 pEmailInfo->Remove(0, blankIndex + 1);
707 pValueList->Add(new (std::nothrow) String(*pEmailInfo));
708 pReturnValue->Add(new (std::nothrow) String(CONTACT_KEY_EMAIL), pValueList);
710 ReturnValues(pContactsApp->GetRequestId(), APP_CTRL_RESULT_SUCCEEDED, pReturnValue);
715 else if (pContactsApp->GetReturnType() == APP_CONTROL_RETURN_TYPE_ITEM_ID)
717 AppCtrlResult appCtrlResult = APP_CTRL_RESULT_SUCCEEDED;
718 RecordId contactId = __pPresentationModel->GetContactId(groupIndex, itemIndex);
719 if (contactId == INVALID_RECORD_ID)
721 appCtrlResult = APP_CTRL_RESULT_FAILED;
725 String contactIdString;
726 ArrayList* pValueList = new (std::nothrow) ArrayList();
727 pValueList->Construct();
729 contactIdString.Append(contactId);
730 pValueList->Add(new (std::nothrow) String(contactIdString));
731 pReturnValue->Add(new (std::nothrow) String(CONTACT_KEY_ITEM_ID), pValueList);
734 ReturnValues(pContactsApp->GetRequestId(), appCtrlResult, pReturnValue);
736 else if (pContactsApp->GetReturnType() == APP_CONTROL_RETURN_TYPE_VCARD)
738 AppCtrlResult appCtrlResult = APP_CTRL_RESULT_SUCCEEDED;
739 String vCardPath = __pPresentationModel->ExportToVcard(groupIndex, itemIndex);
741 if (vCardPath.IsEmpty())
743 appCtrlResult = APP_CTRL_RESULT_FAILED;
747 pReturnValue->Add(new (std::nothrow) String(CONTACT_KEY_PATH), new (std::nothrow) String(vCardPath));
750 ReturnValues(pContactsApp->GetRequestId(), appCtrlResult, pReturnValue);
757 ArrayList* pContactId = new (std::nothrow) ArrayList();
758 pContactId->Construct();
760 pContactId->Add(*(new (std::nothrow) Integer(__pPresentationModel->GetContactId(groupIndex, itemIndex))));
761 SceneManager* pSceneManager = SceneManager::GetInstance();
763 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_CONTACT_DETAILS, SCENE_TRANSITION_ANIMATION_TYPE_LEFT), pContactId);
768 GroupContactListForm::OnGroupedListViewItemSwept(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, Tizen::Ui::Controls::SweepDirection direction)
773 GroupContactListForm::OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListContextItemStatus state)
778 GroupContactListForm::OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListItemStatus status)
780 ContactsApp* pContactsApp = static_cast<ContactsApp*>(ContactsApp::GetInstance());
784 HashMap* pReturnValue = new (std::nothrow) HashMap();
785 pReturnValue->Construct();
787 int groupIndex = (__selectedIndex >> LIST_VIEW_GROUP_INDEX_SHIFT) & LIST_VIEW_MASK;
788 int itemIndex = __selectedIndex & LIST_VIEW_MASK;
790 if (pContactsApp->GetReturnType() == APP_CONTROL_RETURN_TYPE_PHONE)
792 pList = __pPresentationModel->GetAllPhoneNumbersN(groupIndex, itemIndex);
793 String* pPhoneNumberInfo = static_cast<String *>(pList->GetAt(index));
795 ArrayList* pValueList = new (std::nothrow) ArrayList();
796 pValueList->Construct();
798 pPhoneNumberInfo->IndexOf(CHARACTER_SPACE, 0, blankIndex);
799 pPhoneNumberInfo->Remove(0, blankIndex + 1);
800 pValueList->Add(new (std::nothrow) String(*pPhoneNumberInfo));
801 pReturnValue->Add(new (std::nothrow) String(CONTACT_KEY_PHONE), pValueList);
803 else if (pContactsApp->GetReturnType() == APP_CONTROL_RETURN_TYPE_EMAIL)
805 pList = __pPresentationModel->GetAllEmailsN(groupIndex, itemIndex);
806 String* pEmailInfo = static_cast<String *>(pList->GetAt(index));
808 ArrayList* pValueList = new (std::nothrow) ArrayList();
809 pValueList->Construct();
811 pEmailInfo->IndexOf(CHARACTER_SPACE, 0, blankIndex);
812 pEmailInfo->Remove(0, blankIndex + 1);
813 pValueList->Add(new (std::nothrow) String(*pEmailInfo));
814 pReturnValue->Add(new (std::nothrow) String(CONTACT_KEY_EMAIL), pValueList);
819 ReturnValues(pContactsApp->GetRequestId(), APP_CTRL_RESULT_SUCCEEDED, pReturnValue);
823 GroupContactListForm::OnListViewItemSwept(Tizen::Ui::Controls::ListView& listView, int index, Tizen::Ui::Controls::SweepDirection direction)
828 GroupContactListForm::OnSearchBarModeChanged(Tizen::Ui::Controls::SearchBar& source, SearchBarMode mode)
830 if (mode == SEARCH_BAR_MODE_NORMAL)
832 __pListView->SetShowState(true);
833 __pSearchListView->SetShowState(false);
834 __pPresentationModel->ResetSearchedContactList();
835 __pSearchListView->UpdateList();
839 //[TODO] to restore swept item.
840 // need to be fixed with better idea..
841 Rectangle bounds = __pListView->GetBounds();
842 __pListView->SetBounds(bounds.x, bounds.y, bounds.width, bounds.height + 1);
843 __pListView->Invalidate(true);
844 __pListView->SetBounds(bounds);
849 GroupContactListForm::OnTextValueChanged(const Tizen::Ui::Control& source)
851 String searchText = __pSearchBar->GetText();
854 ContactsApp* pContactsApp = static_cast<ContactsApp*>(ContactsApp::GetInstance());
855 if (pContactsApp->GetReturnType() == APP_CONTROL_RETURN_TYPE_PHONE)
857 __pPresentationModel->SetSearchText(searchText, SEARCH_TYPE_HAS_PHONE_ONLY);
859 else if (pContactsApp->GetReturnType() == APP_CONTROL_RETURN_TYPE_EMAIL)
861 __pPresentationModel->SetSearchText(searchText, SEARCH_TYPE_HAS_EMAIL_ONLY);
865 __pPresentationModel->SetSearchText(searchText, SEARCH_TYPE_NORMAL);
868 if (searchText.GetLength() != 0)
870 __pSearchListView->SetShowState(true);
871 __pListView->SetShowState(false);
875 __pSearchListView->SetShowState(false);
876 __pListView->SetShowState(true);
879 __pSearchListView->UpdateList();
883 GroupContactListForm::OnFastScrollIndexSelected (Tizen::Ui::Control& source, Tizen::Base::String& index)
885 __pListView->ScrollToItem(__pPresentationModel->GetKeyIndex(index), -1);
886 __pListView->Invalidate(false);
890 GroupContactListForm::OnFocusGained(const Tizen::Ui::Control& source)
892 if (source.Equals(*__pSearchBar))
894 if (__pListView->GetShowState() == true )
896 int groupCount = __pPresentationModel->GetKeyCount();
897 bool isContextItemOpenend = false;
899 for (int i = 0; i < groupCount; i++)
901 int contactCount = __pPresentationModel->GetContactCount(i);
902 for (int j = 0; j < contactCount; j++)
904 if (__pListView->IsContextItemOpened(i, j) == true)
906 isContextItemOpenend = true;
912 if (isContextItemOpenend == true)
914 __pListView->UpdateList();
917 else if (__pSearchListView->GetShowState() == true )
920 bool isContextItemOpenend = false;
922 if (__pSearchListEvent == null)
926 groupCount = __pSearchListEvent->GetGroupCount();
927 for (int i = 0; i < groupCount; i++)
929 int contactCount = __pSearchListEvent->GetItemCount(i);
930 for (int j = 0; j < contactCount; j++)
932 if (__pSearchListView->IsContextItemOpened(i, j) == true)
934 isContextItemOpenend = true;
940 if (isContextItemOpenend == true)
942 __pSearchListView->UpdateList();
949 GroupContactListForm::OnFocusLost(const Tizen::Ui::Control& source)
954 GroupContactListForm::OnTextValueChangeCanceled(const Tizen::Ui::Control& source)
959 GroupContactListForm::OnContactsChanged(void)
961 HideContactValuePopup();
964 if (__isCategoryUpdating)
966 __isCategoryUpdating = false;
971 if (__categoryId == ID_GROUP_CONTACT_NOT_ASSIGNED)
973 __pPresentationModel->InitializeGroupContactList(Tizen::Social::INVALID_RECORD_ID);
977 __pPresentationModel->InitializeGroupContactList(__categoryId);
980 if (__pSearchBar->GetMode() == SEARCH_BAR_MODE_INPUT)
982 __pSearchBar->SetMode(SEARCH_BAR_MODE_NORMAL);
986 if (__categoryId != ID_GROUP_CONTACT_NOT_ASSIGNED)
988 Footer* pFooter = GetFooter();
990 if (__pPresentationModel->GetAllContactsCount() <= __pPresentationModel->GetContactCount())
992 pFooter->SetItemEnabled(0, false);
993 pFooter->Invalidate(true);
997 pFooter->SetItemEnabled(0, true);
998 pFooter->Invalidate(true);
1001 if (__pPresentationModel->GetContactCount() > 0)
1003 SetFormMenuEventListener(this);
1007 SetFormMenuEventListener(null);
1011 if (__pPresentationModel->GetContactCount() > 0)
1013 __pSearchBar->SetShowState(true);
1014 __pListView->SetShowState(true);
1015 __pEmptyImageLabel->SetShowState(false);
1016 __pEmptyCommentLabel->SetShowState(false);
1018 __pPresentationModel->InitializeContactList();
1019 __pListView->SetFastScrollIndex(__pPresentationModel->GetAllKeys(), false);
1020 __pListView->UpdateList();
1024 __pSearchBar->SetShowState(false);
1025 __pListView->SetShowState(false);
1026 __pEmptyImageLabel->SetShowState(true);
1027 __pEmptyCommentLabel->SetShowState(true);
1032 GroupContactListForm::OnCategoriesChanged(void)
1034 if (__pPresentationModel->IsCategoryValid() == false)
1036 SceneManager::GetInstance()->GoBackward(BackwardSceneTransition(IDSCN_GROUP_LIST));
1041 GroupContactListForm::ShowDeletePopup(void)
1043 if (__pDeletePopup == null)
1045 __pDeletePopup = new (std::nothrow) Popup();
1046 __pDeletePopup->Construct(false, Dimension(W_DELETE_POPUP, H_DELETE_POPUP));
1047 __pDeletePopup->SetPropagatedKeyEventListener(this);
1049 Rectangle popupClientBounds = __pDeletePopup->GetClientAreaBounds();
1051 Label* pLabel = new (std::nothrow) Label();
1052 pLabel->Construct(Rectangle(X_DELETE_LABEL, Y_DELETE_LABEL, W_DELETE_LABEL, H_DELETE_LABEL), ResourceManager::GetString(L"IDS_COM_POP_DELETE_Q"));
1053 pLabel->SetTextConfig(FONT_SIZE_DELETE_CONFIRM, LABEL_TEXT_STYLE_NORMAL);
1054 pLabel->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
1055 pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
1057 Button* pDeleteButton = new (std::nothrow) Button();
1058 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"));
1059 pDeleteButton->SetColor(BUTTON_STATUS_NORMAL, COLOR_DELETE_BUTTON_NORMAL);
1060 pDeleteButton->SetColor(BUTTON_STATUS_PRESSED, COLOR_DELETE_BUTTON_PRESSED);
1061 pDeleteButton->SetTextColor(COLOR_DELETE_BUTTON_TEXT);
1062 pDeleteButton->SetTextSize(FONT_SIZE_DELETE_BUTTON);
1063 pDeleteButton->SetActionId(IDA_POPUP_DELETE_YES);
1064 pDeleteButton->AddActionEventListener(*this);
1066 Button* pCancelButton = new (std::nothrow) Button();
1067 pCancelButton->Construct(Rectangle(X_DELETE_LABEL, Y_DELETE_BUTTON, W_DELETE_BUTTON, H_DELETE_BUTTON), ResourceManager::GetString(L"IDS_PB_SK_CANCEL"));
1068 pCancelButton->SetTextSize(FONT_SIZE_DELETE_BUTTON);
1069 pCancelButton->SetActionId(IDA_POPUP_DELETE_CANCEL);
1070 pCancelButton->AddActionEventListener(*this);
1072 __pDeletePopup->AddControl(pLabel);
1073 __pDeletePopup->AddControl(pDeleteButton);
1074 __pDeletePopup->AddControl(pCancelButton);
1077 __pDeletePopup->SetShowState(true);
1078 __pDeletePopup->Show();
1082 GroupContactListForm::HideDeletePopup(void)
1084 if (__pDeletePopup != null)
1086 __pDeletePopup->SetShowState(false);
1090 delete __pContactValueListEvent;
1091 __pContactValueListEvent = null;
1095 GroupContactListForm::ShowContactValuePopup(int groupIndex, int itemIndex)
1097 delete __pMultipleContactValuePopup;
1098 __pMultipleContactValuePopup = new (std::nothrow) Popup();
1099 __pMultipleContactValuePopup->Construct(true, Dimension(W_CONTACT_VALUE_POPUP, H_CONTACT_VALUE_POPUP));
1100 __pMultipleContactValuePopup->SetTitleText(__pPresentationModel->GetName(groupIndex, itemIndex));
1101 __pMultipleContactValuePopup->SetPropagatedKeyEventListener(this);
1103 Rectangle popupClientBounds = __pMultipleContactValuePopup->GetClientAreaBounds();
1105 ListView* pListView = new (std::nothrow) ListView();
1106 pListView->Construct(Rectangle(0, 0, popupClientBounds.width, H_CONTACT_VALUE_POPUP_LIST_VIEW));
1107 pListView->SetItemProvider(*__pContactValueListEvent);
1108 pListView->AddListViewItemEventListener(*this);
1110 __pMultipleContactValuePopup->AddControl(pListView);
1112 Button* pCancelButton = new (std::nothrow) Button();
1113 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"));
1114 pCancelButton->SetActionId(IDA_POPUP_CONTACT_VALUE_CLOSE);
1115 pCancelButton->AddActionEventListener(*this);
1117 __pMultipleContactValuePopup->AddControl(pCancelButton);
1118 __pMultipleContactValuePopup->SetShowState(true);
1119 __pMultipleContactValuePopup->Show();
1123 GroupContactListForm::HideContactValuePopup(void)
1125 if (__pMultipleContactValuePopup != null)
1127 __pMultipleContactValuePopup->SetShowState(false);
1133 GroupContactListForm::ParseAppControlArgument(const Tizen::Base::String& argument, Tizen::Base::String& type, Tizen::Base::String& content)
1135 result r = E_SUCCESS;
1137 if (argument.IsEmpty() || argument.Contains(DELIMITER) == false)
1142 StringTokenizer stringToken(argument, DELIMITER);
1144 r = stringToken.GetNextToken(type);
1145 TryReturn(r == E_SUCCESS, r, "[%s] Unable to get type", GetErrorMessage(r));
1147 r = stringToken.GetNextToken(content);
1148 TryReturn(r == E_SUCCESS, r, "[%s] Unable to get content", GetErrorMessage(r));
1154 GroupContactListForm::ReturnValues(RequestId requestId, Tizen::App::AppCtrlResult appCtrlResult, const Tizen::Base::Collection::IMap* pReturnValue)
1156 AppControlProviderManager* pAppManager = AppControlProviderManager::GetInstance();
1158 result r = pAppManager->SendAppControlResult(requestId, appCtrlResult, pReturnValue);
1159 AppLogDebug("[%s] The return result from SendAppControlResult(), AppCtrlResult value : %d.", GetErrorMessage(r), appCtrlResult);
1161 UiApp::GetInstance()->Terminate();
1165 GroupContactListForm::LaunchAppControl(const Tizen::App::AppId& appId, const Tizen::Base::String& operationId, const Tizen::Base::String& argument, const Tizen::Base::String& type)
1167 result r = E_SUCCESS;
1169 if (__pAppControl != null)
1176 extraData.Construct();
1178 if (appId.Equals(String(PROVIDER_ID_PHONE)))
1180 uri.Append(INPUT_URI_TEL);
1181 uri.Append(argument);
1182 extraData.Add(new (std::nothrow) String(INPUT_KEY_CALL_TYPE), new (std::nothrow) String(type));
1184 else if (appId.Equals(String(PROVIDER_ID_MESSAGE)))
1186 extraData.Add(new (std::nothrow) String(INPUT_KEY_MESSAGE_TO), new (std::nothrow) String(argument));
1187 extraData.Add(new (std::nothrow) String(INPUT_KEY_MESSAGE_TYPE), new (std::nothrow) String(INPUT_TYPE_SMS));
1190 __pAppControl = AppManager::FindAppControlN(appId, operationId);
1191 if (__pAppControl != null)
1193 r = __pAppControl->Start(&uri, null, &extraData, null);
1196 AppLogDebug("[%s] Unable to launch app control", GetErrorMessage(r));
1200 if (__pListView->GetShowState() == true)
1202 __pListView->SetEnabled(false);
1205 if (__pSearchListView->GetShowState() == true)
1207 __pSearchListView->SetEnabled(false);
1212 extraData.RemoveAll(true);
1218 GroupContactListForm::OnKeypadWillOpen(Tizen::Ui::Control& source)
1223 GroupContactListForm::OnKeypadOpened(Tizen::Ui::Control& source)
1225 __pSearchListView->SetSize(__pListView->GetWidth(), GetClientAreaBounds().height - __pSearchBar->GetHeight());
1229 GroupContactListForm::OnKeypadClosed(Tizen::Ui::Control& source)
1231 if (__categoryId == ID_GROUP_CONTACT_NOT_ASSIGNED)
1233 __pPresentationModel->InitializeGroupContactList(Tizen::Social::INVALID_RECORD_ID);
1234 GetFooter()->SetShowState(false);
1238 ContactsApp* pContactsApp = static_cast<ContactsApp*>(ContactsApp::GetInstance());
1239 __pPresentationModel->InitializeGroupContactList(__categoryId);
1240 if (pContactsApp->GetOperationId() != OPERATION_ID_PICK)
1242 GetFooter()->SetShowState(true);
1245 __pListView->SetSize(__pListView->GetWidth(), GetClientAreaBounds().height - __pSearchBar->GetHeight());
1246 __pSearchListView->SetSize(__pListView->GetWidth(), GetClientAreaBounds().height - __pSearchBar->GetHeight());
1251 GroupContactListForm::OnKeypadBoundsChanged(Tizen::Ui::Control& source)
1253 __pSearchListView->SetSize(__pListView->GetWidth(), GetClientAreaBounds().height - __pSearchBar->GetHeight());
1257 GroupContactListForm::OnKeypadActionPerformed(Tizen::Ui::Control& source, Tizen::Ui::KeypadAction keypadAction)
1259 if (keypadAction == KEYPAD_ACTION_SEARCH)
1261 __pSearchBar->HideKeypad();
1266 GroupContactListForm::OnForeground(void)
1268 delete __pAppControl;
1269 __pAppControl = null;
1271 if (__pListView->IsEnabled() == false)
1273 __pListView->SetEnabled(true);
1276 if (__pSearchListView->IsEnabled() == false)
1278 __pSearchListView->SetEnabled(true);
1283 GroupContactListForm::OnBackground(void)
1288 GroupContactListForm::OnTouchPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo & touchInfo)
1290 GroupedListView* pList = static_cast<GroupedListView*>(&const_cast<Control&>(source));
1298 GroupContactListForm::OnTouchReleased(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
1303 GroupContactListForm::OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
1308 GroupContactListForm::OnTouchFocusIn(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
1313 GroupContactListForm::OnTouchFocusOut(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
1318 GroupContactListForm::OnKeyPressed(Control& source, const KeyEventInfo& keyEventInfo)
1324 GroupContactListForm::OnKeyReleased(Control& source, const KeyEventInfo& keyEventInfo)
1326 if (keyEventInfo.GetKeyCode() == KEY_BACK || keyEventInfo.GetKeyCode() == KEY_ESC)
1328 if (__pMultipleContactValuePopup && __pMultipleContactValuePopup->GetShowState() == true)
1330 HideContactValuePopup();
1333 else if (__pDeletePopup && __pDeletePopup->GetShowState() == true)
1343 GroupContactListForm::OnPreviewKeyPressed(Control& source, const KeyEventInfo& keyEventInfo)
1349 GroupContactListForm::OnPreviewKeyReleased(Control& source, const KeyEventInfo& keyEventInfo)