2 // Open Service Platform
3 // Copyright (c) 2012-2013 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 FUiCtrl_ProgressPopupPresenter.cpp
20 * @brief This is the implementation file for the _ProgressPopupPresenter class.
24 #include <FBaseErrorDefine.h>
25 #include <FBaseSysLog.h>
26 #include <FGrp_BitmapImpl.h>
27 #include <FGrp_CanvasImpl.h>
28 #include <FGrp_TextTextSimple.h>
29 #include "FUi_ResourceManager.h"
30 #include "FUi_UiTouchEvent.h"
31 #include "FUiCtrl_ProgressPopupPresenter.h"
32 #include "FUiCtrl_ProgressPopup.h"
35 using namespace Tizen::Base;
36 using namespace Tizen::Base::Collection;
37 using namespace Tizen::Base::Runtime;
38 using namespace Tizen::Graphics;
39 using namespace Tizen::Graphics::_Text;
40 using namespace Tizen::Ui;
41 using namespace Tizen::Ui::Animations;
44 namespace Tizen { namespace Ui { namespace Controls
48 _ProgressPopupPresenter::_ProgressPopupPresenter(void)
49 : __pProgressPopup(null)
50 , __pTitleTextObject(null)
51 , __pBodyTextObject(null)
52 , __titleBounds(0, 0, 0, 0)
53 , __textBounds(0, 0, 0, 0)
54 , __animationBounds(0, 0, 0, 0)
56 , __pAnimationFrameList(null)
59 , __textObjectHeight(0)
61 , __buttonPressState(false)
62 , __cancelButton(false)
63 , __translucent(false)
65 for (int i = 0; i < MAX_PROCESS_IMAGE_COUNT; i++)
67 __pProcessImage[i] = null;
71 _ProgressPopupPresenter::~_ProgressPopupPresenter(void)
73 for (int i = 0; i < MAX_PROCESS_IMAGE_COUNT; i++)
75 delete __pProcessImage[i];
76 __pProcessImage[i] = null;
79 if (__pTitleTextObject != null)
81 __pTitleTextObject->RemoveAll();
82 delete __pTitleTextObject;
83 __pTitleTextObject = null;
86 if (__pBodyTextObject != null)
88 __pBodyTextObject->RemoveAll();
89 delete __pBodyTextObject;
90 __pBodyTextObject = null;
93 if (__pAnimationFrameList != null)
95 __pAnimationFrameList->RemoveAll(true);
96 delete __pAnimationFrameList;
97 __pAnimationFrameList = null;
100 if (__pAnimation != null)
109 _ProgressPopupPresenter::Initialize(_ProgressPopup& ProgressPopup, bool cancelButton, bool translucent, const Rectangle& animationRect)
111 result r = E_SUCCESS;
113 __cancelButton = cancelButton;
114 __translucent = translucent;
115 __pProgressPopup = &ProgressPopup;
121 _ProgressPopupPresenter::SetTitleTextObject(void)
123 int titleTextSize = 0;
124 int defaultWidth = 0;
126 int titleTopMargin = 0;
127 int titleLeftMargin = 0;
128 int titleRightMargin = 0;
130 int transTopMargin = 0;
131 int transLeftMargin = 0;
132 int transRightMargin = 0;
134 GET_SHAPE_CONFIG(POPUP::TITLE_TEXT_SIZE, __pProgressPopup->GetOrientation(), titleTextSize);
135 GET_SHAPE_CONFIG(MESSAGEBOX::DEFAULT_WIDTH, __pProgressPopup->GetOrientation(), defaultWidth);
136 GET_SHAPE_CONFIG(POPUP::TITLE_HEIGHT, __pProgressPopup->GetOrientation(), titleHeight);
137 GET_SHAPE_CONFIG(POPUP::TITLE_TEXT_TOP_MARGIN, __pProgressPopup->GetOrientation(), titleTopMargin);
138 GET_SHAPE_CONFIG(POPUP::TITLE_TEXT_LEFT_MARGIN, __pProgressPopup->GetOrientation(), titleLeftMargin);
139 GET_SHAPE_CONFIG(POPUP::TITLE_TEXT_RIGHT_MARGIN, __pProgressPopup->GetOrientation(), titleRightMargin);
141 GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_TOP_MARGIN, __pProgressPopup->GetOrientation(), transTopMargin);
142 GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_LEFT_MARGIN, __pProgressPopup->GetOrientation(), transLeftMargin);
143 GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_RIGHT_MARGIN, __pProgressPopup->GetOrientation(), transRightMargin);
145 if (__pProgressPopup->HasTitle())
147 result r = E_SUCCESS;
149 __pTitleTextObject = new (std::nothrow) TextObject();
150 SysTryReturnVoidResult(NID_UI_CTRL, __pTitleTextObject != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
152 r = SetFontInfo(FONT_STYLE_PLAIN, titleTextSize);
153 SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Failed to set font.", GetErrorMessage(r));
155 __pTitleTextObject->Construct();
156 TextSimple* pSimpleTextForTitleText = new (std::nothrow) TextSimple(const_cast <wchar_t*>(__pProgressPopup->GetTitleText().GetPointer()),
157 __pProgressPopup->GetTitleText().GetLength(),
158 TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL);
159 SysTryCatch(NID_UI_CTRL, pSimpleTextForTitleText != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
161 __pTitleTextObject->AppendElement(*pSimpleTextForTitleText);
162 __pTitleTextObject->SetForegroundColor(__pProgressPopup->GetTitleTextColor(), 0, __pTitleTextObject->GetTextLength());
163 __pTitleTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE);
164 __pTitleTextObject->SetAction(TEXT_OBJECT_ACTION_TYPE_ABBREV);
165 __pTitleTextObject->SetTextObjectEllipsisType(TEXT_OBJECT_ELLIPSIS_TYPE_TAIL);
167 __pTitleTextObject->SetFont(_pFont, 0, __pTitleTextObject->GetTextLength());
168 __pTitleTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT);
169 __pTitleTextObject->SetBounds(Rectangle(titleLeftMargin + transLeftMargin,
171 defaultWidth - (titleLeftMargin + titleRightMargin + transLeftMargin + transRightMargin),
172 titleHeight - titleTopMargin));
173 __pTitleTextObject->Compose();
175 __titleBounds = Rectangle(titleLeftMargin + transLeftMargin,
177 defaultWidth - (titleLeftMargin + titleRightMargin + transLeftMargin + transRightMargin),
178 titleHeight - titleTopMargin);
184 delete __pTitleTextObject;
185 __pTitleTextObject = null;
191 _ProgressPopupPresenter::SetTextObject(void)
193 int bodyTextSize = 0;
194 int defaultWidth = 0;
197 int btnBottomMargin = 0;
198 int textLeftMargin = 0;
199 int textRightMargin = 0;
200 int bottomHeight = 0;
201 int transTopMargin = 0;
202 int transBottomMargin = 0;
203 int transLeftMargin = 0;
204 int transRightMargin = 0;
205 int animationWidth = 0;
206 int textTopMargin = 0;
207 int textBottomMargin = 0;
208 int noTitleHeight = 0;
210 GET_SHAPE_CONFIG(POPUP::TITLE_HEIGHT, __pProgressPopup->GetOrientation(), titleHeight);
211 GET_SHAPE_CONFIG(POPUP::PROCESS_ANIMATION_NO_TITLE_TOP_MARGIN, __pProgressPopup->GetOrientation(), noTitleHeight);
212 GET_SHAPE_CONFIG(POPUP::PROCESS_ANIMATION_WIDTH, __pProgressPopup->GetOrientation(), animationWidth);
214 GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_TOP_MARGIN, __pProgressPopup->GetOrientation(), transTopMargin);
215 GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_BOTTOM_MARGIN, __pProgressPopup->GetOrientation(), transBottomMargin);
216 GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_LEFT_MARGIN, __pProgressPopup->GetOrientation(), transLeftMargin);
217 GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_RIGHT_MARGIN, __pProgressPopup->GetOrientation(), transRightMargin);
219 GET_SHAPE_CONFIG(MESSAGEBOX::PROCESS_TEXT_TOP_MARGIN, __pProgressPopup->GetOrientation(), textTopMargin);
220 GET_SHAPE_CONFIG(MESSAGEBOX::PROCESS_TEXT_BOTTOM_MARGIN, __pProgressPopup->GetOrientation(), textBottomMargin);
221 GET_SHAPE_CONFIG(MESSAGEBOX::TEXT_LEFT_MARGIN, __pProgressPopup->GetOrientation(), textLeftMargin);
222 GET_SHAPE_CONFIG(MESSAGEBOX::TEXT_RIGHT_MARGIN, __pProgressPopup->GetOrientation(), textRightMargin);
223 GET_SHAPE_CONFIG(MESSAGEBOX::TEXT_SIZE, __pProgressPopup->GetOrientation(), bodyTextSize);
225 GET_SHAPE_CONFIG(MESSAGEBOX::MAX_HEIGHT, __pProgressPopup->GetOrientation(), maxHeight);
226 GET_SHAPE_CONFIG(MESSAGEBOX::DEFAULT_WIDTH, __pProgressPopup->GetOrientation(), defaultWidth);
227 GET_SHAPE_CONFIG(MESSAGEBOX::BOTTOM_HEIGHT, __pProgressPopup->GetOrientation(), bottomHeight);
228 GET_SHAPE_CONFIG(MESSAGEBOX::BUTTON_BOTTOM_MARGIN, __pProgressPopup->GetOrientation(), btnBottomMargin);
231 if (__pProgressPopup->HasTitle())
240 if (__pProgressPopup->HasText())
242 result r = E_SUCCESS;
244 __pBodyTextObject = new (std::nothrow) TextObject();
245 SysTryReturnVoidResult(NID_UI_CTRL, __pBodyTextObject != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
247 if (__pProgressPopup->HasButton())
249 GET_SHAPE_CONFIG(MESSAGEBOX::BOTTOM_HEIGHT, __pProgressPopup->GetOrientation(), bottomHeight);
252 r = SetFontInfo(FONT_STYLE_PLAIN, bodyTextSize);
253 SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Failed to set font.", GetErrorMessage(r));
255 __pBodyTextObject->Construct();
256 TextSimple* pSimpleTextForBodyText = new (std::nothrow) TextSimple(const_cast <wchar_t*>(__pProgressPopup->GetText().GetPointer()),
257 __pProgressPopup->GetText().GetLength(),
258 TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL);
259 SysTryCatch(NID_UI_CTRL, pSimpleTextForBodyText != null, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
261 __pBodyTextObject->AppendElement(*pSimpleTextForBodyText);
262 __pBodyTextObject->SetForegroundColor(__pProgressPopup->GetTextColor(), 0, __pBodyTextObject->GetTextLength());
263 __pBodyTextObject->SetWrap(TEXT_OBJECT_WRAP_TYPE_WORD);
264 __pBodyTextObject->SetFont(_pFont, 0, __pBodyTextObject->GetTextLength());
265 __pBodyTextObject->SetAlignment(TEXT_OBJECT_ALIGNMENT_LEFT);
266 __pBodyTextObject->SetBounds(Rectangle(textLeftMargin + transLeftMargin,
267 titleHeight + animationWidth + noTitleHeight,
268 defaultWidth - (textLeftMargin + textRightMargin + transLeftMargin + transRightMargin),
269 maxHeight - titleHeight - bottomHeight - animationWidth));
270 __pBodyTextObject->Compose();
272 // Calculate Text bounds
273 __textObjectHeight = __pBodyTextObject->GetTotalHeight();
275 int totalHeightExceptTextObj = titleHeight + animationWidth + textTopMargin + textBottomMargin + bottomHeight + (transTopMargin + transBottomMargin);
276 int tmpH = maxHeight - (totalHeightExceptTextObj + __textObjectHeight);
278 __textObjectHeight = (tmpH > 0) ? __textObjectHeight : __textObjectHeight + tmpH;
280 __textBounds.SetBounds(textLeftMargin + transLeftMargin,
281 titleHeight + textTopMargin + transTopMargin + animationWidth + noTitleHeight,
282 defaultWidth - (textLeftMargin + textRightMargin + transLeftMargin + transRightMargin),
285 __pBodyTextObject->SetBounds(__textBounds);
291 delete __pBodyTextObject;
292 __pBodyTextObject = null;
298 _ProgressPopupPresenter::PlayProcessAnimation(void)
300 if (__pAnimation != null)
302 if (__pAnimation->GetStatus() == ANIMATION_PLAYING)
309 SetProcessAnimation();
312 if (__pAnimation != null)
314 __pAnimation->Play();
322 _ProgressPopupPresenter::StopProcessAnimation(void)
324 __pAnimation->Stop();
326 __pProgressPopup->DetachChild(*__pAnimation);
335 _ProgressPopupPresenter::SetProcessAnimation(void)
337 result r = E_SUCCESS;
339 if (__pAnimation != null)
341 if (__pAnimation->GetStatus() == ANIMATION_PLAYING)
347 // Create AnimationFrames
348 long duration = 1500 / 30;
349 Rectangle animationBounds;
350 AnimationFrame* pAniFrame[MAX_PROCESS_IMAGE_COUNT];
353 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
355 for (int i = 0; i < MAX_PROCESS_IMAGE_COUNT; i++)
359 pAniFrame[i] = new (std::nothrow) AnimationFrame(*__pProcessImage[i], duration);
360 SysTryCatch(NID_UI_CTRL, pAniFrame[i] != null, ,E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
363 __pAnimationFrameList = new (std::nothrow) ArrayList();
364 SysTryCatch(NID_UI_CTRL, __pAnimationFrameList != null, ,E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
366 if (__pAnimationFrameList != null)
368 __pAnimationFrameList->Construct();
370 for (int i = 0; i < MAX_PROCESS_IMAGE_COUNT; i++)
372 r = __pAnimationFrameList->Add(*pAniFrame[i]);
373 SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
380 __pAnimation = _Animation::CreateAnimationN();
384 if (__pAnimationFrameList)
386 __pAnimation->SetAnimationFrames(*__pAnimationFrameList);
389 __pAnimation->SetImageCount(MAX_PROCESS_IMAGE_COUNT);
390 __pAnimation->SetRepeatCount(ANIMATION_REPEAT_COUNT);
391 __pAnimation->AddAnimationEventListener(*this);
393 animationBounds = __pProgressPopup->GetAnimationRect();
394 if (__pProgressPopup->HasTitle() || __pProgressPopup->HasText() || __pProgressPopup->HasButton())
396 __pAnimation->SetBounds(FloatRectangle(animationBounds.x, animationBounds.y, animationBounds.width, animationBounds.height));
400 __pAnimation->GetVisualElement()->SetOpacity(0.6f);
401 __pAnimation->SetBounds(FloatRectangle(0, 0, animationBounds.width, animationBounds.height));
404 __pProgressPopup->AttachChild(*__pAnimation);
410 for (int i = 0; i < MAX_PROCESS_IMAGE_COUNT; i++)
412 delete __pProcessImage[i];
413 __pProcessImage[i] = null;
420 _ProgressPopupPresenter::OnAnimationStopped(const _Control & source)
422 if (&source == __pAnimation)
424 __pAnimation->Play();
429 _ProgressPopupPresenter::OnFontChanged(Font* pFont)
435 _ProgressPopupPresenter::OnFontInfoRequested(unsigned long& style, int& size)
442 _ProgressPopupPresenter::SetFontInfo(unsigned long style, int size)
447 _pFont = __pProgressPopup->GetFallbackFont();
448 SysTryReturnResult(NID_UI_CTRL, _pFont != null, GetLastResult(), "Failed to get a font.");
454 _ProgressPopupPresenter::Draw(void)
456 result r = E_SUCCESS;
458 int titleTextSize = 0;
459 int bodyTextSize = 0;
460 int defaultWidth = 0;
464 int btnTopMargin = 0;
465 int btnBottomMargin = 0;
467 int transTopMargin = 0;
468 int titleTopMargin = 0;
469 int animationWidth = 0;
471 GET_SHAPE_CONFIG(POPUP::TITLE_TEXT_SIZE, __pProgressPopup->GetOrientation(), titleTextSize);
472 GET_SHAPE_CONFIG(MESSAGEBOX::TEXT_SIZE, __pProgressPopup->GetOrientation(), bodyTextSize);
474 GET_SHAPE_CONFIG(POPUP::TITLE_HEIGHT, __pProgressPopup->GetOrientation(), titleHeight);
475 GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_TOP_MARGIN, __pProgressPopup->GetOrientation(), transTopMargin);
476 GET_SHAPE_CONFIG(POPUP::TITLE_TEXT_TOP_MARGIN, __pProgressPopup->GetOrientation(), titleTopMargin);
477 GET_SHAPE_CONFIG(POPUP::PROCESS_ANIMATION_WIDTH, __pProgressPopup->GetOrientation(), animationWidth);
479 GET_SHAPE_CONFIG(MESSAGEBOX::DEFAULT_WIDTH, __pProgressPopup->GetOrientation(), defaultWidth);
480 GET_SHAPE_CONFIG(MESSAGEBOX::BUTTON_HEIGHT, __pProgressPopup->GetOrientation(), btnHeight);
481 GET_SHAPE_CONFIG(MESSAGEBOX::BUTTON_TOP_MARGIN, __pProgressPopup->GetOrientation(), btnTopMargin);
482 GET_SHAPE_CONFIG(MESSAGEBOX::BUTTON_BOTTOM_MARGIN, __pProgressPopup->GetOrientation(), btnBottomMargin);
484 Canvas* pCanvas = __pProgressPopup->GetCanvasN();
485 SysTryReturnVoidResult(NID_UI_CTRL, (pCanvas != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Unable to create canvas.");
487 pCanvas->SetBackgroundColor(Color(0x00000000));
490 bool hasBgBitmap = (__pProgressPopup->GetBackgroundBitmap() != null);
492 int totalH = __pProgressPopup->GetTotalHeight();
495 if (hasBgBitmap && (__pProgressPopup->HasTitle() || __pProgressPopup->HasText() || __pProgressPopup->HasButton()))
497 Rectangle bounds(0, 0, defaultWidth, totalH);
499 const Bitmap* pBackgroundBitmap = __pProgressPopup->GetBackgroundBitmap();
500 if (pBackgroundBitmap->IsNinePatchedBitmap() == true)
502 pCanvas->DrawNinePatchedBitmap(bounds, *pBackgroundBitmap);
506 pCanvas->DrawBitmap(bounds, *pBackgroundBitmap);
511 if (__pTitleTextObject != null)
513 r = SetFontInfo(FONT_STYLE_PLAIN, titleTextSize);
514 SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Failed to set font.", GetErrorMessage(r));
516 __pTitleTextObject->SetFont(_pFont, 0, __pTitleTextObject->GetTextLength());
517 __pTitleTextObject->SetBounds(__titleBounds);
518 __pTitleTextObject->Draw(*_CanvasImpl::GetInstance(*pCanvas));
522 if (__pBodyTextObject != null)
524 r = SetFontInfo(FONT_STYLE_PLAIN, bodyTextSize);
525 SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
527 __pBodyTextObject->SetFont(_pFont, 0, __pBodyTextObject->GetTextLength());
529 __pBodyTextObject->Draw(*_CanvasImpl::GetInstance(*pCanvas));
540 _ProgressPopupPresenter::DoModal(int& modalResult)
542 __pProgressPopup->Open();
546 __pProgressPopup->Close();
548 modalResult = __pProgressPopup->GetPopupReturnValue();
554 _ProgressPopupPresenter::GetBodyTextHeight(void) const
556 return (__pBodyTextObject == null) ? 0 : __pBodyTextObject->GetTotalHeight();
560 _ProgressPopupPresenter::GetTitleBounds(void) const
562 return __titleBounds;
566 _ProgressPopupPresenter::GetTextBounds(void) const
572 _ProgressPopupPresenter::GetButtonBounds(void) const
579 int defaultWidth = 0;
582 int btnSideMargin1 = 0;
583 int btnTopMargin = 0;
584 int transTopMargin = 0;
585 int animationWidth = 0;
586 int noTitleHeight = 0;
587 int textTopMargin = 0;
588 int textBottomMargin = 0;
590 GET_SHAPE_CONFIG(POPUP::TITLE_HEIGHT, __pProgressPopup->GetOrientation(), titleHeight);
591 GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_TOP_MARGIN, __pProgressPopup->GetOrientation(), transTopMargin);
592 GET_SHAPE_CONFIG(POPUP::PROCESS_ANIMATION_WIDTH, __pProgressPopup->GetOrientation(), animationWidth);
593 GET_SHAPE_CONFIG(POPUP::PROCESS_ANIMATION_NO_TITLE_TOP_MARGIN, __pProgressPopup->GetOrientation(), noTitleHeight);
594 GET_SHAPE_CONFIG(POPUP::PROCESS_TEXT_TOP_MARGIN, __pProgressPopup->GetOrientation(), textTopMargin);
595 GET_SHAPE_CONFIG(POPUP::PROCESS_TEXT_BOTTOM_MARGIN, __pProgressPopup->GetOrientation(), textBottomMargin);
597 GET_SHAPE_CONFIG(MESSAGEBOX::DEFAULT_WIDTH, __pProgressPopup->GetOrientation(), defaultWidth);
598 GET_SHAPE_CONFIG(MESSAGEBOX::BUTTON_HEIGHT, __pProgressPopup->GetOrientation(), btnHeight);
599 GET_SHAPE_CONFIG(MESSAGEBOX::BUTTON_SIDE_MARGIN_01, __pProgressPopup->GetOrientation(), btnSideMargin1);
600 GET_SHAPE_CONFIG(MESSAGEBOX::BUTTON_TOP_MARGIN, __pProgressPopup->GetOrientation(), btnTopMargin);
602 if (!__pProgressPopup->HasButton())
604 return Rectangle(0, 0, 0, 0);
607 if (__pProgressPopup->HasTitle())
616 if (!__pProgressPopup->HasText())
619 textBottomMargin = 0;
622 width = defaultWidth - (btnSideMargin1 * 2);
632 + GetBodyTextHeight()
635 return Rectangle(x, y, width, height);
639 _ProgressPopupPresenter::OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo)
641 __buttonPressState = true;
647 _ProgressPopupPresenter::OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo)
649 __buttonPressState = false;
655 _ProgressPopupPresenter::OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo)
657 Point touchPoint = touchinfo.GetCurrentPosition();
663 _ProgressPopupPresenter::LoadImages(void)
665 result r = E_SUCCESS;
667 r = GET_BITMAP_CONFIG_N(POPUP::PROCESS_ICON_IMAGE_NORMAL_01, BITMAP_PIXEL_FORMAT_ARGB8888, __pProcessImage[0]);
668 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
670 r = GET_BITMAP_CONFIG_N(POPUP::PROCESS_ICON_IMAGE_NORMAL_02, BITMAP_PIXEL_FORMAT_ARGB8888, __pProcessImage[1]);
671 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
673 r = GET_BITMAP_CONFIG_N(POPUP::PROCESS_ICON_IMAGE_NORMAL_03, BITMAP_PIXEL_FORMAT_ARGB8888, __pProcessImage[2]);
674 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
676 r = GET_BITMAP_CONFIG_N(POPUP::PROCESS_ICON_IMAGE_NORMAL_04, BITMAP_PIXEL_FORMAT_ARGB8888, __pProcessImage[3]);
677 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
679 r = GET_BITMAP_CONFIG_N(POPUP::PROCESS_ICON_IMAGE_NORMAL_05, BITMAP_PIXEL_FORMAT_ARGB8888, __pProcessImage[4]);
680 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
682 r = GET_BITMAP_CONFIG_N(POPUP::PROCESS_ICON_IMAGE_NORMAL_06, BITMAP_PIXEL_FORMAT_ARGB8888, __pProcessImage[5]);
683 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
685 r = GET_BITMAP_CONFIG_N(POPUP::PROCESS_ICON_IMAGE_NORMAL_07, BITMAP_PIXEL_FORMAT_ARGB8888, __pProcessImage[6]);
686 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
688 r = GET_BITMAP_CONFIG_N(POPUP::PROCESS_ICON_IMAGE_NORMAL_08, BITMAP_PIXEL_FORMAT_ARGB8888, __pProcessImage[7]);
689 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
691 r = GET_BITMAP_CONFIG_N(POPUP::PROCESS_ICON_IMAGE_NORMAL_09, BITMAP_PIXEL_FORMAT_ARGB8888, __pProcessImage[8]);
692 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
694 r = GET_BITMAP_CONFIG_N(POPUP::PROCESS_ICON_IMAGE_NORMAL_10, BITMAP_PIXEL_FORMAT_ARGB8888, __pProcessImage[9]);
695 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
697 r = GET_BITMAP_CONFIG_N(POPUP::PROCESS_ICON_IMAGE_NORMAL_11, BITMAP_PIXEL_FORMAT_ARGB8888, __pProcessImage[10]);
698 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
700 r = GET_BITMAP_CONFIG_N(POPUP::PROCESS_ICON_IMAGE_NORMAL_12, BITMAP_PIXEL_FORMAT_ARGB8888, __pProcessImage[11]);
701 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
703 r = GET_BITMAP_CONFIG_N(POPUP::PROCESS_ICON_IMAGE_NORMAL_13, BITMAP_PIXEL_FORMAT_ARGB8888, __pProcessImage[12]);
704 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
706 r = GET_BITMAP_CONFIG_N(POPUP::PROCESS_ICON_IMAGE_NORMAL_14, BITMAP_PIXEL_FORMAT_ARGB8888, __pProcessImage[13]);
707 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
709 r = GET_BITMAP_CONFIG_N(POPUP::PROCESS_ICON_IMAGE_NORMAL_15, BITMAP_PIXEL_FORMAT_ARGB8888, __pProcessImage[14]);
710 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
712 r = GET_BITMAP_CONFIG_N(POPUP::PROCESS_ICON_IMAGE_NORMAL_16, BITMAP_PIXEL_FORMAT_ARGB8888, __pProcessImage[15]);
713 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
715 r = GET_BITMAP_CONFIG_N(POPUP::PROCESS_ICON_IMAGE_NORMAL_17, BITMAP_PIXEL_FORMAT_ARGB8888, __pProcessImage[16]);
716 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
718 r = GET_BITMAP_CONFIG_N(POPUP::PROCESS_ICON_IMAGE_NORMAL_18, BITMAP_PIXEL_FORMAT_ARGB8888, __pProcessImage[17]);
719 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
721 r = GET_BITMAP_CONFIG_N(POPUP::PROCESS_ICON_IMAGE_NORMAL_19, BITMAP_PIXEL_FORMAT_ARGB8888, __pProcessImage[18]);
722 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
724 r = GET_BITMAP_CONFIG_N(POPUP::PROCESS_ICON_IMAGE_NORMAL_20, BITMAP_PIXEL_FORMAT_ARGB8888, __pProcessImage[19]);
725 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
727 r = GET_BITMAP_CONFIG_N(POPUP::PROCESS_ICON_IMAGE_NORMAL_21, BITMAP_PIXEL_FORMAT_ARGB8888, __pProcessImage[20]);
728 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
730 r = GET_BITMAP_CONFIG_N(POPUP::PROCESS_ICON_IMAGE_NORMAL_22, BITMAP_PIXEL_FORMAT_ARGB8888, __pProcessImage[21]);
731 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
733 r = GET_BITMAP_CONFIG_N(POPUP::PROCESS_ICON_IMAGE_NORMAL_23, BITMAP_PIXEL_FORMAT_ARGB8888, __pProcessImage[22]);
734 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
736 r = GET_BITMAP_CONFIG_N(POPUP::PROCESS_ICON_IMAGE_NORMAL_24, BITMAP_PIXEL_FORMAT_ARGB8888, __pProcessImage[23]);
737 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
739 r = GET_BITMAP_CONFIG_N(POPUP::PROCESS_ICON_IMAGE_NORMAL_25, BITMAP_PIXEL_FORMAT_ARGB8888, __pProcessImage[24]);
740 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
742 r = GET_BITMAP_CONFIG_N(POPUP::PROCESS_ICON_IMAGE_NORMAL_26, BITMAP_PIXEL_FORMAT_ARGB8888, __pProcessImage[25]);
743 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
745 r = GET_BITMAP_CONFIG_N(POPUP::PROCESS_ICON_IMAGE_NORMAL_27, BITMAP_PIXEL_FORMAT_ARGB8888, __pProcessImage[26]);
746 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
748 r = GET_BITMAP_CONFIG_N(POPUP::PROCESS_ICON_IMAGE_NORMAL_28, BITMAP_PIXEL_FORMAT_ARGB8888, __pProcessImage[27]);
749 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
751 r = GET_BITMAP_CONFIG_N(POPUP::PROCESS_ICON_IMAGE_NORMAL_29, BITMAP_PIXEL_FORMAT_ARGB8888, __pProcessImage[28]);
752 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
754 r = GET_BITMAP_CONFIG_N(POPUP::PROCESS_ICON_IMAGE_NORMAL_30, BITMAP_PIXEL_FORMAT_ARGB8888, __pProcessImage[29]);
755 SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
761 }}} // Tizen::Ui::Controls