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 * IntConfirmationPopup.cpp
20 *@file: IntConfirmationPopup.cpp
21 *@brief: Common popup to show delete confirmation
24 #include <FAppUiApp.h>
27 #include "IntCommonLib.h"
28 #include "IntConfirmationPopup.h"
29 #include "IntHistoryPresentationModel.h"
30 #include "IntSettingPresentationModel.h"
33 using namespace Tizen::Base;
34 using namespace Tizen::Graphics;
35 using namespace Tizen::Ui::Controls;
36 using namespace Tizen::Ui;
38 //static const int IDA_BUTTON_NO = 1000;
39 //static const int IDA_BUTTON_YES = 1001;
42 ConfirmationPopup::ConfirmationPopup(void)
49 ConfirmationPopup::~ConfirmationPopup(void)
55 ConfirmationPopup::Initialize(void)
57 Button* pYesButton = null;
58 Button* pNoButton = null;
59 Popup::Construct(L"IDL_CONFIRMATION_POPUP");
61 __pYesButton = static_cast< Button* >(GetControl(L"IDC_BUTTON_OK", true));
64 __pYesButton->SetActionId(IDA_BUTTON_YES);
67 __pNoButton = static_cast< Button* >(GetControl(L"IDC_BUTTON_CANCEL", true));
70 __pNoButton->SetActionId(IDA_BUTTON_NO);
73 __pPopupText = static_cast< Label* >(GetControl(L"IDC_LABEL1", true));
79 ConfirmationPopup::OnTerminating(void)
85 ConfirmationPopup::setMessage(String& str)
88 __pPopupText->SetText(str);
92 ConfirmationPopup::GetMessage(void)
98 ConfirmationPopup::AddActionListener(IActionEventListener& listener)
100 __pYesButton->AddActionEventListener(listener);
101 __pNoButton->AddActionEventListener(listener);
105 ConfirmationPopup::RemoveActionListener(IActionEventListener& listener)
107 __pYesButton->RemoveActionEventListener(listener);
108 __pNoButton->RemoveActionEventListener(listener);