Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / inc / FUiCtrl_MessageBoxImpl.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_MessageBoxImpl.h
20  * @brief       This is the header file for the _MessageBoxImpl class.
21  *
22  * This header file contains the declarations of the %_MessageBoxImpl class.
23  */
24
25 #ifndef _FUI_CTRL_MESSAGEBOX_IMPL_H_
26 #define _FUI_CTRL_MESSAGEBOX_IMPL_H_
27
28
29 // Includes
30 #include <FUiCtrlMessageBox.h>
31 #include "FUi_WindowImpl.h"
32 #include "FUiCtrl_MessageBox.h"
33
34
35 namespace Tizen { namespace Ui { namespace Controls
36 {
37
38
39 class _MessageBoxImpl
40         : public _WindowImpl
41 {
42 public:
43         _MessageBoxImpl(MessageBox* pPublic, _MessageBox* pCore);
44         virtual ~_MessageBoxImpl(void);
45
46         virtual const char* GetPublicClassName(void) const;
47         virtual const MessageBox& GetPublic(void) const;
48         virtual MessageBox& GetPublic(void);
49         virtual const _MessageBox& GetCore(void) const;
50         virtual _MessageBox& GetCore(void);
51
52 public:
53         static _MessageBoxImpl* CreateMessageBoxImplN(MessageBox* pControl);
54         result Initialize(const Tizen::Base::String& title, const Tizen::Base::String& text, MessageBoxStyle style, unsigned long timeout);
55
56         virtual result ShowAndWait(int& modalResult);
57
58         Tizen::Graphics::Rectangle GetCenterAlignRect(int width, int height) const;
59
60         virtual void OnChangeLayout(Tizen::Ui::_ControlOrientation orientation);
61
62 public:
63         void SetColor(const Tizen::Graphics::Color& color);
64         Tizen::Graphics::Color GetColor(void) const;
65
66         void SetTitleTextColor(const Tizen::Graphics::Color& color);
67         Tizen::Graphics::Color GetTitleTextColor(void) const;
68
69         void SetTextColor(const Tizen::Graphics::Color& color);
70         Tizen::Graphics::Color GetTextColor(void) const;
71
72         MessageBoxStyle GetMessageBoxStyle(void) const;
73         Tizen::Base::String GetTitleText(void) const;
74         Tizen::Base::String GetText(void) const;
75         unsigned long GetTimeout(void) const;
76         int GetMaxTextLength(void) const;
77
78 public:
79         static _MessageBoxImpl* GetInstance(MessageBox& pMessageBox);
80         static const _MessageBoxImpl* GetInstance(const MessageBox& pMessageBox);
81
82 private:
83         _MessageBoxImpl(const _MessageBoxImpl& rhs);
84         _MessageBoxImpl& operator =(const _MessageBoxImpl& rhs);
85
86 }; // _MessageBoxImpl
87
88
89 }}} // Tizen::Ui::Controls
90
91 #endif //_FUI_CTRL_MESSAGEBOX_IMPL_H_