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_ProgressPopup.h
20 * @brief This is the header file for the _ProgressPopup class.
22 * This header file contains the declarations of the %_ProgressPopup class.
25 #ifndef _FUI_CTRL_INTERNAL_PROGRESS_POPUP_H_
26 #define _FUI_CTRL_INTERNAL_PROGRESS_POPUP_H_
29 #include <FUiCtrlProgressPopup.h>
30 #include "FUiCtrl_Popup.h"
31 #include "FUiCtrl_IActionEventListener.h"
32 #include "FUiCtrl_IProgressPopupEventListener.h"
33 #include "FUiCtrl_ProgressPopupEvent.h"
36 namespace Tizen { namespace Ui { namespace Controls
40 class _ProgressPopupPresenter;
43 * @class _ProgressPopup
53 , public _IActionEventListener
54 , virtual public Tizen::Base::Runtime::IEventListener
55 , virtual public _IUiEventListener
56 , virtual public _IUiEventPreviewer
61 virtual ~_ProgressPopup(void);
65 static _ProgressPopup* CreateProgressPopupN(void);
66 result Initialize(bool cancelButton, bool translucent, const Tizen::Graphics::Rectangle& animationRect);
68 virtual result DoModal(int& modalResult);
70 virtual void OnDraw(void);
72 virtual void OnFontChanged(Tizen::Graphics::Font* pFont);
73 virtual void OnFontInfoRequested(unsigned long& style, int& size);
75 virtual result OnAttachedToMainTree(void);
77 virtual void OnActivated(void);
78 virtual void OnDeactivated(void);
80 virtual void OnVisibleStateChanged(void);
81 virtual void OnChangeLayout(Tizen::Ui::_ControlOrientation orientation);
82 virtual void OnActionPerformed(const Tizen::Ui::_Control& source, int actionId);
84 virtual void OnBoundsChanged(void);
86 // Touch Event Listener
87 virtual bool OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo);
88 virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo);
89 virtual bool OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo);
92 result AddProgressPopupEventListener(const Tizen::Ui::Controls::_IProgressPopupEventListener& listener);
94 void FireProgressPopupEvent(void);
96 bool HasText(void) const;
97 bool HasButton(void) const;
98 bool IsTranslucent(void) const;
100 virtual result SetTitleText(const Tizen::Base::String& title);
102 result SetText(const Tizen::Base::String& text);
103 Tizen::Base::String GetText(void) const;
105 result SetTextColor(const Tizen::Graphics::Color& color);
106 Tizen::Graphics::Color GetTextColor(void) const;
108 result UpdateBounds(void);
110 int GetTotalHeight(void) const;
111 Tizen::Graphics::Rectangle GetAnimationRect(void) const;
114 result SetPresenter(const _ProgressPopupPresenter& ProgressPopupPresenter);
116 virtual void InitializeAccessibilityElement(void);
119 _ProgressPopup(void);
121 _ProgressPopup(const _ProgressPopup& rhs);
122 _ProgressPopup& operator =(const _ProgressPopup& rhs);
126 _ProgressPopupPresenter* __pProgressPopupPresenter;
127 _ProgressPopupEvent* __pProgressPopupEvent;
129 Tizen::Ui::Controls::Button* __pButton;
131 Tizen::Base::String __text;
132 Tizen::Graphics::Color __textColor;
134 Tizen::Graphics::Rectangle __animationRect;
136 Tizen::Ui::_AccessibilityElement* __pTextAccessibilityElement;
140 bool __isTranslucent;
142 // Cancel button action ID
143 static const int ID_PROGRESS_POPUP_CANCEL_BUTTON = 701;
148 }}} // Tizen::Ui::Controls
150 #endif //_FUI_CTRL_INTERNAL_PROGRESS_POPUP_H_