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 CtGroupContactListEditorForm.cpp
19 * @brief This is the implementation file for the GroupContactListEditorForm class.
22 #include "CtContactListItem.h"
23 #include "CtContactsApp.h"
24 #include "CtGroupContactListEditorForm.h"
25 #include "CtGroupContactListPresentationModel.h"
26 #include "CtResourceManager.h"
27 #include "CtSearchListEventListener.h"
30 using namespace Tizen::App;
31 using namespace Tizen::Base;
32 using namespace Tizen::Base::Collection;
33 using namespace Tizen::Graphics;
34 using namespace Tizen::Ui;
35 using namespace Tizen::Ui::Controls;
36 using namespace Tizen::Ui::Scenes;
38 static const int IDA_FOOTER_REMOVE = 0;
39 static const int IDA_FOOTER_CANCEL = 1;
40 static const int IDA_FOOTER_DONE = 2;
41 static const int IDA_CHECK_SELECT_ALL_CHECKED = 10;
42 static const int IDA_CHECK_SELECT_ALL_UNCHECKED = 11;
43 static const int IDA_POPUP_CONTACT_VALUE_CLOSE = 20;
45 static const wchar_t* IDB_NO_CONTENTS = L"00_Nocontents_text.png";
47 static const int X_EMPTY_IMAGE = 220;
48 static const int Y_EMPTY_IMAGE = 300;
49 static const int W_EMPTY_IMAGE = 280;
50 static const int H_EMPTY_IMAGE = 280;
51 static const int Y_EMPTY_COMMENT = 618;
52 static const int H_EMPTY_COMMENT = 38;
53 static const int H_GROUP_ITEM = 76;
54 static const int H_LIST_ITEM = 112;
55 static const int H_SELECT_ALL = 112;
56 static const int H_SEARCHBAR = 86;
57 static const int H_BOTTOM_LABEL = 48;
58 static const int W_CONTACT_VALUE_POPUP = 688;
59 static const int H_CONTACT_VALUE_POPUP = 532;
60 static const int H_CONTACT_VALUE_POPUP_LIST_VIEW = 338;
61 static const int Y_CLOSE_BUTTON = 358;
62 static const int H_CLOSE_BUTTON = 74;
63 static const int W_CLOSE_BUTTON = 394;
64 static const int X_LIST_ITEM_TEXT_MARGIN = 32;
65 static const int H_CHECK_LABEL = 72;
66 static const int Y_CHECK_LABEL = 20;
68 static const int FONT_SIZE_BOTTOM_LABEL = 32;
69 static const int FONT_SIZE_EMPTY_COMMENT = 32;
71 static const unsigned int COLOR_BOTTOM_LABEL_BG = Color32<68, 68, 68>::Value;
72 static const unsigned int COLOR_BOTTOM_LABEL_FONT = Color32<255, 255, 255>::Value;
73 static const unsigned int COLOR_EMPTY_COMMENT = Color32<102, 102, 102>::Value;
74 static const unsigned int COLOR_CHECK_LABEL_BG = Color32<220, 218, 211>::Value;
76 static const int LIST_VIEW_GROUP_INDEX_SHIFT = 16;
77 static const int LIST_VIEW_MASK = 0xFFFF;
79 static const wchar_t* INPUT_KEY_MESSAGE_TYPE = L"http://tizen.org/appcontrol/data/message/type";
80 static const wchar_t* INPUT_KEY_TO = L"http://tizen.org/appcontrol/data/to";
81 static const wchar_t* INPUT_TYPE_SMS = L"sms";
83 GroupContactListEditorForm::GroupContactListEditorForm(void)
84 : __pContactValueListEvent(null)
85 , __pPresentationModel(null)
86 , __pSearchListEvent(null)
88 , __pTempContactValueHashMap(null)
90 , __pSelectAllButton(null)
92 , __pSearchListView(null)
94 , __pBottomLabel(null)
95 , __pEmptyImageLabel(null)
96 , __pEmptyCommentLabel(null)
97 , __pMultipleContactValuePopup(null)
100 , __selectedSearchIndex(-1)
104 GroupContactListEditorForm::~GroupContactListEditorForm(void)
109 GroupContactListEditorForm::Initialize(void)
111 Construct(FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR | FORM_STYLE_HEADER | FORM_STYLE_FOOTER);
115 GroupContactListEditorForm::OnInitializing(void)
117 SetFormBackEventListener(this);
119 __pPresentationModel = GroupContactListPresentationModel::GetInstance();
121 __pCheckLabel = new (std::nothrow) Label();
122 __pCheckLabel->Construct(Rectangle(0, H_SEARCHBAR + Y_CHECK_LABEL, GetClientAreaBounds().width, H_CHECK_LABEL), L"");
123 __pCheckLabel->SetBackgroundColor(COLOR_CHECK_LABEL_BG);
124 AddControl(__pCheckLabel);
126 __pSelectAllButton = new (std::nothrow) CheckButton();
127 __pSelectAllButton->Construct(Rectangle(0, H_SEARCHBAR, GetClientAreaBounds().width, H_SELECT_ALL), CHECK_BUTTON_STYLE_MARK, BACKGROUND_STYLE_NONE);
128 __pSelectAllButton->SetText(ResourceManager::GetString(L"IDS_COM_BODY_SELECT_ALL"));
129 __pSelectAllButton->SetActionId(IDA_CHECK_SELECT_ALL_CHECKED, IDA_CHECK_SELECT_ALL_UNCHECKED);
130 __pSelectAllButton->AddActionEventListener(*this);
131 AddControl(__pSelectAllButton);
133 __pListView = new (std::nothrow) GroupedListView();
134 __pListView->Construct(Rectangle(0, H_SEARCHBAR + H_SELECT_ALL, GetClientAreaBounds().width, GetClientAreaBounds().height - H_SEARCHBAR - H_SELECT_ALL - H_BOTTOM_LABEL), 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->AddTextEventListener(*this);
146 __pSearchBar->AddKeypadEventListener(*this);
147 __pSearchBar->SetContentAreaSize(Dimension(0, 0));
149 __pSearchListEvent = new (std::nothrow) SearchListEventListener(LIST_ANNEX_STYLE_MARK, __pPresentationModel);
150 AddControl(__pSearchBar);
152 __pSearchListView = new (std::nothrow) GroupedListView();
153 __pSearchListView->Construct(Rectangle(0, H_SEARCHBAR, GetClientAreaBounds().width, GetClientAreaBounds().height - H_SEARCHBAR - H_BOTTOM_LABEL), GROUPED_LIST_VIEW_STYLE_INDEXED, true, false);
154 __pSearchListView->SetItemProvider(*__pSearchListEvent);
155 __pSearchListView->AddGroupedListViewItemEventListener(*this);
156 __pSearchListView->AddTouchEventListener(*this);
157 __pSearchListView->SetTextOfEmptyList(ResourceManager::GetString(L"IDS_PB_BODY_NO_CONTACTS"));
158 __pSearchListView->SetShowState(false);
159 AddControl(__pSearchListView);
161 __pEmptyImageLabel = new (std::nothrow) Label();
162 __pEmptyImageLabel->Construct(Rectangle(X_EMPTY_IMAGE, Y_EMPTY_IMAGE, W_EMPTY_IMAGE, H_EMPTY_IMAGE), L"");
163 Bitmap* pBitmap = ResourceManager::GetBitmapN(IDB_NO_CONTENTS);
166 __pEmptyImageLabel->SetBackgroundBitmap(*pBitmap);
169 __pEmptyImageLabel->SetShowState(false);
171 AddControl(__pEmptyImageLabel);
173 __pEmptyCommentLabel = new (std::nothrow) Label();
174 __pEmptyCommentLabel->Construct(Rectangle(0, Y_EMPTY_COMMENT, GetClientAreaBounds().width, H_EMPTY_COMMENT),
175 ResourceManager::GetString(L"IDS_PB_BODY_NO_CONTACTS"));
176 __pEmptyCommentLabel->SetTextConfig(FONT_SIZE_EMPTY_COMMENT, LABEL_TEXT_STYLE_NORMAL);
177 __pEmptyCommentLabel->SetTextColor(Color(COLOR_EMPTY_COMMENT));
178 __pEmptyCommentLabel->SetShowState(false);
180 AddControl(__pEmptyCommentLabel);
182 __pBottomLabel = new (std::nothrow) Label();
183 __pBottomLabel->Construct(FloatRectangle(0, GetClientAreaBoundsF().height - H_BOTTOM_LABEL, GetClientAreaBoundsF().width, H_BOTTOM_LABEL),
184 ResourceManager::GetString(L"IDS_COM_POP_SELECTED") + INITIAL_SELECTED_COUNT);
185 __pBottomLabel->SetBackgroundColor(Color(COLOR_BOTTOM_LABEL_BG));
186 __pBottomLabel->SetTextColor(Color(COLOR_BOTTOM_LABEL_FONT));
187 __pBottomLabel->SetTextConfig(FONT_SIZE_BOTTOM_LABEL, LABEL_TEXT_STYLE_BOLD);
188 __pBottomLabel->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
189 __pBottomLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
190 AddControl(__pBottomLabel);
192 __pTempContactValueHashMap = new (std::nothrow) HashMap();
193 __pTempContactValueHashMap->Construct();
199 GroupContactListEditorForm::OnTerminating(void)
201 if (__pPresentationModel != null)
203 __pPresentationModel->RemoveContactChangeListener(*this);
205 if (__pContactValueListEvent)
207 delete __pContactValueListEvent;
210 delete __pAppControl;
211 __pTempContactValueHashMap->RemoveAll(true);
212 delete __pTempContactValueHashMap;
213 delete __pSearchListEvent;
214 delete __pMultipleContactValuePopup;
220 GroupContactListEditorForm::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
222 SceneManager* pSceneManager = SceneManager::GetInstance();
223 pSceneManager->GoBackward(BackwardSceneTransition(IDSCN_GROUP_LIST, SCENE_TRANSITION_ANIMATION_TYPE_RIGHT));
227 GroupContactListEditorForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
229 ContactsApp* pContactsApp = static_cast<ContactsApp*>(ContactsApp::GetInstance());
230 SceneManager* pSceneManager = SceneManager::GetInstance();
234 case IDA_FOOTER_REMOVE:
236 RemoveSelectedContacts();
237 pSceneManager->GoBackward(BackwardSceneTransition(IDSCN_GROUP_CONTACT_LIST));
240 case IDA_FOOTER_CANCEL:
242 pSceneManager->GoBackward(BackwardSceneTransition(IDSCN_GROUP_CONTACT_LIST));
245 case IDA_CHECK_SELECT_ALL_CHECKED:
247 for (int groupIndex = 0; groupIndex < __pListView->GetGroupCount(); groupIndex++)
249 int itemCount = __pListView->GetItemCountAt(groupIndex);
250 for (int itemIndex = 0; itemIndex < itemCount; itemIndex++)
252 __pListView->SetItemChecked(groupIndex, itemIndex, true);
255 index |= groupIndex << LIST_VIEW_GROUP_INDEX_SHIFT;
257 Integer hashMapIndex(index);
259 if (pContactsApp->GetReturnType() == APP_CONTROL_RETURN_TYPE_PHONE || __launchType == ID_GROUP_CONTACT_SELECT_MESSAGE)
261 if (__pTempContactValueHashMap->GetValue(hashMapIndex) == null)
263 String phoneNumber = __pPresentationModel->GetDefaultPhoneNumber(groupIndex, itemIndex);
264 __pTempContactValueHashMap->Add(*(new (std::nothrow) Integer(index)), *(new (std::nothrow) String(phoneNumber)));
267 else if (pContactsApp->GetReturnType() == APP_CONTROL_RETURN_TYPE_EMAIL || __launchType == ID_GROUP_CONTACT_SELECT_EMAIL)
269 if (__pTempContactValueHashMap->GetValue(hashMapIndex) == null)
271 String email = __pPresentationModel->GetDefaultEmail(groupIndex, itemIndex);
272 __pTempContactValueHashMap->Add(*(new (std::nothrow) Integer(index)), *(new (std::nothrow) String(email)));
277 __pListView->Invalidate(true);
281 case IDA_CHECK_SELECT_ALL_UNCHECKED:
283 for (int groupIndex = 0; groupIndex < __pListView->GetGroupCount(); groupIndex++)
285 int itemCount = __pListView->GetItemCountAt(groupIndex);
286 for (int itemIndex = 0; itemIndex < itemCount; itemIndex++)
288 __pListView->SetItemChecked(groupIndex, itemIndex, false);
291 __pTempContactValueHashMap->RemoveAll(true);
292 __pListView->Invalidate(true);
296 case IDA_FOOTER_DONE:
298 if (__launchType == ID_GROUP_CONTACT_SELECT_MESSAGE ||
299 __launchType == ID_GROUP_CONTACT_SELECT_EMAIL)
305 ReturnMultipleValues();
309 case IDA_POPUP_CONTACT_VALUE_CLOSE:
311 HideContactValuePopup();
320 GroupContactListEditorForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList *pArgs)
322 ContactsApp* pContactsApp = static_cast<ContactsApp*>(ContactsApp::GetInstance());
326 Integer* pCategoryId = null;
328 IEnumerator* pEnum = pArgs->GetEnumeratorN();
329 if (pEnum->MoveNext() == E_SUCCESS)
331 pCategoryId = static_cast<Integer*>(pEnum->GetCurrent());
333 if (pEnum->MoveNext() == E_SUCCESS)
335 Integer* pItemTypeForLaunchAppControl = static_cast<Integer*>(pEnum->GetCurrent());
336 if (pItemTypeForLaunchAppControl != null)
338 __launchType = pItemTypeForLaunchAppControl->ToInt();
342 if (pCategoryId != null)
344 Header* pHeader = GetHeader();
345 if (pCategoryId->ToInt() == ID_GROUP_CONTACT_NOT_ASSIGNED)
347 if (__launchType == ID_GROUP_CONTACT_SELECT_MESSAGE)
349 __pPresentationModel->InitializeGroupContactList(Tizen::Social::INVALID_RECORD_ID, GROUP_CONTACT_LAUNCH_TYPE_MESSAGE);
351 else if (__launchType == ID_GROUP_CONTACT_SELECT_EMAIL)
353 __pPresentationModel->InitializeGroupContactList(Tizen::Social::INVALID_RECORD_ID, GROUP_CONTACT_LAUNCH_TYPE_EMAIL);
357 __pPresentationModel->InitializeGroupContactList(Tizen::Social::INVALID_RECORD_ID);
359 pHeader->SetTitleText(ResourceManager::GetString(L"IDS_PB_BODY_NOT_ASSIGNED"));
363 if (__launchType == ID_GROUP_CONTACT_SELECT_MESSAGE)
365 __pPresentationModel->InitializeGroupContactList(pCategoryId->ToInt(), GROUP_CONTACT_LAUNCH_TYPE_MESSAGE);
367 else if (__launchType == ID_GROUP_CONTACT_SELECT_EMAIL)
369 __pPresentationModel->InitializeGroupContactList(pCategoryId->ToInt(), GROUP_CONTACT_LAUNCH_TYPE_EMAIL);
373 __pPresentationModel->InitializeGroupContactList(pCategoryId->ToInt());
375 pHeader->SetTitleText(__pPresentationModel->GetCategoryName());
378 __pListView->SetFastScrollIndex(__pPresentationModel->GetAllKeys(), false);
381 pArgs->RemoveAll(true);
385 Footer* pFooter = GetFooter();
387 if (pContactsApp->GetOperationId() == OPERATION_ID_PICK || __launchType != 0)
389 AppLogDebug("kamesh: OPERATION_ID_PICK || __launchType != 0");
390 pFooter->SetShowState(true);
392 FooterItem footerItemDone;
393 footerItemDone.Construct(IDA_FOOTER_DONE);
394 footerItemDone.SetText(ResourceManager::GetString(L"IDS_COM_SK_DONE"));
395 pFooter->AddItem(footerItemDone);
396 pFooter->SetItemEnabled(0, false);
398 if (__pPresentationModel->GetContactCount() == 0)
400 __pSearchBar->SetShowState(false);
401 __pListView->SetShowState(false);
402 __pCheckLabel->SetShowState(false);
403 __pSelectAllButton->SetShowState(false);
404 __pEmptyImageLabel->SetShowState(true);
405 __pEmptyCommentLabel->SetShowState(true);
406 __pBottomLabel->SetShowState(false);
411 FooterItem footerItemCancel;
412 footerItemCancel.Construct(IDA_FOOTER_CANCEL);
413 footerItemCancel.SetText(ResourceManager::GetString(L"IDS_PB_SK_CANCEL"));
415 FooterItem footerItemRemove;
416 footerItemRemove.Construct(IDA_FOOTER_REMOVE);
417 footerItemRemove.SetText(ResourceManager::GetString(L"IDS_COM_BODY_REMOVE"));
419 pFooter->AddItem(footerItemCancel);
420 pFooter->AddItem(footerItemRemove);
421 pFooter->SetItemEnabled(1, false);
424 pContactsApp->AddContactsAppChangeEventListener(*this);
427 __pPresentationModel->AddContactChangeListener(*this);
428 pFooter->AddActionEventListener(*this);
432 GroupContactListEditorForm::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId)
434 if (__pSearchBar->GetMode() == SEARCH_BAR_MODE_INPUT)
436 __pSearchBar->SetMode(SEARCH_BAR_MODE_NORMAL);
439 ContactsApp* pContactsApp = static_cast<ContactsApp*>(ContactsApp::GetInstance());
441 if (__launchType != 0)
443 pContactsApp->RemoveContactsAppChangeEventListener(*this);
445 delete __pAppControl;
446 __pAppControl = null;
450 pContactsApp->RemoveContactsAppChangeEventListener(*this);
453 __pPresentationModel->RemoveContactChangeListener(*this);
457 GroupContactListEditorForm::OnSearchBarModeChanged(Tizen::Ui::Controls::SearchBar& source, Tizen::Ui::Controls::SearchBarMode mode)
459 if (mode == SEARCH_BAR_MODE_NORMAL)
461 int searchedCount = __pPresentationModel->GetSearchedContactCount();
462 bool isChecked = true;
464 for (int index = 0; index < searchedCount; index++)
469 __pPresentationModel->GetItemMainIndex(index, groupIndex, itemIndex);
471 __pListView->SetItemChecked(groupIndex, itemIndex, __pSearchListView->IsItemChecked(0, index));
474 for (int groupIndex = 0; groupIndex < __pListView->GetGroupCount() && isChecked == true; groupIndex++)
476 int itemCount = __pListView->GetItemCountAt(groupIndex);
477 for (int itemIndex = 0; itemIndex < itemCount; itemIndex++)
479 if (__pListView->IsItemChecked(groupIndex, itemIndex) == false)
487 __pListView->SetShowState(true);
488 __pListView->Invalidate(true);
489 __pCheckLabel->SetShowState(true);
490 __pSelectAllButton->SetShowState(true);
491 __pSelectAllButton->SetSelected(isChecked);
492 __pSearchListView->SetShowState(false);
493 __pPresentationModel->ResetSearchedContactList();
494 __pSearchListView->UpdateList();
501 GroupContactListEditorForm::OnTextValueChanged(const Tizen::Ui::Control& source)
503 String searchText = __pSearchBar->GetText();
506 ContactsApp* pContactsApp = static_cast<ContactsApp*>(ContactsApp::GetInstance());
507 if (pContactsApp->GetReturnType() == APP_CONTROL_RETURN_TYPE_PHONE || __launchType == ID_GROUP_CONTACT_SELECT_MESSAGE)
509 __pPresentationModel->SetSearchText(searchText, SEARCH_TYPE_HAS_PHONE_ONLY);
511 else if (pContactsApp->GetReturnType() == APP_CONTROL_RETURN_TYPE_EMAIL || __launchType == ID_GROUP_CONTACT_SELECT_EMAIL)
513 __pPresentationModel->SetSearchText(searchText, SEARCH_TYPE_HAS_EMAIL_ONLY);
517 __pPresentationModel->SetSearchText(searchText, SEARCH_TYPE_NORMAL);
520 if (searchText.GetLength() != 0)
522 __pCheckLabel->SetShowState(false);
523 __pSelectAllButton->SetShowState(false);
524 __pListView->SetShowState(false);
525 __pSearchListView->SetShowState(true);
527 __pSearchListView->UpdateList();
529 int searchedCount = __pPresentationModel->GetSearchedContactCount();
531 for (int index = 0; index < searchedCount; index++)
536 __pPresentationModel->GetItemMainIndex(index, groupIndex, itemIndex);
537 __pSearchListView->SetItemChecked(0, index, __pListView->IsItemChecked(groupIndex, itemIndex));
540 __pSearchListView->Invalidate(true);
544 __pCheckLabel->SetShowState(true);
545 __pSelectAllButton->SetShowState(true);
546 __pListView->SetShowState(true);
547 __pSearchListView->SetShowState(false);
549 int count = __pPresentationModel->GetSearchedContactCount();
550 bool isChecked = true;
552 for (int index = 0; index < count; index++)
557 __pPresentationModel->GetItemMainIndex(index, groupIndex, itemIndex);
558 __pListView->SetItemChecked(groupIndex, itemIndex, __pSearchListView->IsItemChecked(0, index));
561 for (int groupIndex = 0; groupIndex < __pListView->GetGroupCount() && isChecked == true; groupIndex++)
563 int itemCount = __pListView->GetItemCountAt(groupIndex);
564 for (int itemIndex = 0; itemIndex < itemCount; itemIndex++)
566 if (__pListView->IsItemChecked(groupIndex, itemIndex) == false)
574 __pSelectAllButton->SetSelected(isChecked);
575 __pListView->Invalidate(true);
580 GroupContactListEditorForm::OnTextValueChangeCanceled(const Tizen::Ui::Control& source)
585 GroupContactListEditorForm::GetGroupCount(void)
587 return __pPresentationModel->GetKeyCount();
591 GroupContactListEditorForm::GetItemCount(int groupIndex)
593 return __pPresentationModel->GetContactCount(groupIndex);
596 Tizen::Ui::Controls::ListItemBase*
597 GroupContactListEditorForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
600 Bitmap* pThumbnail = null;
602 ContactsApp *pContactsApp = static_cast<ContactsApp*>(ContactsApp::GetInstance());
604 CustomItem* pItem = new (std::nothrow) CustomItem();
605 pItem->Construct(Dimension(itemWidth, H_LIST_ITEM + pContactsApp->GetFontHeightOffset()), LIST_ANNEX_STYLE_MARK);
607 __pPresentationModel->GetContactItemInfoN(groupIndex, itemIndex, name, pThumbnail);
609 ContactListItem* pCustomElement = new (std::nothrow) ContactListItem(name, pThumbnail);
610 pItem->AddElement(Rectangle(0, 0, itemWidth - (ListItemBase::GetAnnexWidth(LIST_ANNEX_STYLE_MARK) + X_LIST_ITEM_TEXT_MARGIN), H_LIST_ITEM + pContactsApp->GetFontHeightOffset()), 0, *(static_cast<ICustomElement*>(pCustomElement)));
615 Tizen::Ui::Controls::GroupItem*
616 GroupContactListEditorForm::CreateGroupItem(int groupIndex, int itemWidth)
618 GroupItem* pItem = new (std::nothrow) GroupItem();
619 pItem->Construct(Dimension(itemWidth, H_GROUP_ITEM));
620 pItem->SetElement(__pPresentationModel->GetKey(groupIndex), null);
626 GroupContactListEditorForm::DeleteItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth)
628 CustomItem* pCustomItem = static_cast<CustomItem *>(pItem);
629 pCustomItem->RemoveAllElements();
638 GroupContactListEditorForm::DeleteGroupItem(int groupIndex, Tizen::Ui::Controls::GroupItem* pItem, int itemWidth)
647 GroupContactListEditorForm::OnGroupedListViewContextItemStateChanged(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, int elementId, Tizen::Ui::Controls::ListContextItemStatus state)
652 GroupContactListEditorForm::OnGroupedListViewItemStateChanged(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, int elementId, Tizen::Ui::Controls::ListItemStatus state)
654 ContactsApp* pContactsApp = static_cast<ContactsApp*>(ContactsApp::GetInstance());
656 int mainGroupIndex = groupIndex;
657 int mainItemIndex = itemIndex;
659 if (listView.Equals(*__pSearchListView) == true)
661 __selectedSearchIndex = 0;
662 __selectedSearchIndex |= groupIndex << LIST_VIEW_GROUP_INDEX_SHIFT;
663 __selectedSearchIndex |= itemIndex;
665 __pPresentationModel->GetItemMainIndex(itemIndex, mainGroupIndex, mainItemIndex);
669 __selectedIndex |= mainGroupIndex << LIST_VIEW_GROUP_INDEX_SHIFT;
670 __selectedIndex |= mainItemIndex;
672 if (pContactsApp->GetOperationId() == OPERATION_ID_PICK ||
673 __launchType == ID_GROUP_CONTACT_SELECT_MESSAGE ||
674 __launchType == ID_GROUP_CONTACT_SELECT_EMAIL)
676 if (listView.IsItemChecked(groupIndex, itemIndex) == true)
679 if (pContactsApp->GetReturnType() == APP_CONTROL_RETURN_TYPE_PHONE ||
680 __launchType == ID_GROUP_CONTACT_SELECT_MESSAGE)
682 pList = __pPresentationModel->GetAllPhoneNumbersN(mainGroupIndex, mainItemIndex);
686 ReturnResultFailed();
690 if (pList->GetCount() > 1)
692 listView.SetItemChecked(groupIndex, itemIndex, false);
693 __pContactValueListEvent = new (std::nothrow) ContactValueListItemProvider(pList);
694 ShowContactValuePopup(mainGroupIndex, mainItemIndex);
696 else if (pList->GetCount() == 1)
698 String* pContactValueInfo = static_cast<String *>(pList->GetAt(0));
700 pContactValueInfo->IndexOf(CHARACTER_SPACE, 0, blankIndex);
701 pContactValueInfo->Remove(0, blankIndex + 1);
702 __pTempContactValueHashMap->Add(*(new (std::nothrow) Integer(__selectedIndex)), *(new (std::nothrow) String(*pContactValueInfo)));
703 pList->RemoveAll(true);
708 else if (pContactsApp->GetReturnType() == APP_CONTROL_RETURN_TYPE_EMAIL ||
709 __launchType == ID_GROUP_CONTACT_SELECT_EMAIL)
711 pList = __pPresentationModel->GetAllEmailsN(mainGroupIndex, mainItemIndex);
715 ReturnResultFailed();
719 if (pList->GetCount() > 1)
721 listView.SetItemChecked(groupIndex, itemIndex, false);
722 __pContactValueListEvent = new (std::nothrow) ContactValueListItemProvider(pList);
723 ShowContactValuePopup(mainGroupIndex, mainItemIndex);
725 else if (pList->GetCount() == 1)
727 String* pContactValueInfo = static_cast<String *>(pList->GetAt(0));
729 pContactValueInfo->IndexOf(CHARACTER_SPACE, 0, blankIndex);
730 pContactValueInfo->Remove(0, blankIndex + 1);
731 __pTempContactValueHashMap->Add(*(new (std::nothrow) Integer(__selectedIndex)), *(new (std::nothrow) String(*pContactValueInfo)));
732 pList->RemoveAll(true);
740 Integer keyIndex(__selectedIndex);
741 __pTempContactValueHashMap->Remove(keyIndex, true);
745 if (listView.Equals(*__pListView) == true)
747 if (listView.IsItemChecked(groupIndex, itemIndex) == true)
749 bool isChecked = true;
750 for (int groupIndex = 0; groupIndex < listView.GetGroupCount() && isChecked == true; groupIndex++)
752 int itemCount = listView.GetItemCountAt(groupIndex);
753 for (int itemIndex = 0; itemIndex < itemCount; itemIndex++)
755 if (listView.IsItemChecked(groupIndex, itemIndex) == false)
763 __pSelectAllButton->SetSelected(isChecked);
765 else if (listView.IsItemChecked(groupIndex, itemIndex) == false)
767 __pSelectAllButton->SetSelected(false);
770 else if (listView.Equals(*__pSearchListView) == true)
772 int searchedCount = __pPresentationModel->GetSearchedContactCount();
774 for (int index = 0; index < searchedCount; index++)
779 __pPresentationModel->GetItemMainIndex(index, groupIndex, itemIndex);
781 __pListView->SetItemChecked(groupIndex, itemIndex, __pSearchListView->IsItemChecked(0, index));
789 GroupContactListEditorForm::OnGroupedListViewItemSwept(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, Tizen::Ui::Controls::SweepDirection direction)
794 GroupContactListEditorForm::OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListContextItemStatus state)
799 GroupContactListEditorForm::OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListItemStatus status)
801 ContactsApp* pContactsApp = static_cast<ContactsApp*>(ContactsApp::GetInstance());
803 int groupIndex = (__selectedIndex >> LIST_VIEW_GROUP_INDEX_SHIFT) & LIST_VIEW_MASK;
804 int itemIndex = __selectedIndex & LIST_VIEW_MASK;
807 if (pContactsApp->GetReturnType() == APP_CONTROL_RETURN_TYPE_PHONE ||
808 __launchType == ID_GROUP_CONTACT_SELECT_MESSAGE)
810 pList = __pPresentationModel->GetAllPhoneNumbersN(groupIndex, itemIndex);
813 else if (pContactsApp->GetReturnType() == APP_CONTROL_RETURN_TYPE_EMAIL ||
814 __launchType == ID_GROUP_CONTACT_SELECT_EMAIL)
816 pList = __pPresentationModel->GetAllEmailsN(groupIndex, itemIndex);
821 ReturnResultFailed();
825 String* pContactValueInfo = static_cast<String *>(pList->GetAt(index));
827 pContactValueInfo->IndexOf(CHARACTER_SPACE, 0, blankIndex);
828 pContactValueInfo->Remove(0, blankIndex + 1);
829 __pTempContactValueHashMap->Add(*(new (std::nothrow) Integer(__selectedIndex)), *(new (std::nothrow) String(*pContactValueInfo)));
834 HideContactValuePopup();
836 if (__pListView->GetShowState() == true)
838 __pListView->SetItemChecked(groupIndex, itemIndex, true);
840 bool isChecked = true;
841 for (int groupIndex = 0; groupIndex < __pListView->GetGroupCount() && isChecked == true; groupIndex++)
843 int itemCount = __pListView->GetItemCountAt(groupIndex);
844 for (int itemIndex = 0; itemIndex < itemCount; itemIndex++)
846 if (__pListView->IsItemChecked(groupIndex, itemIndex) == false)
854 __pSelectAllButton->SetSelected(isChecked);
858 groupIndex = (__selectedSearchIndex >> LIST_VIEW_GROUP_INDEX_SHIFT) & LIST_VIEW_MASK;
859 itemIndex = __selectedSearchIndex & LIST_VIEW_MASK;
860 __pSearchListView->SetItemChecked(groupIndex, itemIndex, true);
862 int searchedCount = __pPresentationModel->GetSearchedContactCount();
864 for (int index = 0; index < searchedCount; index++)
866 __pPresentationModel->GetItemMainIndex(index, groupIndex, itemIndex);
868 __pListView->SetItemChecked(groupIndex, itemIndex, __pSearchListView->IsItemChecked(0, index));
876 GroupContactListEditorForm::OnListViewItemSwept(Tizen::Ui::Controls::ListView& listView, int index, Tizen::Ui::Controls::SweepDirection direction)
881 GroupContactListEditorForm::OnFastScrollIndexSelected(Tizen::Ui::Control& source, Tizen::Base::String& index)
883 __pListView->ScrollToItem(__pPresentationModel->GetKeyIndex(index), -1);
884 __pListView->Invalidate(false);
888 GroupContactListEditorForm::OnContactsChanged(void)
890 HideContactValuePopup();
892 if (__pSearchBar->GetMode() == SEARCH_BAR_MODE_INPUT)
894 __pSearchBar->SetMode(SEARCH_BAR_MODE_NORMAL);
897 __pPresentationModel->InitializeContactList();
898 if (__pPresentationModel->GetContactCount() == 0)
900 __pSearchBar->SetShowState(false);
901 __pListView->SetShowState(false);
902 __pCheckLabel->SetShowState(false);
903 __pSelectAllButton->SetShowState(false);
904 __pEmptyImageLabel->SetShowState(true);
905 __pEmptyCommentLabel->SetShowState(true);
906 __pBottomLabel->SetShowState(false);
910 __pSearchBar->SetShowState(true);
911 __pListView->SetShowState(true);
912 __pCheckLabel->SetShowState(true);
913 __pSelectAllButton->SetShowState(true);
914 __pEmptyImageLabel->SetShowState(false);
915 __pEmptyCommentLabel->SetShowState(false);
916 __pBottomLabel->SetShowState(true);
919 __pSelectAllButton->SetSelected(false);
921 for (int groupIndex = 0; groupIndex < __pListView->GetGroupCount(); groupIndex++)
923 int itemCount = __pListView->GetItemCountAt(groupIndex);
924 for (int itemIndex = 0; itemIndex < itemCount; itemIndex++)
926 if (__pListView->IsItemChecked(groupIndex, itemIndex) == true)
928 __pListView->SetItemChecked(groupIndex, itemIndex, false);
933 __pListView->SetFastScrollIndex(__pPresentationModel->GetAllKeys(), false);
934 __pListView->UpdateList();
939 GroupContactListEditorForm::OnCategoriesChanged(void)
941 SceneManager::GetInstance()->GoBackward(BackwardSceneTransition(IDSCN_GROUP_LIST,
942 SCENE_TRANSITION_ANIMATION_TYPE_NONE, SCENE_DESTROY_OPTION_DESTROY));
946 GroupContactListEditorForm::RemoveSelectedContacts(void)
948 for (int groupIndex = __pListView->GetGroupCount() - 1; groupIndex >= 0 ; groupIndex--)
950 int itemCount = __pListView->GetItemCountAt(groupIndex) - 1;
951 for (int itemIndex = itemCount; itemIndex >= 0; itemIndex--)
953 if (__pListView->IsItemChecked(groupIndex, itemIndex))
955 __pPresentationModel->RemoveContactFromCategory(groupIndex, itemIndex);
964 GroupContactListEditorForm::UpdateBottomLabel(void)
966 ContactsApp* pContactsApp = static_cast<ContactsApp*>(ContactsApp::GetInstance());
968 int selectedCount = 0;
969 int fotterItemIndex = 1;
971 if (pContactsApp->GetOperationId() == OPERATION_ID_PICK || __launchType != 0)
976 for (int groupIndex = 0; groupIndex < __pListView->GetGroupCount(); groupIndex++)
978 int itemCount = __pListView->GetItemCountAt(groupIndex);
979 for (int itemIndex = 0; itemIndex < itemCount; itemIndex++)
981 if (__pListView->IsItemChecked(groupIndex, itemIndex) == true)
988 String selected = ResourceManager::GetString(L"IDS_COM_POP_SELECTED");
989 selected.Append(L" (");
990 selected.Append(selectedCount);
991 selected.Append(L")");
992 __pBottomLabel->SetText(selected);
993 __pBottomLabel->SetPosition(FloatPoint(0, GetClientAreaBoundsF().height - H_BOTTOM_LABEL));
994 __pBottomLabel->Invalidate(false);
996 Footer* pFooter = GetFooter();
998 if (selectedCount > 0)
1000 if(__pBottomLabel->GetShowState() == false)
1002 __pBottomLabel->SetShowState(true);
1003 __pListView->SetSize(__pListView->GetSize().width, __pListView->GetSize().height - H_BOTTOM_LABEL);
1004 __pSearchListView->SetSize(__pSearchListView->GetSize().width, __pSearchListView->GetSize().height - H_BOTTOM_LABEL);
1006 pFooter->SetItemEnabled(fotterItemIndex, true);
1008 else if (selectedCount == 0)
1010 if (__pBottomLabel->GetShowState() == true)
1012 __pBottomLabel->SetShowState(false);
1013 __pListView->SetSize(__pListView->GetSize().width, __pListView->GetSize().height + H_BOTTOM_LABEL);
1014 __pSearchListView->SetSize(__pSearchListView->GetSize().width, __pSearchListView->GetSize().height + H_BOTTOM_LABEL);
1016 pFooter->SetItemEnabled(fotterItemIndex, false);
1019 pFooter->Invalidate(true);
1025 GroupContactListEditorForm::ShowContactValuePopup(int groupIndex, int itemIndex)
1027 delete __pMultipleContactValuePopup;
1028 __pMultipleContactValuePopup = new (std::nothrow) Popup();
1029 __pMultipleContactValuePopup->Construct(true, Dimension(W_CONTACT_VALUE_POPUP, H_CONTACT_VALUE_POPUP));
1030 __pMultipleContactValuePopup->SetTitleText(__pPresentationModel->GetName(groupIndex, itemIndex));
1031 __pMultipleContactValuePopup->SetPropagatedKeyEventListener(this);
1033 Rectangle popupClientBounds = __pMultipleContactValuePopup->GetClientAreaBounds();
1035 ListView* pListView = new (std::nothrow) ListView();
1036 pListView->Construct(Rectangle(0, 0, popupClientBounds.width, H_CONTACT_VALUE_POPUP_LIST_VIEW));
1037 pListView->SetItemProvider(*__pContactValueListEvent);
1038 pListView->AddListViewItemEventListener(*this);
1040 __pMultipleContactValuePopup->AddControl(pListView);
1042 Button* pCancelButton = new (std::nothrow) Button();
1043 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"));
1044 pCancelButton->SetActionId(IDA_POPUP_CONTACT_VALUE_CLOSE);
1045 pCancelButton->AddActionEventListener(*this);
1047 __pMultipleContactValuePopup->AddControl(pCancelButton);
1048 __pMultipleContactValuePopup->SetShowState(true);
1049 __pMultipleContactValuePopup->Show();
1053 GroupContactListEditorForm::HideContactValuePopup(void)
1055 if (__pMultipleContactValuePopup)
1057 __pMultipleContactValuePopup->SetShowState(false);
1063 GroupContactListEditorForm::ReturnValues(RequestId requestId, Tizen::App::AppCtrlResult appCtrlResult, const Tizen::Base::Collection::IMap* pReturnValue)
1065 AppControlProviderManager* pAppManager = AppControlProviderManager::GetInstance();
1067 result r = pAppManager->SendAppControlResult(requestId, appCtrlResult, pReturnValue);
1068 AppLogDebug("[%s] The return result from SendAppControlResult(), AppCtrlResult value : %d.", GetErrorMessage(r), appCtrlResult);
1070 UiApp::GetInstance()->Terminate();
1074 GroupContactListEditorForm::ReturnMultipleValues(void)
1076 ContactsApp* pContactsApp = static_cast<ContactsApp*>(ContactsApp::GetInstance());
1078 if (pContactsApp->GetOperationId() == OPERATION_ID_PICK)
1080 ArrayList* pValueList = new (std::nothrow) ArrayList();
1081 pValueList->Construct();
1083 HashMap* pReturnValue = new (std::nothrow) HashMap();
1084 pReturnValue->Construct();
1086 if (pContactsApp->GetReturnType() == APP_CONTROL_RETURN_TYPE_PHONE)
1088 IMapEnumerator* pMapEnum = __pTempContactValueHashMap->GetMapEnumeratorN();
1089 while (pMapEnum->MoveNext() == E_SUCCESS)
1091 String* pValue = static_cast<String*> (pMapEnum->GetValue());
1092 pValueList->Add(new (std::nothrow) String(*pValue));
1094 pReturnValue->Add(new (std::nothrow) String(CONTACT_KEY_PHONE), pValueList);
1098 else if (pContactsApp->GetReturnType() == APP_CONTROL_RETURN_TYPE_EMAIL)
1100 IMapEnumerator* pMapEnum = __pTempContactValueHashMap->GetMapEnumeratorN();
1101 while (pMapEnum->MoveNext() == E_SUCCESS)
1103 String* pValue = static_cast<String*> (pMapEnum->GetValue());
1104 pValueList->Add(new (std::nothrow) String(*pValue));
1106 pReturnValue->Add(new (std::nothrow) String(CONTACT_KEY_EMAIL), pValueList);
1110 else if (pContactsApp->GetReturnType() == APP_CONTROL_RETURN_TYPE_ITEM_ID)
1112 for (int groupIndex = 0; groupIndex < __pListView->GetGroupCount(); groupIndex++)
1114 int itemCount = __pListView->GetItemCountAt(groupIndex);
1115 for (int itemIndex = 0; itemIndex < itemCount; itemIndex++)
1117 if (__pListView->IsItemChecked(groupIndex, itemIndex) == true)
1120 contactId.Append(__pPresentationModel->GetContactId(groupIndex, itemIndex));
1121 pValueList->Add(new (std::nothrow) String(contactId));
1125 pReturnValue->Add(new (std::nothrow) String(CONTACT_KEY_ITEM_ID), pValueList);
1131 ReturnValues(pContactsApp->GetRequestId(), APP_CTRL_RESULT_FAILED, pReturnValue);
1136 ReturnValues(pContactsApp->GetRequestId(), APP_CTRL_RESULT_SUCCEEDED, pReturnValue);
1141 GroupContactListEditorForm::ReturnResultFailed(void)
1143 ContactsApp* pContactsApp = static_cast<ContactsApp*>(ContactsApp::GetInstance());
1145 ReturnValues(pContactsApp->GetRequestId(), APP_CTRL_RESULT_FAILED, null);
1149 GroupContactListEditorForm::LaunchAppControl(void)
1151 result r = E_SUCCESS;
1153 if (__pAppControl != null)
1159 extraData.Construct();
1161 if (__launchType == ID_GROUP_CONTACT_SELECT_MESSAGE)
1163 __pAppControl = AppManager::FindAppControlN(PROVIDER_ID_MESSAGE, OPERATION_ID_COMPOSE);
1167 IMapEnumerator* pMapEnum = __pTempContactValueHashMap->GetMapEnumeratorN();
1168 while (pMapEnum->MoveNext() == E_SUCCESS)
1170 String* pValue = static_cast<String*> (pMapEnum->GetValue());
1171 toValue.Append(*pValue);
1172 toValue.Append(DELIMITER_COMMA);
1176 toValue.Remove(toValue.GetLength() - 1, 1);
1178 extraData.Add(new (std::nothrow) String(INPUT_KEY_TO), new (std::nothrow) String(toValue));
1179 extraData.Add(new (std::nothrow) String(INPUT_KEY_MESSAGE_TYPE), new (std::nothrow) String(INPUT_TYPE_SMS));
1181 else if (__launchType == ID_GROUP_CONTACT_SELECT_EMAIL)
1183 __pAppControl = AppManager::FindAppControlN(PROVIDER_ID_EMAIL, OPERATION_ID_COMPOSE);
1187 IMapEnumerator* pMapEnum = __pTempContactValueHashMap->GetMapEnumeratorN();
1188 while (pMapEnum->MoveNext() == E_SUCCESS)
1190 String* pValue = static_cast<String*> (pMapEnum->GetValue());
1191 toValue.Append(*pValue);
1192 toValue.Append(DELIMITER_SEMICOLON);
1196 toValue.Remove(toValue.GetLength() - 1, 1);
1198 extraData.Add(new (std::nothrow) String(INPUT_KEY_TO), new (std::nothrow) String(toValue));
1201 if (__pAppControl != null)
1203 r = __pAppControl->Start(null, null, &extraData, null);
1206 AppLogDebug("[%s] Unable to launch app control", GetErrorMessage(r));
1210 extraData.RemoveAll(true);
1216 GroupContactListEditorForm::OnKeypadWillOpen(Tizen::Ui::Control& source)
1221 GroupContactListEditorForm::OnKeypadOpened(Tizen::Ui::Control& source)
1223 if (__pBottomLabel->GetShowState() == true)
1225 __pSearchListView->SetBounds(Rectangle(0, H_SEARCHBAR, GetClientAreaBounds().width, GetClientAreaBounds().height - H_SEARCHBAR - H_BOTTOM_LABEL));
1226 __pBottomLabel->SetPosition(FloatPoint(0, GetClientAreaBoundsF().height - H_BOTTOM_LABEL));
1227 __pBottomLabel->Invalidate(true);
1231 __pSearchListView->SetBounds(Rectangle(0, H_SEARCHBAR, GetClientAreaBounds().width, GetClientAreaBounds().height - H_SEARCHBAR));
1236 GroupContactListEditorForm::OnKeypadClosed(Tizen::Ui::Control& source)
1238 if (__pBottomLabel->GetShowState() == true)
1240 __pSearchListView->SetBounds(Rectangle(0, H_SEARCHBAR, GetClientAreaBounds().width, GetClientAreaBounds().height - H_SEARCHBAR - H_BOTTOM_LABEL));
1241 __pBottomLabel->SetPosition(FloatPoint(0, GetClientAreaBoundsF().height - H_BOTTOM_LABEL));
1242 __pBottomLabel->Invalidate(true);
1244 UpdateBottomLabel();
1248 __pSearchListView->SetBounds(Rectangle(0, H_SEARCHBAR, GetClientAreaBounds().width, GetClientAreaBounds().height - H_SEARCHBAR));
1253 GroupContactListEditorForm::OnKeypadBoundsChanged(Tizen::Ui::Control& source)
1255 if (__pBottomLabel->GetShowState() == true)
1257 __pSearchListView->SetBounds(Rectangle(0, H_SEARCHBAR, GetClientAreaBounds().width, GetClientAreaBounds().height - H_SEARCHBAR - H_BOTTOM_LABEL));
1258 __pBottomLabel->SetPosition(FloatPoint(0, GetClientAreaBoundsF().height - H_BOTTOM_LABEL));
1259 __pBottomLabel->Invalidate(true);
1263 __pSearchListView->SetBounds(Rectangle(0, H_SEARCHBAR, GetClientAreaBounds().width, GetClientAreaBounds().height - H_SEARCHBAR));
1268 GroupContactListEditorForm::OnKeypadActionPerformed(Tizen::Ui::Control& source, Tizen::Ui::KeypadAction keypadAction)
1270 if (keypadAction == KEYPAD_ACTION_SEARCH)
1272 __pSearchBar->HideKeypad();
1277 GroupContactListEditorForm::OnForeground(void)
1279 bool isContactPresent = true;
1281 if (__pListView->GetGroupCount() > 0)
1283 for (int groupIndex = 0; groupIndex < __pListView->GetGroupCount(); groupIndex++)
1285 int itemCount = __pListView->GetItemCountAt(groupIndex);
1289 isContactPresent = false;
1293 isContactPresent = true;
1299 isContactPresent = false;
1302 if (isContactPresent == false)
1304 __pSelectAllButton->SetEnabled(false);
1308 __pSelectAllButton->SetEnabled(true);
1312 __pSelectAllButton->Invalidate(true);
1316 GroupContactListEditorForm::OnBackground(void)
1318 if (__pAppControl != null)
1320 SceneManager* pSceneManager = SceneManager::GetInstance();
1321 pSceneManager->GoBackward(BackwardSceneTransition());
1326 GroupContactListEditorForm::OnTouchPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo & touchInfo)
1328 GroupedListView* pList = static_cast<GroupedListView*>(&const_cast<Control&>(source));
1336 GroupContactListEditorForm::OnTouchReleased(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
1341 GroupContactListEditorForm::OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
1346 GroupContactListEditorForm::OnTouchFocusIn(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
1351 GroupContactListEditorForm::OnTouchFocusOut(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
1356 GroupContactListEditorForm::OnKeyPressed(Control& source, const KeyEventInfo& keyEventInfo)
1362 GroupContactListEditorForm::OnKeyReleased(Control& source, const KeyEventInfo& keyEventInfo)
1364 if (keyEventInfo.GetKeyCode() == KEY_BACK || keyEventInfo.GetKeyCode() == KEY_ESC)
1366 if (__pMultipleContactValuePopup && __pMultipleContactValuePopup->GetShowState() == true)
1368 HideContactValuePopup();
1376 GroupContactListEditorForm::OnPreviewKeyPressed(Control& source, const KeyEventInfo& keyEventInfo)
1382 GroupContactListEditorForm::OnPreviewKeyReleased(Control& source, const KeyEventInfo& keyEventInfo)