2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0/
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
42 * @class _ProgressPopupPresenter
50 class _ProgressPopupPresenter
51 : public _PopupPresenter
52 , public Tizen::Ui::Controls::_IAnimationEventListener
53 , virtual public Tizen::Base::Runtime::IEventListener
57 _ProgressPopupPresenter(void);
58 virtual ~_ProgressPopupPresenter(void);
62 result Initialize(_ProgressPopup& ProgressPopup, bool cancelButton, bool transparent, const Tizen::Graphics::FloatRectangle& animationRect);
64 void SetTitleTextObject(void);
65 void SetTextObject(void);
67 virtual void Draw(void);
69 virtual result DoModal(int& modalResult);
71 float GetBodyTextHeight(void) const;
72 float GetBodyTextObjHeight(void) const;
74 Tizen::Graphics::FloatRectangle GetButtonBounds(void);
75 Tizen::Graphics::FloatRectangle GetTextBounds(void) const;
77 result PlayProcessAnimation(void);
78 result StopProcessAnimation(void);
79 result SetProcessAnimation(void);
80 result UpdateProcessAnimation(void);
82 // Touch Event Listener
83 virtual bool OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo);
84 virtual bool OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo);
85 virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo);
87 virtual void OnAnimationStopped(const Tizen::Ui::_Control& source);
89 result OnChangeLayout(_ControlOrientation orientation);
91 void InitializeAccessibilityElement(void);
94 _ProgressPopupPresenter(const _ProgressPopupPresenter& rhs);
95 _ProgressPopupPresenter& operator =(const _ProgressPopupPresenter& rhs);
96 virtual _Popup* GetCore(void);
99 _ProgressPopup* __pProgressPopup;
101 Tizen::Graphics::_Text::TextObject* __pBodyTextObject;
103 Tizen::Graphics::FloatRectangle __textBounds;
104 Tizen::Graphics::FloatRectangle __titleBgBounds;
105 Tizen::Graphics::FloatRectangle __buttonBgBounds;
107 Tizen::Ui::Controls::_Label* __pLabel;
108 Tizen::Ui::Controls::_ScrollPanel* __pScrollPanel;
110 _Animation* __pAnimation;
111 Tizen::Base::Collection::ArrayList* __pAnimationFrameList;
113 float __textObjectHeight;
114 float __bgImageMargin;
117 bool __buttonPressState;
121 static const int ANIMATION_REPEAT_COUNT = 100;
123 }; // _ProgressPopupPresenter
126 }}} // Tizen::Ui::Controls
128 #endif //_FUI_CTRL_INTERNAL_PROGRESS_POPUP_PRESENTER_H_