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_PopupPresenter.h
20 * @brief This is the header file for the _PopupPresenter class.
22 * This header file contains the declarations of the _PopupPresenter class.
25 #ifndef _FUI_CTRL_INTERNAL_POPUP_PRESENTER_H_
26 #define _FUI_CTRL_INTERNAL_POPUP_PRESENTER_H_
29 #include <FApp_AppImpl.h>
30 #include <FGrp_TextTextObject.h>
31 #include "FUiCtrl_Label.h"
32 #include "FUiCtrl_Popup.h"
34 namespace Tizen { namespace Ui { namespace Controls
40 * @class _PopupPresenter
49 : virtual public Tizen::Base::Runtime::IEventListener
50 , virtual public _IUiEventListener
51 , virtual public _IUiEventPreviewer
55 _PopupPresenter(void);
56 virtual ~_PopupPresenter(void);
60 void Initialize(_Popup& popup);
63 virtual void Draw(void);
65 virtual result DoModal(int& modalResult);
67 result SetTitleTextObject(const Tizen::Base::String& title);
69 Tizen::Ui::Controls::_Label* GetSystemLabel(void) const;
71 Tizen::Graphics::Rectangle GetTitleTextBounds(void) const;
73 void OnActivated(void);
75 void OnFontChanged(Tizen::Graphics::Font* pFont);
76 void OnFontInfoRequested(unsigned long& style, int& size);
77 void UpdateEffectBounds(void);
79 // Touch Event Listener
80 virtual bool OnTouchPressed(const _Control& source, const _TouchInfo& touchinfo);
81 virtual bool OnTouchReleased(const _Control& source, const _TouchInfo& touchinfo);
84 virtual void ProcessEvent(void);
87 _PopupPresenter(const _PopupPresenter& rhs);
88 _PopupPresenter& operator =(const _PopupPresenter& rhs);
90 void DrawSystemLabel(void);
94 Tizen::Graphics::Font* _pFont;
98 Tizen::Ui::Animations::_VisualElement* __pPopupVE;
99 Tizen::Ui::Animations::_VisualElement* __pBackgroundVE;
101 Tizen::Graphics::_Text::TextObject* __pTextObject;
102 Tizen::Ui::Controls::_Label* __pLabelCore;
103 Tizen::Graphics::Rectangle __titleBounds;
105 static const int POPUP_LABEL_GAP = 8;
106 }; // _PopupPresenter
109 }}} // Tizen::Ui::Controls
111 #endif //_FUI_CTRL_INTERNAL_POPUP_PRESENTER_H_