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 (__categoryId == ID_GROUP_CONTACT_NOT_ASSIGNED && __pSearchListEvent != null)
366 __pSearchListEvent->SetShowDeleteOption(false);
369 if (__pPresentationModel->IsCategoryValid())
371 String groupName = __pPresentationModel->GetCategoryName();
373 Header* pHeader = GetHeader();
374 pHeader->SetTitleText(groupName);
376 Footer* pFooter = GetFooter();
377 SetFormMenuEventListener(null);
379 if (pContactsApp->GetOperationId() == OPERATION_ID_PICK)
381 pFooter->SetShowState(false);
382 __pListView->SetSize(__pListView->GetWidth(), GetClientAreaBounds().height - H_SEARCHBAR );
383 __pSearchListView->SetSize(__pSearchListView->GetWidth(), GetClientAreaBounds().height - H_SEARCHBAR);
386 if (__pPresentationModel->GetContactCount() == 0)
388 __pSearchBar->SetShowState(false);
389 __pListView->SetShowState(false);
390 __pEmptyImageLabel->SetShowState(true);
391 __pEmptyCommentLabel->SetShowState(true);
393 __pPresentationModel->AddContactChangeListener(*this);
397 if (__categoryId != ID_GROUP_CONTACT_NOT_ASSIGNED)
399 if (pFooter->GetItemCount() == 0)
401 FooterItem footerItemAdd;
402 footerItemAdd.Construct(IDA_FOOTER_ADD_MEMBER);
403 footerItemAdd.SetText(ResourceManager::GetString(L"IDS_PB_SK_ADD_MEMBER"));
404 pFooter->AddItem(footerItemAdd);
407 if (__pPresentationModel->GetAllContactsCount() <= __pPresentationModel->GetContactCount())
409 pFooter->SetItemEnabled(0, false);
413 pFooter->SetItemEnabled(0, true);
416 if (__pPresentationModel->GetContactCount() > 0)
418 SetFormMenuEventListener(this);
422 SetFormMenuEventListener(null);
426 if (__pPresentationModel->GetContactCount() > 0)
428 __pSearchBar->SetShowState(true);
429 __pListView->SetShowState(true);
430 __pEmptyImageLabel->SetShowState(false);
431 __pEmptyCommentLabel->SetShowState(false);
433 __pListView->SetFastScrollIndex(__pPresentationModel->GetAllKeys(), false);
434 __pListView->UpdateList();
436 if (__pSearchBar->GetMode() == SEARCH_BAR_MODE_INPUT && __pSearchBar->GetTextLength() != 0)
438 String searchText = __pSearchBar->GetText();
441 ContactsApp* pContactsApp = static_cast<ContactsApp*>(ContactsApp::GetInstance());
442 if (pContactsApp->GetReturnType() == APP_CONTROL_RETURN_TYPE_PHONE)
444 __pPresentationModel->SetSearchText(searchText, SEARCH_TYPE_HAS_PHONE_ONLY);
446 else if (pContactsApp->GetReturnType() == APP_CONTROL_RETURN_TYPE_EMAIL)
448 __pPresentationModel->SetSearchText(searchText, SEARCH_TYPE_HAS_EMAIL_ONLY);
452 __pPresentationModel->SetSearchText(searchText, SEARCH_TYPE_NORMAL);
454 __pSearchListView->UpdateList();
455 __pListView->SetShowState(false);
456 __pSearchListView->SetShowState(true);
460 __pListView->SetShowState(true);
461 __pSearchListView->SetShowState(false);
466 __pSearchBar->SetShowState(false);
467 __pListView->SetShowState(false);
468 __pSearchListView->SetShowState(false);
469 __pEmptyImageLabel->SetShowState(true);
470 __pEmptyCommentLabel->SetShowState(true);
473 __pPresentationModel->AddContactChangeListener(*this);
474 pContactsApp->AddContactsAppChangeEventListener(*this);
478 GroupContactListForm::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId)
480 ContactsApp* pContactsApp = static_cast<ContactsApp*>(ContactsApp::GetInstance());
482 __pPresentationModel->RemoveContactChangeListener(*this);
483 pContactsApp->RemoveContactsAppChangeEventListener(*this);
485 delete __pAppControl;
486 __pAppControl = null;
490 GroupContactListForm::GetGroupCount(void)
492 return __pPresentationModel->GetKeyCount();
496 GroupContactListForm::GetItemCount(int groupIndex)
498 return __pPresentationModel->GetContactCount(groupIndex);
501 Tizen::Ui::Controls::ListItemBase*
502 GroupContactListForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
505 Bitmap* pThumbnail = null;
507 ContactsApp* pContactsApp = static_cast<ContactsApp*>(ContactsApp::GetInstance());
508 CustomItem* pItem = new (std::nothrow) CustomItem();
509 pItem->Construct(Dimension(itemWidth, pContactsApp->GetListItemSingleLineHeight()), LIST_ANNEX_STYLE_NORMAL);
511 __pPresentationModel->GetContactItemInfoN(groupIndex, itemIndex, name, pThumbnail);
513 ContactListItem* pCustomElement = new (std::nothrow) ContactListItem(name, pThumbnail);
514 pItem->AddElement(Rectangle(0, 0, itemWidth, pContactsApp->GetListItemSingleLineHeight()), 0, *(static_cast<ICustomElement*>(pCustomElement)));
516 if (pContactsApp->GetOperationId().IsEmpty() == false)
521 bool isCallEnabled = true;
522 bool isMessageEnabled = true;
523 if (__pPresentationModel->GetDefaultPhoneNumber(groupIndex, itemIndex).IsEmpty())
525 isCallEnabled = false;
528 if ((__pPresentationModel->GetDefaultPhoneNumber(groupIndex, itemIndex).IsEmpty()) && (__pPresentationModel->GetDefaultEmail(groupIndex, itemIndex).IsEmpty()))
530 isMessageEnabled = false;
533 ListContextItem* pItemContext = new (std::nothrow) ListContextItem();
534 pItemContext->Construct();
535 pItemContext->AddElement(IDA_LIST_ELEMENT_CALL, ResourceManager::GetString(L"IDS_COM_BODY_CALL"), isCallEnabled);
536 pItemContext->AddElement(IDA_LIST_ELEMENT_MESSAGE, ResourceManager::GetString(L"IDS_COM_BODY_MESSAGE"), isMessageEnabled);
537 #if __SUPPORT_VIDEO_CALL
538 pItemContext->AddElement(IDA_LIST_ELEMENT_VIDEO_CALL, ResourceManager::GetString(L"IDS_COM_BODY_VIDEO_CALL"), isEnabled);
540 if (__categoryId != ID_GROUP_CONTACT_NOT_ASSIGNED)
542 pItemContext->AddElement(IDA_LIST_ELEMENT_DELETE, ResourceManager::GetString(L"IDS_COM_SK_DELETE"));
544 pItemContext->SetElementBackgroundColor(IDA_LIST_ELEMENT_DELETE, LIST_CONTEXT_ITEM_ELEMENT_STATUS_NORMAL, COLOR_DELETE_ELEMENT_NORMAL);
545 pItemContext->SetElementBackgroundColor(IDA_LIST_ELEMENT_DELETE, LIST_CONTEXT_ITEM_ELEMENT_STATUS_PRESSED, COLOR_DELETE_ELEMENT_PRESSED);
546 pItemContext->SetElementTextColor(IDA_LIST_ELEMENT_DELETE, LIST_CONTEXT_ITEM_ELEMENT_STATUS_NORMAL, COLOR_DELETE_ELEMENT_TEXT);
548 pItem->SetContextItem(pItemContext);
553 Tizen::Ui::Controls::GroupItem*
554 GroupContactListForm::CreateGroupItem(int groupIndex, int itemWidth)
556 GroupItem* pItem = new (std::nothrow) GroupItem();
557 pItem->Construct(Dimension(itemWidth, H_GROUP_ITEM));
558 pItem->SetElement(__pPresentationModel->GetKey(groupIndex), null);
564 GroupContactListForm::DeleteItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth)
566 CustomItem* pCustomItem = static_cast<CustomItem *>(pItem);
567 pCustomItem->RemoveAllElements();
576 GroupContactListForm::DeleteGroupItem(int groupIndex, Tizen::Ui::Controls::GroupItem* pItem, int itemWidth)
585 GroupContactListForm::OnGroupedListViewContextItemStateChanged(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, int elementId, Tizen::Ui::Controls::ListContextItemStatus state)
589 if (listView.Equals(*__pSearchListView) == true)
591 __pPresentationModel->GetItemMainIndex(itemIndex, groupIndex, itemIndex);
594 index |= groupIndex << LIST_VIEW_GROUP_INDEX_SHIFT;
597 __sweptItemIndex = index;
601 case IDA_LIST_ELEMENT_DELETE:
606 case IDA_LIST_ELEMENT_CALL:
608 String phoneNumber = __pPresentationModel->GetDefaultPhoneNumber(groupIndex, itemIndex);
609 LaunchAppControl(PROVIDER_ID_PHONE, OPERATION_ID_CALL, phoneNumber, INPUT_TYPE_VOICE);
612 case IDA_LIST_ELEMENT_MESSAGE:
614 if (!(__pPresentationModel->GetDefaultPhoneNumber(groupIndex, itemIndex).IsEmpty()))
616 String phoneNumber = __pPresentationModel->GetDefaultPhoneNumber(groupIndex, itemIndex);
617 LaunchAppControl(PROVIDER_ID_MESSAGE, OPERATION_ID_COMPOSE, phoneNumber, INPUT_TYPE_SMS);
619 else if (!(__pPresentationModel->GetDefaultEmail(groupIndex, itemIndex).IsEmpty()))
621 String emailId = __pPresentationModel->GetDefaultEmail(groupIndex, itemIndex);
622 LaunchAppControl(PROVIDER_ID_MESSAGE, OPERATION_ID_COMPOSE, emailId, null);
626 case IDA_LIST_ELEMENT_VIDEO_CALL:
628 String phoneNumber = __pPresentationModel->GetDefaultPhoneNumber(groupIndex, itemIndex);
629 LaunchAppControl(PROVIDER_ID_PHONE, OPERATION_ID_CALL, phoneNumber, INPUT_TYPE_VIDEO);
638 GroupContactListForm::OnGroupedListViewItemStateChanged(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, int elementId, Tizen::Ui::Controls::ListItemStatus state)
640 ContactsApp* pContactsApp = static_cast<ContactsApp*>(ContactsApp::GetInstance());
642 if (listView.Equals(*__pSearchListView) == true)
644 __pPresentationModel->GetItemMainIndex(itemIndex, groupIndex, itemIndex);
649 index |= groupIndex << LIST_VIEW_GROUP_INDEX_SHIFT;
652 __selectedIndex = index;
654 if (pContactsApp->GetOperationId() == OPERATION_ID_PICK)
657 HashMap* pReturnValue = new (std::nothrow) HashMap();
658 pReturnValue->Construct();
660 if (pContactsApp->GetReturnType() == APP_CONTROL_RETURN_TYPE_PHONE)
662 pList = __pPresentationModel->GetAllPhoneNumbersN(groupIndex, itemIndex);
666 ReturnValues(pContactsApp->GetRequestId(), APP_CTRL_RESULT_FAILED, pReturnValue);
670 if (pList->GetCount() > 1)
672 __pContactValueListEvent = new (std::nothrow) ContactValueListItemProvider(pList);
673 ShowContactValuePopup(groupIndex, itemIndex);
675 else if (pList->GetCount() == 1)
677 String* pPhoneNumberInfo = static_cast<String *>(pList->GetAt(0));
679 ArrayList* pValueList = new (std::nothrow) ArrayList();
680 pValueList->Construct();
682 pPhoneNumberInfo->IndexOf(CHARACTER_SPACE, 0, blankIndex);
683 pPhoneNumberInfo->Remove(0, blankIndex + 1);
684 pValueList->Add(new (std::nothrow) String(*pPhoneNumberInfo));
685 pReturnValue->Add(new (std::nothrow) String(CONTACT_KEY_PHONE), pValueList);
687 ReturnValues(pContactsApp->GetRequestId(), APP_CTRL_RESULT_SUCCEEDED, pReturnValue);
692 else if (pContactsApp->GetReturnType() == APP_CONTROL_RETURN_TYPE_EMAIL)
694 pList = __pPresentationModel->GetAllEmailsN(groupIndex, itemIndex);
698 ReturnValues(pContactsApp->GetRequestId(), APP_CTRL_RESULT_FAILED, pReturnValue);
702 if (pList->GetCount() > 1)
704 __pContactValueListEvent = new (std::nothrow) ContactValueListItemProvider(pList);
705 ShowContactValuePopup(groupIndex, itemIndex);
707 else if (pList->GetCount() == 1)
709 String* pEmailInfo = static_cast<String *>(pList->GetAt(0));
711 ArrayList* pValueList = new (std::nothrow) ArrayList();
712 pValueList->Construct();
714 pEmailInfo->IndexOf(CHARACTER_SPACE, 0, blankIndex);
715 pEmailInfo->Remove(0, blankIndex + 1);
716 pValueList->Add(new (std::nothrow) String(*pEmailInfo));
717 pReturnValue->Add(new (std::nothrow) String(CONTACT_KEY_EMAIL), pValueList);
719 ReturnValues(pContactsApp->GetRequestId(), APP_CTRL_RESULT_SUCCEEDED, pReturnValue);
724 else if (pContactsApp->GetReturnType() == APP_CONTROL_RETURN_TYPE_ITEM_ID)
726 AppCtrlResult appCtrlResult = APP_CTRL_RESULT_SUCCEEDED;
727 RecordId contactId = __pPresentationModel->GetContactId(groupIndex, itemIndex);
728 if (contactId == INVALID_RECORD_ID)
730 appCtrlResult = APP_CTRL_RESULT_FAILED;
734 String contactIdString;
735 ArrayList* pValueList = new (std::nothrow) ArrayList();
736 pValueList->Construct();
738 contactIdString.Append(contactId);
739 pValueList->Add(new (std::nothrow) String(contactIdString));
740 pReturnValue->Add(new (std::nothrow) String(CONTACT_KEY_ITEM_ID), pValueList);
743 ReturnValues(pContactsApp->GetRequestId(), appCtrlResult, pReturnValue);
745 else if (pContactsApp->GetReturnType() == APP_CONTROL_RETURN_TYPE_VCARD)
747 AppCtrlResult appCtrlResult = APP_CTRL_RESULT_SUCCEEDED;
748 String vCardPath = __pPresentationModel->ExportToVcard(groupIndex, itemIndex);
750 if (vCardPath.IsEmpty())
752 appCtrlResult = APP_CTRL_RESULT_FAILED;
756 pReturnValue->Add(new (std::nothrow) String(CONTACT_KEY_PATH), new (std::nothrow) String(vCardPath));
759 ReturnValues(pContactsApp->GetRequestId(), appCtrlResult, pReturnValue);
766 ArrayList* pContactId = new (std::nothrow) ArrayList();
767 pContactId->Construct();
769 pContactId->Add(*(new (std::nothrow) Integer(__pPresentationModel->GetContactId(groupIndex, itemIndex))));
770 SceneManager* pSceneManager = SceneManager::GetInstance();
772 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_CONTACT_DETAILS, SCENE_TRANSITION_ANIMATION_TYPE_LEFT), pContactId);
777 GroupContactListForm::OnGroupedListViewItemSwept(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, Tizen::Ui::Controls::SweepDirection direction)
782 GroupContactListForm::OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListContextItemStatus state)
787 GroupContactListForm::OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListItemStatus status)
789 ContactsApp* pContactsApp = static_cast<ContactsApp*>(ContactsApp::GetInstance());
793 HashMap* pReturnValue = new (std::nothrow) HashMap();
794 pReturnValue->Construct();
796 int groupIndex = (__selectedIndex >> LIST_VIEW_GROUP_INDEX_SHIFT) & LIST_VIEW_MASK;
797 int itemIndex = __selectedIndex & LIST_VIEW_MASK;
799 if (pContactsApp->GetReturnType() == APP_CONTROL_RETURN_TYPE_PHONE)
801 pList = __pPresentationModel->GetAllPhoneNumbersN(groupIndex, itemIndex);
802 String* pPhoneNumberInfo = static_cast<String *>(pList->GetAt(index));
804 ArrayList* pValueList = new (std::nothrow) ArrayList();
805 pValueList->Construct();
807 pPhoneNumberInfo->IndexOf(CHARACTER_SPACE, 0, blankIndex);
808 pPhoneNumberInfo->Remove(0, blankIndex + 1);
809 pValueList->Add(new (std::nothrow) String(*pPhoneNumberInfo));
810 pReturnValue->Add(new (std::nothrow) String(CONTACT_KEY_PHONE), pValueList);
812 else if (pContactsApp->GetReturnType() == APP_CONTROL_RETURN_TYPE_EMAIL)
814 pList = __pPresentationModel->GetAllEmailsN(groupIndex, itemIndex);
815 String* pEmailInfo = static_cast<String *>(pList->GetAt(index));
817 ArrayList* pValueList = new (std::nothrow) ArrayList();
818 pValueList->Construct();
820 pEmailInfo->IndexOf(CHARACTER_SPACE, 0, blankIndex);
821 pEmailInfo->Remove(0, blankIndex + 1);
822 pValueList->Add(new (std::nothrow) String(*pEmailInfo));
823 pReturnValue->Add(new (std::nothrow) String(CONTACT_KEY_EMAIL), pValueList);
828 ReturnValues(pContactsApp->GetRequestId(), APP_CTRL_RESULT_SUCCEEDED, pReturnValue);
832 GroupContactListForm::OnListViewItemSwept(Tizen::Ui::Controls::ListView& listView, int index, Tizen::Ui::Controls::SweepDirection direction)
837 GroupContactListForm::OnSearchBarModeChanged(Tizen::Ui::Controls::SearchBar& source, SearchBarMode mode)
839 if (mode == SEARCH_BAR_MODE_NORMAL)
841 __pListView->SetShowState(true);
842 __pSearchListView->SetShowState(false);
843 __pPresentationModel->ResetSearchedContactList();
844 __pSearchListView->UpdateList();
845 __pListView->UpdateList();
849 //[TODO] to restore swept item.
850 // need to be fixed with better idea..
851 Rectangle bounds = __pListView->GetBounds();
852 __pListView->SetBounds(bounds.x, bounds.y, bounds.width, bounds.height + 1);
853 __pListView->Invalidate(true);
854 __pListView->SetBounds(bounds);
859 GroupContactListForm::OnTextValueChanged(const Tizen::Ui::Control& source)
861 String searchText = __pSearchBar->GetText();
864 ContactsApp* pContactsApp = static_cast<ContactsApp*>(ContactsApp::GetInstance());
865 if (pContactsApp->GetReturnType() == APP_CONTROL_RETURN_TYPE_PHONE)
867 __pPresentationModel->SetSearchText(searchText, SEARCH_TYPE_HAS_PHONE_ONLY);
869 else if (pContactsApp->GetReturnType() == APP_CONTROL_RETURN_TYPE_EMAIL)
871 __pPresentationModel->SetSearchText(searchText, SEARCH_TYPE_HAS_EMAIL_ONLY);
875 __pPresentationModel->SetSearchText(searchText, SEARCH_TYPE_NORMAL);
878 if (searchText.GetLength() != 0)
880 __pSearchListView->SetShowState(true);
881 __pListView->SetShowState(false);
885 __pSearchListView->SetShowState(false);
886 __pListView->SetShowState(true);
889 __pSearchListView->UpdateList();
893 GroupContactListForm::OnFastScrollIndexSelected (Tizen::Ui::Control& source, Tizen::Base::String& index)
895 __pListView->ScrollToItem(__pPresentationModel->GetKeyIndex(index), -1);
896 __pListView->Invalidate(false);
900 GroupContactListForm::OnFocusGained(const Tizen::Ui::Control& source)
902 if (source.Equals(*__pSearchBar))
904 if (__pListView->GetShowState() == true )
906 int groupCount = __pPresentationModel->GetKeyCount();
907 bool isContextItemOpenend = false;
909 for (int i = 0; i < groupCount; i++)
911 int contactCount = __pPresentationModel->GetContactCount(i);
912 for (int j = 0; j < contactCount; j++)
914 if (__pListView->IsContextItemOpened(i, j) == true)
916 isContextItemOpenend = true;
922 if (isContextItemOpenend == true)
924 __pListView->UpdateList();
927 else if (__pSearchListView->GetShowState() == true )
930 bool isContextItemOpenend = false;
932 if (__pSearchListEvent == null)
936 groupCount = __pSearchListEvent->GetGroupCount();
937 for (int i = 0; i < groupCount; i++)
939 int contactCount = __pSearchListEvent->GetItemCount(i);
940 for (int j = 0; j < contactCount; j++)
942 if (__pSearchListView->IsContextItemOpened(i, j) == true)
944 isContextItemOpenend = true;
950 if (isContextItemOpenend == true)
952 __pSearchListView->UpdateList();
959 GroupContactListForm::OnFocusLost(const Tizen::Ui::Control& source)
964 GroupContactListForm::OnTextValueChangeCanceled(const Tizen::Ui::Control& source)
969 GroupContactListForm::OnContactsChanged(void)
971 HideContactValuePopup();
974 if (__isCategoryUpdating)
976 __isCategoryUpdating = false;
981 if (__categoryId == ID_GROUP_CONTACT_NOT_ASSIGNED)
983 __pPresentationModel->InitializeGroupContactList(Tizen::Social::INVALID_RECORD_ID);
987 __pPresentationModel->InitializeGroupContactList(__categoryId);
990 if (__pSearchBar->GetMode() == SEARCH_BAR_MODE_INPUT)
992 __pSearchBar->SetMode(SEARCH_BAR_MODE_NORMAL);
996 if (__categoryId != ID_GROUP_CONTACT_NOT_ASSIGNED)
998 Footer* pFooter = GetFooter();
1000 if (__pPresentationModel->GetAllContactsCount() <= __pPresentationModel->GetContactCount())
1002 pFooter->SetItemEnabled(0, false);
1003 pFooter->Invalidate(true);
1007 pFooter->SetItemEnabled(0, true);
1008 pFooter->Invalidate(true);
1011 if (__pPresentationModel->GetContactCount() > 0)
1013 SetFormMenuEventListener(this);
1017 SetFormMenuEventListener(null);
1021 if (__pPresentationModel->GetContactCount() > 0)
1023 __pSearchBar->SetShowState(true);
1024 __pListView->SetShowState(true);
1025 __pEmptyImageLabel->SetShowState(false);
1026 __pEmptyCommentLabel->SetShowState(false);
1028 __pPresentationModel->InitializeContactList();
1029 __pListView->SetFastScrollIndex(__pPresentationModel->GetAllKeys(), false);
1030 __pListView->UpdateList();
1034 __pSearchBar->SetShowState(false);
1035 __pListView->SetShowState(false);
1036 __pEmptyImageLabel->SetShowState(true);
1037 __pEmptyCommentLabel->SetShowState(true);
1042 GroupContactListForm::OnCategoriesChanged(void)
1044 if (__pPresentationModel->IsCategoryValid() == false)
1046 SceneManager::GetInstance()->GoBackward(BackwardSceneTransition(IDSCN_GROUP_LIST));
1051 GroupContactListForm::ShowDeletePopup(void)
1053 if (__pDeletePopup == null)
1055 __pDeletePopup = new (std::nothrow) Popup();
1056 __pDeletePopup->Construct(false, Dimension(W_DELETE_POPUP, H_DELETE_POPUP));
1057 __pDeletePopup->SetPropagatedKeyEventListener(this);
1059 Rectangle popupClientBounds = __pDeletePopup->GetClientAreaBounds();
1061 Label* pLabel = new (std::nothrow) Label();
1062 pLabel->Construct(Rectangle(X_DELETE_LABEL, Y_DELETE_LABEL, W_DELETE_LABEL, H_DELETE_LABEL), ResourceManager::GetString(L"IDS_COM_POP_DELETE_Q"));
1063 pLabel->SetTextConfig(FONT_SIZE_DELETE_CONFIRM, LABEL_TEXT_STYLE_NORMAL);
1064 pLabel->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
1065 pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
1067 Button* pDeleteButton = new (std::nothrow) Button();
1068 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"));
1069 pDeleteButton->SetColor(BUTTON_STATUS_NORMAL, COLOR_DELETE_BUTTON_NORMAL);
1070 pDeleteButton->SetColor(BUTTON_STATUS_PRESSED, COLOR_DELETE_BUTTON_PRESSED);
1071 pDeleteButton->SetTextColor(COLOR_DELETE_BUTTON_TEXT);
1072 pDeleteButton->SetTextSize(FONT_SIZE_DELETE_BUTTON);
1073 pDeleteButton->SetActionId(IDA_POPUP_DELETE_YES);
1074 pDeleteButton->AddActionEventListener(*this);
1076 Button* pCancelButton = new (std::nothrow) Button();
1077 pCancelButton->Construct(Rectangle(X_DELETE_LABEL, Y_DELETE_BUTTON, W_DELETE_BUTTON, H_DELETE_BUTTON), ResourceManager::GetString(L"IDS_PB_SK_CANCEL"));
1078 pCancelButton->SetTextSize(FONT_SIZE_DELETE_BUTTON);
1079 pCancelButton->SetActionId(IDA_POPUP_DELETE_CANCEL);
1080 pCancelButton->AddActionEventListener(*this);
1082 __pDeletePopup->AddControl(pLabel);
1083 __pDeletePopup->AddControl(pDeleteButton);
1084 __pDeletePopup->AddControl(pCancelButton);
1087 __pDeletePopup->SetShowState(true);
1088 __pDeletePopup->Show();
1092 GroupContactListForm::HideDeletePopup(void)
1094 if (__pDeletePopup != null)
1096 __pDeletePopup->SetShowState(false);
1100 delete __pContactValueListEvent;
1101 __pContactValueListEvent = null;
1105 GroupContactListForm::ShowContactValuePopup(int groupIndex, int itemIndex)
1107 delete __pMultipleContactValuePopup;
1108 __pMultipleContactValuePopup = new (std::nothrow) Popup();
1109 __pMultipleContactValuePopup->Construct(true, Dimension(W_CONTACT_VALUE_POPUP, H_CONTACT_VALUE_POPUP));
1110 __pMultipleContactValuePopup->SetTitleText(__pPresentationModel->GetName(groupIndex, itemIndex));
1111 __pMultipleContactValuePopup->SetPropagatedKeyEventListener(this);
1113 Rectangle popupClientBounds = __pMultipleContactValuePopup->GetClientAreaBounds();
1115 ListView* pListView = new (std::nothrow) ListView();
1116 pListView->Construct(Rectangle(0, 0, popupClientBounds.width, H_CONTACT_VALUE_POPUP_LIST_VIEW));
1117 pListView->SetItemProvider(*__pContactValueListEvent);
1118 pListView->AddListViewItemEventListener(*this);
1120 __pMultipleContactValuePopup->AddControl(pListView);
1122 Button* pCancelButton = new (std::nothrow) Button();
1123 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"));
1124 pCancelButton->SetActionId(IDA_POPUP_CONTACT_VALUE_CLOSE);
1125 pCancelButton->AddActionEventListener(*this);
1127 __pMultipleContactValuePopup->AddControl(pCancelButton);
1128 __pMultipleContactValuePopup->SetShowState(true);
1129 __pMultipleContactValuePopup->Show();
1133 GroupContactListForm::HideContactValuePopup(void)
1135 if (__pMultipleContactValuePopup != null)
1137 __pMultipleContactValuePopup->SetShowState(false);
1143 GroupContactListForm::ParseAppControlArgument(const Tizen::Base::String& argument, Tizen::Base::String& type, Tizen::Base::String& content)
1145 result r = E_SUCCESS;
1147 if (argument.IsEmpty() || argument.Contains(DELIMITER) == false)
1152 StringTokenizer stringToken(argument, DELIMITER);
1154 r = stringToken.GetNextToken(type);
1155 TryReturn(r == E_SUCCESS, r, "[%s] Unable to get type", GetErrorMessage(r));
1157 r = stringToken.GetNextToken(content);
1158 TryReturn(r == E_SUCCESS, r, "[%s] Unable to get content", GetErrorMessage(r));
1164 GroupContactListForm::ReturnValues(RequestId requestId, Tizen::App::AppCtrlResult appCtrlResult, const Tizen::Base::Collection::IMap* pReturnValue)
1166 AppControlProviderManager* pAppManager = AppControlProviderManager::GetInstance();
1168 result r = pAppManager->SendAppControlResult(requestId, appCtrlResult, pReturnValue);
1169 AppLogDebug("[%s] The return result from SendAppControlResult(), AppCtrlResult value : %d.", GetErrorMessage(r), appCtrlResult);
1171 UiApp::GetInstance()->Terminate();
1175 GroupContactListForm::LaunchAppControl(const Tizen::App::AppId& appId, const Tizen::Base::String& operationId, const Tizen::Base::String& argument, const Tizen::Base::String& type)
1177 result r = E_SUCCESS;
1179 if (__pAppControl != null)
1186 extraData.Construct();
1188 if (appId.Equals(String(PROVIDER_ID_PHONE)))
1190 uri.Append(INPUT_URI_TEL);
1191 uri.Append(argument);
1192 extraData.Add(new (std::nothrow) String(INPUT_KEY_CALL_TYPE), new (std::nothrow) String(type));
1194 else if (appId.Equals(String(PROVIDER_ID_MESSAGE)))
1196 extraData.Add(new (std::nothrow) String(INPUT_KEY_MESSAGE_TO), new (std::nothrow) String(argument));
1197 extraData.Add(new (std::nothrow) String(INPUT_KEY_MESSAGE_TYPE), new (std::nothrow) String(INPUT_TYPE_SMS));
1200 __pAppControl = AppManager::FindAppControlN(appId, operationId);
1201 if (__pAppControl != null)
1203 r = __pAppControl->Start(&uri, null, &extraData, null);
1206 AppLogDebug("[%s] Unable to launch app control", GetErrorMessage(r));
1210 if (__pListView->GetShowState() == true)
1212 __pListView->SetEnabled(false);
1215 if (__pSearchListView->GetShowState() == true)
1217 __pSearchListView->SetEnabled(false);
1222 extraData.RemoveAll(true);
1228 GroupContactListForm::OnKeypadWillOpen(Tizen::Ui::Control& source)
1233 GroupContactListForm::OnKeypadOpened(Tizen::Ui::Control& source)
1235 __pSearchListView->SetSize(__pListView->GetWidth(), GetClientAreaBounds().height - __pSearchBar->GetHeight());
1239 GroupContactListForm::OnKeypadClosed(Tizen::Ui::Control& source)
1241 if (__categoryId == ID_GROUP_CONTACT_NOT_ASSIGNED)
1243 __pPresentationModel->InitializeGroupContactList(Tizen::Social::INVALID_RECORD_ID);
1244 GetFooter()->SetShowState(false);
1248 ContactsApp* pContactsApp = static_cast<ContactsApp*>(ContactsApp::GetInstance());
1249 __pPresentationModel->InitializeGroupContactList(__categoryId);
1250 if (pContactsApp->GetOperationId() != OPERATION_ID_PICK)
1252 GetFooter()->SetShowState(true);
1255 __pListView->SetSize(__pListView->GetWidth(), GetClientAreaBounds().height - __pSearchBar->GetHeight());
1256 __pSearchListView->SetSize(__pListView->GetWidth(), GetClientAreaBounds().height - __pSearchBar->GetHeight());
1261 GroupContactListForm::OnKeypadBoundsChanged(Tizen::Ui::Control& source)
1263 __pSearchListView->SetSize(__pListView->GetWidth(), GetClientAreaBounds().height - __pSearchBar->GetHeight());
1267 GroupContactListForm::OnKeypadActionPerformed(Tizen::Ui::Control& source, Tizen::Ui::KeypadAction keypadAction)
1269 if (keypadAction == KEYPAD_ACTION_SEARCH)
1271 __pSearchBar->HideKeypad();
1276 GroupContactListForm::OnForeground(void)
1278 delete __pAppControl;
1279 __pAppControl = null;
1281 if (__pListView->IsEnabled() == false)
1283 __pListView->SetEnabled(true);
1286 if (__pSearchListView->IsEnabled() == false)
1288 __pSearchListView->SetEnabled(true);
1293 GroupContactListForm::OnBackground(void)
1298 GroupContactListForm::OnTouchPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo & touchInfo)
1300 GroupedListView* pList = static_cast<GroupedListView*>(&const_cast<Control&>(source));
1308 GroupContactListForm::OnTouchReleased(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
1313 GroupContactListForm::OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
1318 GroupContactListForm::OnTouchFocusIn(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
1323 GroupContactListForm::OnTouchFocusOut(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
1328 GroupContactListForm::OnKeyPressed(Control& source, const KeyEventInfo& keyEventInfo)
1334 GroupContactListForm::OnKeyReleased(Control& source, const KeyEventInfo& keyEventInfo)
1336 if (keyEventInfo.GetKeyCode() == KEY_BACK || keyEventInfo.GetKeyCode() == KEY_ESC)
1338 if (__pMultipleContactValuePopup && __pMultipleContactValuePopup->GetShowState() == true)
1340 HideContactValuePopup();
1343 else if (__pDeletePopup && __pDeletePopup->GetShowState() == true)
1353 GroupContactListForm::OnPreviewKeyPressed(Control& source, const KeyEventInfo& keyEventInfo)
1359 GroupContactListForm::OnPreviewKeyReleased(Control& source, const KeyEventInfo& keyEventInfo)