Fork for IVI: mesa fixing
[profile/ivi/uifw.git] / src / ui / controls / FUiCtrl_ProgressPopup.cpp
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 //     http://floralicense.org/license/
10 //
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.
16 //
17
18 /**
19  * @file                FUiCtrl_ProgressPopup.cpp
20  * @brief       This is the implementation file for the _ProgressPopup class.
21  */
22
23 #include <FBaseSysLog.h>
24 #include <FBaseErrorDefine.h>
25 #include <FUiCtrlButton.h>
26 #include <FGrp_BitmapImpl.h>
27 #include "FUi_AccessibilityContainer.h"
28 #include "FUi_AccessibilityElement.h"
29 #include "FUi_ResourceManager.h"
30 #include "FUi_DataBindingContext.h"
31 #include "FUiCtrl_ButtonImpl.h"
32 #include "FUiCtrl_Button.h"
33 #include "FUiCtrl_Form.h"
34 #include "FUiCtrl_Frame.h"
35 #include "FUiCtrl_ProgressPopup.h"
36 #include "FUiCtrl_ProgressPopupPresenter.h"
37
38
39 using namespace Tizen::Graphics;
40 using namespace Tizen::Ui;
41 using namespace Tizen::Ui::Animations;
42 using namespace Tizen::Base;
43
44
45 namespace Tizen { namespace Ui { namespace Controls
46 {
47
48
49 _ProgressPopup::_ProgressPopup(void)
50         : __pProgressPopupPresenter(null)
51         , __pProgressPopupEvent(null)
52         , __pButton(null)
53         , __text(L"")
54         , __textColor(Color(0xFFFFFFFF))
55         , __animationRect(0, 0, 0, 0)
56         , __pTextAccessibilityElement(null)
57         , __textState(false)
58         , __buttonState(false)
59         , __isTranslucent(false)
60 {
61         // empty statement
62 }
63
64 _ProgressPopup::~_ProgressPopup(void)
65 {
66         delete __pProgressPopupPresenter;
67         __pProgressPopupPresenter = null;
68
69         if (__pProgressPopupEvent != null)
70         {
71                 delete __pProgressPopupEvent;
72                 __pProgressPopupEvent = null;
73         }
74
75         delete _pBgBitmap;
76         _pBgBitmap = null;
77
78         delete _pComposedBgBitmap;
79         _pComposedBgBitmap = null;
80
81         delete _pOutlineBitmap;
82         _pOutlineBitmap = null;
83
84         delete _pDimmingLayer;
85         _pDimmingLayer = null;
86
87         delete __pButton;
88         __pButton = null;
89
90         if (__pTextAccessibilityElement)
91         {
92                 __pTextAccessibilityElement->Activate(false);
93                 __pTextAccessibilityElement = null;
94         }
95 }
96
97 _ProgressPopup*
98 _ProgressPopup::CreateProgressPopupN(void)
99 {
100         _ProgressPopup* pProgressPopup = new (std::nothrow) _ProgressPopup();
101         SysTryReturn(NID_UI_CTRL, pProgressPopup != null, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
102
103 #if defined(MULTI_WINDOW)
104         result r = pProgressPopup->CreateRootVisualElement();
105         SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
106 #endif
107
108         // for taking touch event
109         pProgressPopup->AcquireHandle();
110
111         return pProgressPopup;
112
113 #if defined(MULTI_WINDOW)
114 CATCH:
115         delete pProgressPopup;
116
117         return null;
118 #endif
119 }
120
121 result
122 _ProgressPopup::Initialize(bool cancelButton, bool translucent, const Rectangle& animationRect)
123 {
124         result r = E_SUCCESS;
125
126         _AccessibilityContainer* pContainer = null;
127
128         __animationRect = animationRect;
129         __buttonState = cancelButton;
130         __isTranslucent = translucent;
131
132         _ProgressPopupPresenter* pPresenter = new (std::nothrow) _ProgressPopupPresenter();
133         SysTryReturn(NID_UI_CTRL, pPresenter != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
134
135         SetPresenter(*pPresenter);
136
137         r = pPresenter->Initialize(*this, cancelButton, translucent, animationRect);
138         SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
139
140         GET_COLOR_CONFIG(POPUP::TITLE_TEXT_NORMAL, _titleTextColor);
141         GET_COLOR_CONFIG(MESSAGEBOX::TEXT_NORMAL, __textColor);
142
143         GET_BITMAP_CONFIG_N(POPUP::BG_OUTLINE_EFFECT_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, _pOutlineBitmap);
144         r = GetLastResult();
145         SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
146
147         Color bgColor;
148         GET_COLOR_CONFIG(POPUP::BG_NORMAL, bgColor);
149
150         GET_BITMAP_CONFIG_N(POPUP::BG_NORMAL, BITMAP_PIXEL_FORMAT_ARGB8888, _pBgBitmap);
151         r = GetLastResult();
152         SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
153
154         _pComposedBgBitmap = _BitmapImpl::GetColorReplacedBitmapN(*_pBgBitmap, Color::GetColor(COLOR_ID_MAGENTA), bgColor);
155
156         // for clearing canvas
157         if (GetVisualElement() != null)
158         {
159                 GetVisualElement()->SetSurfaceOpaque(false);
160         }
161
162         if (__isTranslucent)
163         {
164                 GetVisualElement()->SetOpacity(0.6f); // FIXME : temp
165         }
166
167         _pDimmingLayer = new (std::nothrow) _DimmingLayer();
168         SysTryReturn(NID_UI_CTRL, _pDimmingLayer != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
169
170         r = _pDimmingLayer->Construct(*this);
171         SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
172
173         if (__buttonState && !__isTranslucent)
174         {
175                 __pButton = new (std::nothrow) Button();
176                 SysTryCatch(NID_UI_CTRL, __pButton != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
177
178                 r = __pButton->Construct(pPresenter->GetButtonBounds(), L"Cancel");
179                 SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
180
181                 _ControlImpl* pImpl = _ControlImpl::GetInstance(*__pButton);
182                 r = AttachChild(pImpl->GetCore());
183                 SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
184
185                 _Button* pButtonCore = dynamic_cast <_Button*>(&pImpl->GetCore());
186                 SysTryCatch(NID_UI_CTRL, pButtonCore != null, , r, "[%s] Propagating.", GetErrorMessage(r));
187
188                 pButtonCore->SetActionId(ID_PROGRESS_POPUP_CANCEL_BUTTON);
189                 pButtonCore->AddActionEventListener(*this);
190         }
191
192         pContainer = GetAccessibilityContainer();
193         if(pContainer != null)
194         {
195                 pContainer->Activate(true);
196         }
197
198         return r;
199
200 CATCH:
201         delete _pDimmingLayer;
202         _pDimmingLayer = null;
203
204         delete __pButton;
205         __pButton = null;
206
207         return r;
208 }
209
210 result
211 _ProgressPopup::SetPresenter(const _ProgressPopupPresenter& ProgressPopupPresenter)
212 {
213         __pProgressPopupPresenter = const_cast <_ProgressPopupPresenter*>(&ProgressPopupPresenter);
214
215         return E_SUCCESS;
216 }
217
218 result
219 _ProgressPopup::DoModal(int& modalResult)
220 {
221         result r = E_SUCCESS;
222
223         r = __pProgressPopupPresenter->DoModal(modalResult);
224         SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
225
226         return r;
227 }
228
229 result
230 _ProgressPopup::AddProgressPopupEventListener(const Tizen::Ui::Controls::_IProgressPopupEventListener& listener)
231 {
232         result r = E_SUCCESS;
233
234         if (__pProgressPopupEvent == null)
235         {
236                 __pProgressPopupEvent = _ProgressPopupEvent::CreateInstanceN(*this);
237                 r = GetLastResult();
238                 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
239         }
240
241         r = __pProgressPopupEvent->AddListener(listener);
242         SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
243
244         return r;
245 }
246
247 result
248 _ProgressPopup::SetTitleText(const String& title)
249 {
250         result r = E_SUCCESS;
251
252         _titleText = title;
253         _titleState = true;
254
255         if (_pTitleTextAccessibilityElement != null)
256         {
257                 _pTitleTextAccessibilityElement->SetLabel(title);
258         }
259
260         __pProgressPopupPresenter->SetTitleTextObject();
261
262         return r;
263 }
264
265 result
266 _ProgressPopup::SetText(const String& text)
267 {
268         result r = E_SUCCESS;
269
270         __text = text;
271         __textState = true;
272
273         if (__pTextAccessibilityElement != null)
274         {
275                 __pTextAccessibilityElement->SetLabel(text);
276         }
277
278         __pProgressPopupPresenter->SetTextObject();
279
280         return r;
281 }
282
283 result
284 _ProgressPopup::UpdateBounds(void)
285 {
286         result r = E_SUCCESS;
287
288         // create button with new position
289         if (HasButton())
290         {
291                 _ControlImpl* pImpl = null;
292                 _Button* pButtonCore = null;
293
294                 if (__pButton != null)
295                 {
296                         pImpl = _ControlImpl::GetInstance(*__pButton);
297                         r = DetachChild(pImpl->GetCore());
298                         SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
299
300                         delete __pButton;
301                         __pButton = null;
302                 }
303
304                 __pButton = new (std::nothrow) Button();
305                 SysTryReturn(NID_UI_CTRL, __pButton != null, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
306
307                 r = __pButton->Construct(__pProgressPopupPresenter->GetButtonBounds(), L"Cancel");
308                 SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
309
310                 pImpl = _ControlImpl::GetInstance(*__pButton);
311                 r = AttachChild(pImpl->GetCore());
312                 SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
313
314                 pButtonCore = dynamic_cast <_Button*>(&pImpl->GetCore());
315                 r = GetLastResult();
316                 SysTryCatch(NID_UI_CTRL, pButtonCore != null, , r, "[%s] Propagating.", GetErrorMessage(r));
317
318                 pButtonCore->SetActionId(ID_PROGRESS_POPUP_CANCEL_BUTTON);
319                 pButtonCore->AddActionEventListener(*this);
320         }
321
322         // update total height -> GetTotalHeight (called by Impl)
323         // update process-animation rect position -> GetAnimationRect (called by UpdateProcessAnimationVE)
324         // update process-animation VE
325 //      r = __pProgressPopupPresenter->UpdateProcessAnimationVE();
326 //      SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
327
328         return r;
329
330 CATCH:
331         delete __pButton;
332         __pButton = null;
333
334         return r;
335 }
336
337 String
338 _ProgressPopup::GetText(void) const
339 {
340         return __text;
341 }
342
343 int
344 _ProgressPopup::GetTotalHeight(void) const
345 {
346         int transTopMargin = 0;
347         int transBottomMargin = 0;
348         int titleHeight = 0;
349         int noTitleHeigth = 0;
350         int animationWidth = 0;
351         int textTopGap = 0;
352         int textBottomGap = 0;
353         int bottomHeight = 0;
354
355         GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_TOP_MARGIN, GetOrientation(), transTopMargin);
356         GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_BOTTOM_MARGIN, GetOrientation(), transBottomMargin);
357         GET_SHAPE_CONFIG(POPUP::PROCESS_ANIMATION_NO_TITLE_TOP_MARGIN, GetOrientation(), noTitleHeigth);
358         GET_SHAPE_CONFIG(POPUP::PROCESS_ANIMATION_WIDTH, GetOrientation(), animationWidth);
359         GET_SHAPE_CONFIG(POPUP::PROCESS_TEXT_TOP_MARGIN, GetOrientation(), textTopGap);
360         GET_SHAPE_CONFIG(POPUP::PROCESS_TEXT_BOTTOM_MARGIN, GetOrientation(), textBottomGap);
361         GET_SHAPE_CONFIG(POPUP::TITLE_HEIGHT, GetOrientation(), titleHeight);
362
363         GET_SHAPE_CONFIG(MESSAGEBOX::BOTTOM_HEIGHT, GetOrientation(), bottomHeight);
364
365         if (HasTitle())
366         {
367                 noTitleHeigth = 0;
368         }
369         else
370         {
371                 titleHeight = 0;
372         }
373
374         if (!HasText())
375         {
376                 textTopGap = 0;
377                 textBottomGap = 0;
378         }
379
380         if (!HasButton())
381         {
382                 bottomHeight = 0;
383         }
384
385         int totalH = transTopMargin
386                 + transBottomMargin
387                         + titleHeight
388                         + noTitleHeigth
389                         + animationWidth
390                         + textTopGap
391                         + textBottomGap
392                         + __pProgressPopupPresenter->GetBodyTextHeight()
393                         + bottomHeight;
394
395         return totalH;
396 }
397
398 result
399 _ProgressPopup::SetTextColor(const Color& color)
400 {
401         __textColor = color;
402
403         return E_SUCCESS;
404 }
405
406 Color
407 _ProgressPopup::GetTextColor() const
408 {
409         return __textColor;
410 }
411
412 Rectangle
413 _ProgressPopup::GetAnimationRect(void) const
414 {
415         Rectangle animationBounds;
416
417         int defaultWidth = 0;
418         int titleHeight = 0;
419         int animationWidth = 0;
420         int noTitleProcessTop = 0;
421         int transTopMargin = 0;
422
423         GET_SHAPE_CONFIG(MESSAGEBOX::DEFAULT_WIDTH, GetOrientation(), defaultWidth);
424
425         GET_SHAPE_CONFIG(POPUP::TITLE_HEIGHT, GetOrientation(), titleHeight);
426         GET_SHAPE_CONFIG(POPUP::PROCESS_ANIMATION_WIDTH, GetOrientation(), animationWidth);
427         GET_SHAPE_CONFIG(POPUP::PROCESS_ANIMATION_NO_TITLE_TOP_MARGIN, GetOrientation(), noTitleProcessTop);
428         GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_TOP_MARGIN, GetOrientation(), transTopMargin);
429
430         if (HasTitle())
431         {
432                 animationBounds = Rectangle((defaultWidth - animationWidth) / 2, titleHeight + transTopMargin, animationWidth, animationWidth);
433         }
434         else if (HasText() || HasButton())
435         {
436                 animationBounds = Rectangle((defaultWidth - animationWidth) / 2, noTitleProcessTop + transTopMargin, animationWidth, animationWidth);
437         }
438         else
439         {
440                 animationBounds = __animationRect;
441         }
442
443         return animationBounds;
444 }
445
446 bool
447 _ProgressPopup::HasText(void) const
448 {
449         return __textState;
450 }
451
452 bool
453 _ProgressPopup::HasButton(void) const
454 {
455         return (__buttonState && !__isTranslucent);
456 }
457
458 bool
459 _ProgressPopup::IsTranslucent(void) const
460 {
461         return __isTranslucent;
462 }
463
464 void
465 _ProgressPopup::FireProgressPopupEvent(void)
466 {
467         if (__pProgressPopupEvent != null)
468         {
469                 Tizen::Base::Runtime::IEventArg* pEventArg = _ProgressPopupEvent::CreateProgressPopupEventArgN();
470                 result r = GetLastResult();
471                 SysTryReturnVoidResult(NID_UI_CTRL, pEventArg != null, r, "[%s] Propagating.", GetErrorMessage(r));
472
473                 __pProgressPopupEvent->Fire(*pEventArg);
474         }
475 }
476
477 void
478 _ProgressPopup::OnDraw(void)
479 {
480         __pProgressPopupPresenter->Draw();
481 }
482
483 void
484 _ProgressPopup::OnFontChanged(Font * pFont)
485 {
486         __pProgressPopupPresenter->OnFontChanged(pFont);
487 }
488
489 void
490 _ProgressPopup::OnFontInfoRequested(unsigned long& style, int& size)
491 {
492         __pProgressPopupPresenter->OnFontInfoRequested(style, size);
493 }
494
495 void
496 _ProgressPopup::OnActionPerformed(const Tizen::Ui::_Control& source, int actionId)
497 {
498         switch (actionId)
499         {
500         case ID_PROGRESS_POPUP_CANCEL_BUTTON:
501                 {
502                         FireProgressPopupEvent();
503                         _Popup::SetReturnValue(POPUP_RESULT_CANCEL);
504                         break;
505                 }
506
507         default:
508                 break;
509         }
510 }
511
512 void
513 _ProgressPopup::OnBoundsChanged(void)
514 {
515         SetClientBounds(Rectangle(0, 0, GetBounds().width, GetBounds().height));
516
517         return;
518 }
519
520 void
521 _ProgressPopup::OnVisibleStateChanged(void)
522 {
523         _Popup::OnVisibleStateChanged();
524 }
525
526 result
527 _ProgressPopup::OnAttachedToMainTree(void)
528 {
529
530         SysTryReturn(NID_UI_CTRL, GetVisibleState() != false, E_INVALID_OPERATION,
531                                 E_INVALID_OPERATION, "[E_INVALID_OPERATION] This control is not 'displayable'");
532
533         InitializeAccessibilityElement();
534
535         return E_SUCCESS;
536 }
537
538 void
539 _ProgressPopup::OnActivated(void)
540 {
541         __pProgressPopupPresenter->PlayProcessAnimation();
542
543         _Popup::OnActivated();
544 }
545
546 void
547 _ProgressPopup::OnDeactivated(void)
548 {
549         __pProgressPopupPresenter->StopProcessAnimation();
550
551         _Popup::OnDeactivated();
552 }
553
554 void
555 _ProgressPopup::InitializeAccessibilityElement(void)
556 {
557         if (likely(!(_AccessibilityManager::IsActivated())))
558         {
559                 return;
560         }
561
562         if ((_pTitleTextAccessibilityElement != null) && (__pTextAccessibilityElement != null))
563         {
564                 return;
565         }
566
567         _AccessibilityContainer* pContainer = GetAccessibilityContainer();
568         if (pContainer != null)
569         {
570                 if (_pTitleTextAccessibilityElement == null)
571                 {
572                         _pTitleTextAccessibilityElement = new (std::nothrow) _AccessibilityElement(true);
573                         SysTryReturnVoidResult(NID_UI_CTRL, _pTitleTextAccessibilityElement != null, E_OUT_OF_MEMORY,"[E_OUT_OF_MEMORY] Memory allocation failed.");
574
575                         _pTitleTextAccessibilityElement->Construct(L"ProgressPopupTitleText", __pProgressPopupPresenter->GetTitleBounds());
576                         _pTitleTextAccessibilityElement->SetLabel(GetTitleText());
577                         _pTitleTextAccessibilityElement->SetTrait(ACCESSIBILITY_TRAITS_TEXT_FIELD);
578
579                         pContainer->AddElement(*_pTitleTextAccessibilityElement);
580                 }
581
582                 if (__pTextAccessibilityElement == null)
583                 {
584                         __pTextAccessibilityElement = new (std::nothrow) _AccessibilityElement(true);
585                         SysTryReturnVoidResult(NID_UI_CTRL, __pTextAccessibilityElement != null, E_OUT_OF_MEMORY,"[E_OUT_OF_MEMORY] Memory allocation failed.");
586
587                         __pTextAccessibilityElement->Construct(L"ProgressPopupText", __pProgressPopupPresenter->GetTextBounds());
588                         __pTextAccessibilityElement->SetLabel(GetText());
589                         __pTextAccessibilityElement->SetTrait(ACCESSIBILITY_TRAITS_TEXT_FIELD);
590
591                         pContainer->AddElement(*__pTextAccessibilityElement);
592                 }
593
594                 if (HasButton() == true)
595                 {
596                         _ControlImpl* pImpl = null;
597                         _Button* pButtonCore = null;
598
599                         pImpl = _ControlImpl::GetInstance(*__pButton);
600
601                         pButtonCore = dynamic_cast<_Button*>(&pImpl->GetCore());
602                         result r = GetLastResult();
603                         SysTryReturnVoidResult(NID_UI_CTRL, pButtonCore != null, r, "[%s] Propagating.", GetErrorMessage(r));
604
605                         _AccessibilityContainer* pButtonContainer = pButtonCore->GetAccessibilityContainer();
606                         if (pButtonContainer != null)
607                         {
608                                 _AccessibilityElement* pButtonElement = pButtonContainer->GetChildElement(L"ButtonText");
609                                 if (pButtonElement != null)
610                                 {
611                                         pButtonElement->SetName(L"ProgressPopupButton1");
612                                 }
613
614                                 // Add Container
615                                 pContainer->AddChildContainer(*pButtonContainer);
616                         }
617                 }
618
619         }
620
621         return;
622 }
623
624
625 void
626 _ProgressPopup::OnChangeLayout(_ControlOrientation orientation)
627 {
628         SysTryReturnVoidResult(NID_UI_CTRL, _pDimmingLayer != null, E_SYSTEM, "[E_SYSTEM] There is no Dimming Layer.");
629
630         result r = E_SUCCESS;
631
632         r = _pDimmingLayer->Rearrange();
633         SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
634 }
635
636 bool
637 _ProgressPopup::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo)
638 {
639         if (&source != this)
640         {
641                 return false;
642         }
643
644         return __pProgressPopupPresenter->OnTouchPressed(source, touchinfo);
645 }
646
647 bool
648 _ProgressPopup::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo)
649 {
650         if (&source != this)
651         {
652                 return false;
653         }
654
655         return __pProgressPopupPresenter->OnTouchMoved(source, touchinfo);
656 }
657
658 bool
659 _ProgressPopup::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo)
660 {
661         if (&source != this)
662         {
663                 return false;
664         }
665
666         return __pProgressPopupPresenter->OnTouchReleased(source, touchinfo);
667 }
668
669
670 }}} // Tizen::Ui::Controls
671