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_MessageBox.h
20 * @brief This is the header file for the _MessageBox class.
22 * This header file contains the declarations of the %_MessageBox class.
25 #ifndef _FUI_CTRL_INTERNAL_MESSAGEBOX_H_
26 #define _FUI_CTRL_INTERNAL_MESSAGEBOX_H_
29 #include <FUiCtrlMessageBox.h>
30 #include "FUiCtrl_Popup.h"
33 namespace Tizen { namespace Ui { namespace Controls
36 class _MessageBoxPresenter;
47 class _OSP_EXPORT_ _MessageBox
49 , virtual public Tizen::Base::Runtime::IEventListener
50 , virtual public _IUiEventListener
51 , virtual public _IUiEventPreviewer
55 virtual ~_MessageBox(void);
59 static _MessageBox* CreateMessageBoxN(void);
60 result Initialize(const Tizen::Base::String& title, const Tizen::Base::String& text, MessageBoxStyle style, unsigned long timeout);
62 virtual result ShowAndWait(int& modalResult);
64 int GetTotalHeight(void) const;
66 virtual void OnDraw(void);
68 virtual void OnFontChanged(Tizen::Graphics::Font* pFont);
69 virtual void OnFontInfoRequested(unsigned long& style, int& size);
71 virtual void OnActivated(void);
72 virtual void OnDeactivated(void);
74 virtual result OnAttachedToMainTree(void);
76 virtual void OnChangeLayout(_ControlOrientation orientation);
78 virtual void OnBoundsChanged(void);
83 MessageBoxStyle GetMsgBoxStyle(void) const;
85 unsigned long GetTimeout(void) const;
87 Tizen::Base::String GetText(void) const;
89 void SetTextColor(const Tizen::Graphics::Color& color);
90 Tizen::Graphics::Color GetTextColor(void) const;
93 result SetPresenter(const _MessageBoxPresenter& msgboxPresenter);
95 // Touch Event Listener
96 virtual bool OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo);
97 virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo);
98 virtual bool OnTouchMoved(const _Control& source, const _TouchInfo& touchinfo);
103 _MessageBox(const _MessageBox& rhs);
104 _MessageBox& operator =(const _MessageBox& rhs);
108 _MessageBoxPresenter* __pMsgboxPresenter;
110 MessageBoxStyle __msgboxStyle;
112 Tizen::Graphics::Color __textColor;
113 Tizen::Base::String __text;
115 unsigned long __timeout;
120 }}} // Tizen::Ui::Controls
122 #endif // _FUI_CTRL_INTERNAL_MESSAGEBOX_H_