3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://floralicense.org/license/
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 /*@file: EditBookmarkListForm
20 *@brief: This class defines EditBookmarkListForm used to edit the bookmark
24 #include <FAppUiApp.h>
27 #include "IntBookmarkData.h"
28 #include "IntBookmarkPresentationModel.h"
29 #include "IntCommonLib.h"
30 #include "IntEditBookmarkListForm.h"
31 #include "IntFaviconManager.h"
32 #include "IntNotificationPanel.h"
33 #include "IntSceneRegister.h"
36 using namespace Tizen::App;
37 using namespace Tizen::Base;
38 using namespace Tizen::Base::Collection;
39 using namespace Tizen::Base::Runtime;
40 using namespace Tizen::Graphics;
41 using namespace Tizen::Ui;
42 using namespace Tizen::Ui::Controls;
43 using namespace Tizen::Ui::Scenes;
45 static const wchar_t* IDB_ICON_FOLDER_OPEN = L"I01_icon_folder_open.png";
46 static const wchar_t* IDB_ITEM = L"edit_item.png";
47 static const wchar_t* IDB_RIGHT_ARROW = L"I01_right_arrow.png";
50 const int EditBookmarkListForm::IDA_BUTTON_CHECKED = 101;
51 const int EditBookmarkListForm::IDA_TABBAR_ITEM_1 = 102;
52 const int EditBookmarkListForm::IDA_TABBAR_ITEM_2 = 103;
53 const int EditBookmarkListForm::IDA_DELETEITEM_CLICKED = 104;
54 const int EditBookmarkListForm::IDA_SHAREITEM_CLICKED = 105;
55 const int EditBookmarkListForm::IDA_CANCELITEM_CLICKED = 106;
56 const int EditBookmarkListForm::IDA_FORMAT_FOLDER = 107;
57 const int EditBookmarkListForm::IDA_FORMAT_SITE = 108;
58 const int EditBookmarkListForm::IDA_FORMAT_ICON = 109;
59 const int EditBookmarkListForm::IDA_FORMAT_BITMAP = 110;
60 const int EditBookmarkListForm::IDA_BUTTON_UNCHECKED = 111;
61 const int EditBookmarkListForm::IDA_FORMAT_URL = 112;
64 EditBookmarkListForm::EditBookmarkListForm(void)
72 __selectedItemCount = 0;
73 __pCheckButton = null;
74 __pConfirmationPopup = null;
75 __pSelectedList = null;
78 EditBookmarkListForm::~EditBookmarkListForm(void)
82 __pData->RemoveAll(false);
85 if(__pSelectedList != null)
87 __pSelectedList->RemoveAll(false);
88 delete __pSelectedList;
93 EditBookmarkListForm::Initialize(void)
95 Construct(L"IDL_EDIT_BOOKMARK_LIST");
100 EditBookmarkListForm::OnInitializing(void)
102 result r = E_SUCCESS;
104 Rectangle rc = GetClientAreaBounds();
105 String selected = CommonUtil::GetString(L"IDS_COM_OPT_SELECTED");
107 // Setup back event listener
108 SetFormBackEventListener(this);
109 AddOrientationEventListener(*this);
111 SceneManager* pSceneManager = SceneManager::GetInstance();
113 if (pSceneManager != null)
115 pSceneManager->AddSceneEventListener(IDSCN_EDIT_BOOKMARK_LIST, *this);
118 Header* pHeader = GetHeader();
124 pHeader->SetTitleText(CommonUtil::GetString(L"IDS_BR_HEADER_EDIT_BOOKMARK"));
126 __pCheckButton = static_cast< CheckButton* >(GetControl(
127 L"IDC_SELECT_CHECKBUTTON", true));
129 if (__pCheckButton == null)
134 __pCheckButton->SetActionId(IDA_BUTTON_CHECKED, IDA_BUTTON_UNCHECKED);
135 __pCheckButton->AddActionEventListener(*this);
137 __pListview = static_cast< ListView* >(GetControl("IDC_LISTVIEW1"));
139 if (__pListview == null)
144 // __pListview->SetBounds(__pListview->GetX(), __pListview->GetY(), __pListview->GetWidth(), rc.height - 112 - 48);
145 __pListview->AddFastScrollListener(*this);
146 __pListview->AddListViewItemEventListener(*this);
147 __pListview->SetItemProvider(*this);
150 __pInfoPanel = static_cast< Panel* >(GetControl(
151 L"IDC_INFO_PANEL", true));
153 if (__pInfoPanel == null)
158 // __pInfoPanel->SetBounds(Rectangle(0,rc.height - 48, rc.width, 48));
160 //SetControlAlwaysOnTop(*__pInfoPanel, true);
162 __pInfoLabel = static_cast< Label* >(GetControl(
163 L"IDC_INFO_LABEL", true));
165 if (__pInfoLabel == null)
170 // __pInfoLabel->SetBounds(Rectangle(0,0,rc.width, 48));
171 selected.Append(L"(0)");
172 __pInfoLabel->SetText(selected);
174 __pInfoLabel->SetTextConfig(32,LABEL_TEXT_STYLE_BOLD);
175 //__pInfoLabel->SetBackgroundColor(CUSTOM_COLOR_INFO_LABEL);
176 __pInfoLabel->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
177 __pInfoLabel->SetTextHorizontalAlignment(ALIGNMENT_CENTER);
178 GetFooter()->SetItemEnabled(0,false);
179 GetFooter()->AddActionEventListener(*this);
180 __pTimer = new (std::nothrow) Timer();
181 __pTimer->Construct(*this);
183 __pSelectedList = new(std::nothrow) ArrayList();
184 __pSelectedList->Construct();
189 EditBookmarkListForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
191 result r = E_SUCCESS;
193 SceneManager* pSceneManager = SceneManager::GetInstance();
197 case IDA_DELETEITEM_CLICKED:
201 if(__pListview == null)
205 int totalCount = __pListview->GetItemCount();
206 for (int count = 0;count < totalCount;count++)
208 if (__pListview->IsItemChecked(count))
212 BookmarkData* pBookMark = dynamic_cast< BookmarkData* >(__pData->GetAt(count));
213 if (pBookMark == null)
217 bookmarkId = pBookMark->GetBookmarkId();
218 Integer::Parse(bookmarkId,id);
220 if (pBookMark->GetBookmarkType() == BOOKMARK_TYPE_URL)
222 r = BookmarkPresentationModel::GetInstance()->DeleteBookmark(id);
223 TryCatch( r == E_SUCCESS,,"EditBookmarkListForm::OnActionPerformed BookmarkPresentationModel::GetInstance()->DeleteBookmark failed %s",GetErrorMessage(r));
227 r = BookmarkPresentationModel::GetInstance()->DeleteFolder(id);
228 TryCatch( r == E_SUCCESS,,"EditBookmarkListForm::OnActionPerformed BookmarkPresentationModel::GetInstance()->DeleteBookmark failed %s",GetErrorMessage(r));
233 if (__pListview != null)
235 count = __pListview->GetItemCount();
237 for(int index = 0; index < count ; index ++)
239 if(__pListview->IsItemChecked(index) == true )
241 __pListview->SetItemChecked(index,false);
245 __pCheckButton->SetSelected(false);
246 __pListview->UpdateList();
248 if ( __pListview->GetItemCount() == 0)
250 __pCheckButton->SetShowState(false);
251 __pCheckButton->Invalidate(true);
252 if (__pInfoPanel != null)
254 __pInfoPanel->SetShowState(false);
256 r = __pListview->SetBounds(__pListview->GetX(), 0, __pListview->GetWidth(), GetClientAreaBounds().height);
265 GetFooter()->SetItemEnabled(0,false);
266 GetFooter()->Invalidate(true);
267 // removing all the element from selected list
268 __pSelectedList->RemoveAll(false);
269 labelString.Append(CommonUtil::GetString(L"IDS_COM_OPT_SELECTED"));
270 labelString.Append(L"(0)");
272 if (__pInfoPanel != null)
274 __pInfoLabel->SetText(labelString);
275 __pInfoPanel->Draw();
276 __pInfoPanel->Show();
279 NotificationPanel* pNotification = new (std::nothrow) NotificationPanel(*this);
280 String notification = CommonUtil::GetString(L"IDS_BR_POP_DELETED");
281 pNotification->SetText(notification);
282 pNotification->ShowNotification();
285 if( __pListview->GetItemCount() == 0)
287 __pTimer->Start(1000);
291 case IDA_CANCELITEM_CLICKED:
293 if ( __pTimer != NULL)
297 if(pSceneManager != NULL)
299 r = pSceneManager->GoBackward(BackwardSceneTransition());
303 AppLogDebug("EditBookmarkListForm::OnActionPerformed Failed to GoBackward %s",GetErrorMessage(r));
308 case IDA_BUTTON_CHECKED:
313 for (int count = 0;count < __pListview->GetItemCount();count++)
315 __pListview->SetItemChecked(count,true);
318 GetFooter()->SetItemEnabled(0,true);
319 GetFooter()->Invalidate(true);
321 labelString.Append(CommonUtil::GetString(L"IDS_COM_OPT_SELECTED"));
322 labelString.Append(L"(");
323 labelString.Append(__pListview->GetItemCount());
324 labelString.Append(L")");
326 __pInfoLabel->SetText(labelString);
327 __pInfoPanel->Draw();
328 __pInfoPanel->Show();
330 int totalCount = __pData->GetCount();
331 for(int index = 0; index < totalCount; index++)
333 BookmarkData* pBookMark = dynamic_cast< BookmarkData* >(__pData->GetAt(index));
334 if (pBookMark == null)
338 String *pBookmarkId = new(std::nothrow) String();
339 if(pBookMark->GetBookmarkType() == BOOKMARK_TYPE_FOLDER)
341 pBookmarkId->Append("F");
345 pBookmarkId->Append("U");
347 pBookmarkId->Append(pBookMark->GetBookmarkId());
349 __pListview->SetItemChecked(index, true);
350 __pSelectedList->Add(pBookmarkId);
352 __pListview->Invalidate(true);
355 case IDA_BUTTON_UNCHECKED:
357 String labelString = L"";
359 for (int count = 0;count < __pListview->GetItemCount();count++)
361 __pListview->SetItemChecked(count,false);
364 labelString.Append(CommonUtil::GetString(L"IDS_COM_OPT_SELECTED"));
365 labelString.Append(L"(0)");
366 __pInfoLabel->SetText(labelString);
367 __pInfoPanel->Draw();
368 __pInfoPanel->Show();
369 __pSelectedList->RemoveAll(true);
370 __pListview->Invalidate(true);
372 GetFooter()->SetItemEnabled(0,false);
373 GetFooter()->Invalidate(true);
384 EditBookmarkListForm::CreateItem(int index, int itemWidth)
386 result r = E_SUCCESS;
387 ListAnnexStyle style = LIST_ANNEX_STYLE_MARK;
388 CustomItem* pItem = null;
389 BookmarkData* pBookMark = null;
390 Bitmap* pBitmap = null;
392 const int x_Margin_Url = 104;
393 const int y_Margin_Url = 70;
394 const int height_Url = 40;
395 const int width_Url = GetClientAreaBounds().width - 104 - 120 - 16 - 48;
396 const int itemHeight = 112;
397 const int textSize = 32;
398 const int width_Title = GetClientAreaBounds().width - 104 - 120 - 16 - 48;
400 pItem = new(std::nothrow) CustomItem();
405 pBookMark = dynamic_cast< BookmarkData* >(__pData->GetAt(index));
406 if (pBookMark == null)
412 if (pBookMark->GetBookmarkType() == BOOKMARK_TYPE_FOLDER)
414 r = pItem->Construct(Tizen::Graphics::Dimension(itemWidth, 112), style);
415 TryCatch( r == E_SUCCESS,,"EditBookmarkListForm::CreateItem contruct item failed %s",GetErrorMessage(r));
417 pBitmap = AppResource::GetInstance()->GetBitmapN(IDB_ICON_FOLDER_OPEN);
421 pItem->AddElement(Rectangle(16, 26, 60, 60), IDA_FORMAT_ICON, *pBitmap, null);
425 pItem->AddElement(Rectangle(92, 8, width_Title/*__pListview->GetWidth() - 92 - 80*/, 112), IDA_FORMAT_FOLDER, pBookMark->GetBookmarkTitle(), true);
428 pBitmap = AppResource::GetInstance()->GetBitmapN(IDB_ITEM);
432 pItem->AddElement(Rectangle(GetClientAreaBounds().width - 92 - 80, 20, 60, 60), IDA_FORMAT_BITMAP, *pBitmap, null, null);
433 pItem->SetElementSelectionEnabled(IDA_FORMAT_BITMAP, true);
439 r = pItem->Construct(Tizen::Graphics::Dimension(itemWidth, 128), style);
440 TryCatch( r == E_SUCCESS,,"EditBookmarkListForm::CreateItem contruct item failed %s",GetErrorMessage(r));
442 pBitmap = pBookMark->GetFavIconBitmap();
446 pBitmap = FaviconManager::GetInstance()->GetDefaultFaviconN();
449 pItem->AddElement(Rectangle(16, 28, 72, 72), IDA_FORMAT_ICON, *pBitmap, null);
452 pItem->AddElement(Rectangle(104, 10, width_Title, itemHeight - height_Url), IDA_FORMAT_SITE, pBookMark->GetBookmarkTitle(), true);
453 pItem->AddElement(Rectangle(x_Margin_Url, y_Margin_Url, width_Url, height_Url), IDA_FORMAT_URL, pBookMark->GetUrl(),textSize,CUSTOM_COLOR_GREY,CUSTOM_COLOR_GREY,CUSTOM_COLOR_GREY,true);
455 //pBitmap = AppResource::GetInstance()->GetBitmapN("I01_picker_arrow_right.png");
456 pBitmap = AppResource::GetInstance()->GetBitmapN(IDB_RIGHT_ARROW);
459 pItem->AddElement(Rectangle(GetClientAreaBounds().width - 92 - 84, 32, 64, 64), IDA_FORMAT_BITMAP, *pBitmap, null, null);
460 pItem->SetElementSelectionEnabled(IDA_FORMAT_BITMAP, true);
473 EditBookmarkListForm::DeleteItem(int index, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth)
481 EditBookmarkListForm::GetItemCount(void)
484 result r = E_SUCCESS;
486 BookmarkPresentationModel::GetInstance()->GetFolderBookmarkCount(__parentID, count);
490 __pData->RemoveAll(true);
495 __pData = new(std::nothrow) ArrayList();
502 r = __pData->Construct();
504 TryCatch( r == E_SUCCESS,,"EditBookmarkListForm::GetItemCount __pData->Construct() failed %s",GetErrorMessage(r));
506 BookmarkPresentationModel::GetInstance()->GetFoldersBookmarks(__parentID, 0, count, *__pData);
511 if(__pCheckButton != null)
513 __pCheckButton->SetShowState(false);
515 if(__pInfoPanel != null)
517 __pInfoPanel->SetShowState(false);
519 __pListview->SetBounds(__pListview->GetX(), 0, __pListview->GetWidth(), GetClientAreaBounds().height);
524 if(__pCheckButton != null)
526 __pCheckButton->SetShowState(true);
528 if(__pInfoPanel != null)
530 __pInfoPanel->SetShowState(true);
532 if(__pCheckButton != null && __pInfoPanel != null)
533 __pListview->SetBounds(__pListview->GetX(), __pListview->GetY(), __pListview->GetWidth(), GetClientAreaBounds().height - __pCheckButton->GetHeight() - __pInfoPanel->GetHeight());
536 if(__pCheckButton != null)
538 __pCheckButton->Invalidate(true);
540 if(__pInfoPanel != null)
542 __pInfoPanel->Invalidate(false);
548 __pData->RemoveAll(true);
555 EditBookmarkListForm::OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListContextItemStatus status)
561 EditBookmarkListForm::OnListViewItemLongPressed(Tizen::Ui::Controls::ListView& listView, int index, int elementId, bool& invokeListViewItemCallback)
567 EditBookmarkListForm::OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListItemStatus status)
570 __selectedItemCount = 0;
571 result r = E_SUCCESS;
575 case IDA_FORMAT_BITMAP:
577 ArrayList* pArgList = null;
578 SceneManager* pSceneManager = SceneManager::GetInstance();
579 BookmarkData* pBookMark = dynamic_cast< BookmarkData* >(__pData->GetAt(index));
582 if(pBookMark == NULL)
586 String *pBookmarkId = new(std::nothrow) String();
587 if(pBookMark->GetBookmarkType() == BOOKMARK_TYPE_FOLDER)
589 pBookmarkId->Append("F");
593 pBookmarkId->Append("U");
595 pBookmarkId->Append(pBookMark->GetBookmarkId());
597 // if (__pListview->IsItemChecked(index) == true)
599 // __pListview->SetItemChecked(index, false);
600 // __pSelectedList->Remove(*pBookmarkId);
604 // __pListview->SetItemChecked(index, true);
605 // __pSelectedList->Add(pBookmarkId);
608 if (pBookMark->GetBookmarkType() == BOOKMARK_TYPE_FOLDER)
610 pArgList = new(std::nothrow) ArrayList();
612 if (pArgList != null)
614 pArgList->Construct();
615 pArgList->Add(*new(std::nothrow) BookmarkData(*pBookMark));
616 if ( pSceneManager != null)
618 result r = pSceneManager->GoForward(ForwardSceneTransition(IDSCN_CREATE_BOOKMARK_FOLDER, SCENE_TRANSITION_ANIMATION_TYPE_NONE),pArgList);
621 if (pArgList != null)
623 pArgList->RemoveAll(false);
629 AppLogDebug("BookmarkListForm::CreateItem Construct failed %s",GetErrorMessage(r));
636 pArgList = new(std::nothrow) ArrayList();
638 if (pArgList != null)
640 pArgList->Construct();
641 pArgList->Add(*new(std::nothrow) String(L"1"));
642 pArgList->Add(*new(std::nothrow) BookmarkData(*pBookMark));
643 if ( pSceneManager != null)
645 result r = pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ADD_BOOKMARK, SCENE_TRANSITION_ANIMATION_TYPE_NONE), pArgList);
647 if (pArgList != null)
649 pArgList->RemoveAll(false);
655 AppLogDebug("BookmarkListForm::CreateItem Construct failed %s",GetErrorMessage(r));
667 BookmarkData* pBookMark = dynamic_cast< BookmarkData* >(__pData->GetAt(index));
670 if(pBookMark == NULL)
674 String *pBookmarkId = new(std::nothrow) String();
675 if(pBookMark->GetBookmarkType() == BOOKMARK_TYPE_FOLDER)
677 pBookmarkId->Append("F");
681 pBookmarkId->Append("U");
683 pBookmarkId->Append(pBookMark->GetBookmarkId());
685 if (__pListview->IsItemChecked(index) == false)
687 __pSelectedList->Remove(*pBookmarkId);
691 __pSelectedList->Add(pBookmarkId);
695 int itemCount = __pListview->GetItemCount();
696 for (int count = 0;count < itemCount ; count++)
698 if (__pListview->IsItemChecked(count))
700 __selectedItemCount++;
704 //labelString.Append(__selectedItemCount);
705 labelString.Append(CommonUtil::GetString(L"IDS_COM_OPT_SELECTED"));
706 labelString.Append(L"(");
707 labelString.Append(__selectedItemCount);
708 labelString.Append(L")");
709 __pInfoLabel->SetText(labelString);
710 __pInfoPanel->Draw();
711 __pInfoPanel->Show();
712 BookmarkPresentationModel::GetInstance()->GetFolderBookmarkCount(__parentID,count);
713 if (__selectedItemCount == count)
715 __pCheckButton->SetSelected(true);
719 __pCheckButton->SetSelected(false);
722 itemCount = __pListview->GetItemCount();
723 for (int count = 0;count < itemCount ;count++)
725 if (__pListview->IsItemChecked(count))
734 GetFooter()->SetItemEnabled(0,true);
738 GetFooter()->SetItemEnabled(0,false);
741 GetFooter()->Invalidate(true);
749 EditBookmarkListForm::OnListViewItemSwept(Tizen::Ui::Controls::ListView& listView, int index, Tizen::Ui::Controls::SweepDirection direction)
755 EditBookmarkListForm::OnFastScrollIndexSelected(Tizen::Ui::Control& source, Tizen::Base::String& index)
760 EditBookmarkListForm::OnListViewItemReordered(Tizen::Ui::Controls::ListView& listView, int indexFrom, int indexTo)
766 EditBookmarkListForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId, IList* pArgs)
768 result r = E_FAILURE;
771 BookmarkData* pBookMark = null;
776 String* pStr = dynamic_cast<String*>(pArgs->GetAt(0));
781 __parentID.Append(pStr->GetPointer());
784 __selectedItemCount = 0;
786 labelString.Append(CommonUtil::GetString(L"IDS_COM_OPT_SELECTED"));
787 labelString.Append(L"(");
788 labelString.Append(__pSelectedList->GetCount());
789 labelString.Append(L")");
790 __pInfoLabel->SetText(labelString);
791 __pListview->UpdateList();
793 count = __pListview->GetItemCount();
795 for(int index = 0 ; index < count ; index++)
797 pBookMark = dynamic_cast< BookmarkData* >(__pData->GetAt(index));
799 if(pBookMark == NULL)
803 String *pBookmarkId = new(std::nothrow) String();
804 if(pBookMark->GetBookmarkType() == BOOKMARK_TYPE_FOLDER)
806 pBookmarkId->Append("F");
810 pBookmarkId->Append("U");
812 pBookmarkId->Append(pBookMark->GetBookmarkId());
814 AppLog("BookmarkId: %ls", pBookmarkId->GetPointer());
816 if(__pSelectedList->Contains(*pBookmarkId))
818 __pListview->SetItemChecked(index,true);
819 __selectedItemCount++;
823 __pListview->SetItemChecked(index,false);
826 if(__selectedItemCount < __pListview->GetItemCount())
828 __pCheckButton->SetSelected(false);
829 GetFooter()->SetItemEnabled(0, false);
830 GetFooter()->Invalidate(true);
834 __pCheckButton->SetSelected(true);
835 GetFooter()->SetItemEnabled(0, true);
836 GetFooter()->Invalidate(true);
840 __pInfoPanel->Draw();
841 __pInfoPanel->Show();
848 EditBookmarkListForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
854 EditBookmarkListForm::OnFormBackRequested(Form& source)
856 SceneManager* pSceneManager = SceneManager::GetInstance();
858 if ( __pTimer != NULL)
863 if (pSceneManager != null)
865 //pSceneManager->GoBackward(BackwardSceneTransition(IDSCN_BOOKMARK_VIEW, SCENE_TRANSITION_ANIMATION_TYPE_RIGHT));
866 result r = pSceneManager->GoBackward(BackwardSceneTransition());
869 AppLogDebug("BookmarkListForm::CreateItem Construct failed %s",GetErrorMessage(r));
874 GetFooter()->Invalidate(true);
878 void EditBookmarkListForm::OnOrientationChanged(const Tizen::Ui::Control &source, Tizen::Ui::OrientationStatus orientationStatus)
881 ArrayList* pCheckedItems = NULL ;
883 if (__pListview != null)
885 AppLog("the list Y axis is %d", __pListview->GetY());
886 pCheckedItems = new(std::nothrow) ArrayList();
887 pCheckedItems->Construct();
888 if ( __pListview->GetItemCount() == 0)
890 __pCheckButton->SetShowState(false);
891 __pInfoPanel->SetShowState(false);
892 __pListview->SetBounds(0, __pListview->GetY(), GetClientAreaBounds().width, GetClientAreaBounds().height -__pListview->GetY());
897 AppLog("EditBookmarkListForm::OnOrientationChanged 1");
898 __pCheckButton->SetShowState(true);
899 __pInfoPanel->SetShowState(true);
900 __pListview->SetBounds(__pListview->GetX(), __pListview->GetY(), __pListview->GetWidth(), GetClientAreaBounds().height - __pCheckButton->GetHeight() - __pInfoPanel->GetHeight());
901 __pInfoLabel->SetBounds(__pInfoLabel->GetX(),__pInfoLabel->GetY(), GetClientAreaBounds().width,__pInfoLabel->GetHeight());
902 __pInfoLabel->Invalidate(true);
904 __pCheckButton->Invalidate(true);
906 itemCount = __pListview->GetItemCount();
908 for (int count = 0;count < itemCount ; count++)
911 if (__pListview->IsItemChecked(count))
913 pCheckedItems->Add(* new Integer(count));
917 __pListview->UpdateList();
919 for (int count = 0;count < itemCount ;count++)
921 if (pCheckedItems->Contains(* new Integer(count)) == true)
923 __pListview->SetItemChecked(count, true);
926 if ( pCheckedItems != NULL )
928 pCheckedItems->RemoveAll(true);
929 delete pCheckedItems;
936 EditBookmarkListForm::OnTimerExpired(Timer& timer)
938 SceneManager* pSceneManager = SceneManager::GetInstance();
940 if ( pSceneManager != NULL)
942 result r = pSceneManager->GoBackward(BackwardSceneTransition());
945 AppLogDebug("EditBookmarkListForm::OnTimerExpired GoBackward failed %s",GetErrorMessage(r));