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.h
20 * @brief This is the header file for the _ProgressPopupPresenter class.
22 * This header file contains the declarations of the _ProgressPopupPresenter class.
25 #ifndef _FUI_CTRL_INTERNAL_PROGRESS_POPUP_PRESENTER_H_
26 #define _FUI_CTRL_INTERNAL_PROGRESS_POPUP_PRESENTER_H_
29 #include "FUiCtrl_Animation.h"
30 #include "FUiCtrl_PopupPresenter.h"
33 namespace Tizen { namespace Ui { namespace Controls
40 * @class _ProgressPopupPresenter
48 class _ProgressPopupPresenter
49 : public _PopupPresenter
50 , public Tizen::Ui::Controls::_IAnimationEventListener
51 , virtual public Tizen::Base::Runtime::IEventListener
55 _ProgressPopupPresenter(void);
56 virtual ~_ProgressPopupPresenter(void);
60 result Initialize(_ProgressPopup& ProgressPopup, bool cancelButton, bool translucent, const Tizen::Graphics::Rectangle& animationRect);
62 void SetTitleTextObject(void);
63 void SetTextObject(void);
65 virtual void Draw(void);
67 virtual result DoModal(int& modalResult);
69 int GetBodyTextHeight(void) const;
71 Tizen::Graphics::Rectangle GetButtonBounds(void) const;
72 Tizen::Graphics::Rectangle GetTitleBounds(void) const;
73 Tizen::Graphics::Rectangle GetTextBounds(void) const;
75 result PlayProcessAnimation(void);
76 result StopProcessAnimation(void);
77 result SetProcessAnimation(void);
79 void OnFontChanged(Tizen::Graphics::Font* pFont);
80 void OnFontInfoRequested(unsigned long& style, int& size);
82 result SetFontInfo(unsigned long style, int size);
84 // Touch Event Listener
85 virtual bool OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo);
86 virtual bool OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo);
87 virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo);
89 virtual void OnAnimationStopped(const Tizen::Ui::_Control& source);
92 _ProgressPopupPresenter(const _ProgressPopupPresenter& rhs);
93 _ProgressPopupPresenter& operator =(const _ProgressPopupPresenter& rhs);
95 result LoadImages(void);
100 MAX_PROCESS_IMAGE_COUNT = 30
105 _ProgressPopup* __pProgressPopup;
107 Tizen::Graphics::_Text::TextObject* __pTitleTextObject;
108 Tizen::Graphics::_Text::TextObject* __pBodyTextObject;
110 Tizen::Graphics::Rectangle __titleBounds;
111 Tizen::Graphics::Rectangle __textBounds;
112 Tizen::Graphics::Rectangle __animationBounds;
114 Tizen::Graphics::Bitmap* __pProcessImage[MAX_PROCESS_IMAGE_COUNT];
116 _Animation* __pAnimation;
117 Tizen::Base::Collection::ArrayList* __pAnimationFrameList;
119 unsigned long __fontStyle;
122 int __textObjectHeight;
125 bool __buttonPressState;
129 static const int ANIMATION_REPEAT_COUNT = 100;
131 }; // _ProgressPopupPresenter
134 }}} // Tizen::Ui::Controls
136 #endif //_FUI_CTRL_INTERNAL_PROGRESS_POPUP_PRESENTER_H_