Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / inc / FUiCtrl_ProgressPopupImpl.h
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_ProgressPopupImpl.h
20  * @brief       This is the implementation file for the _ProgressPopupImpl class.
21  *
22  * This header file contains the declarations of the %_ProgressPopupImpl class.
23  */
24
25 #ifndef _FUI_CTRL_PROGRESS_POPUP_IMPL_H_
26 #define _FUI_CTRL_PROGRESS_POPUP_IMPL_H_
27
28 #include <FUiCtrlProgressPopup.h>
29 #include "FUiCtrl_PopupImpl.h"
30 #include "FUiCtrl_ProgressPopup.h"
31 #include "FUiCtrl_IProgressPopupEventListener.h"
32 #include "FUiCtrl_PublicProgressPopupEvent.h"
33
34
35 namespace Tizen { namespace Ui { namespace Controls
36 {
37
38
39 class _ProgressPopupImpl
40         : public _PopupImpl
41         , public _IProgressPopupEventListener
42         , virtual public Tizen::Base::Runtime::IEventListener
43 {
44 public:
45         _ProgressPopupImpl(ProgressPopup* pPublic, _ProgressPopup* pCore);
46         virtual ~_ProgressPopupImpl(void);
47
48         virtual const char* GetPublicClassName(void) const;
49         virtual const ProgressPopup& GetPublic(void) const;
50         virtual ProgressPopup& GetPublic(void);
51         virtual const _ProgressPopup& GetCore(void) const;
52         virtual _ProgressPopup& GetCore(void);
53
54 public:
55         static _ProgressPopupImpl* CreateProgressPopupImplN(ProgressPopup* pControl);
56         result Initialize(bool cancelButton, bool translucent);
57
58         result AddProgressPopupEventListener(Tizen::Ui::IProgressPopupEventListener& listener);
59         result RemoveProgressPopupEventListener(Tizen::Ui::IProgressPopupEventListener& listener);
60
61         virtual result OnAttachedToMainTree(void);
62         virtual void OnProgressPopupCanceled(void);
63         virtual void OnChangeLayout(Tizen::Ui::_ControlOrientation orientation);
64
65 public:
66         virtual result SetTitleText(const Tizen::Base::String& title);
67
68         result SetText(const Tizen::Base::String& text);
69         Tizen::Base::String GetText(void) const;
70
71         result SetTextColor(const Tizen::Graphics::Color& color);
72         Tizen::Graphics::Color GetTextColor(void) const;
73
74         int GetMaxTextLength(void) const;
75
76         Tizen::Graphics::Rectangle GetCenterAlignedRect(int width, int height) const;
77
78 public:
79         static _ProgressPopupImpl* GetInstance(ProgressPopup& pProgressPopup);
80         static const _ProgressPopupImpl* GetInstance(const ProgressPopup& pProgressPopup);
81
82 private:
83         _ProgressPopupImpl(const _ProgressPopupImpl& rhs);
84         _ProgressPopupImpl& operator =(const _ProgressPopupImpl& rhs);
85
86 private:
87         _PublicProgressPopupEvent* __pPublicProgressPopupEvent;
88
89 }; // _ProgressPopupImpl
90
91
92 }}} // Tizen::Ui::Controls
93
94 #endif //_FUI_CTRL_PROGRESS_POPUP_IMPL_H_