2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0/
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.
18 * @file FUiCtrl_Frame.h
19 * @brief This is the header file for the _Frame class.
21 * This header file contains the declarations of the %_Frame class.
23 #ifndef _FUICTRL_INTERNAL_FRAME_H_
24 #define _FUICTRL_INTERNAL_FRAME_H_
26 #include <FUiCtrlFrameTypes.h>
27 #include "FUi_Window.h"
29 namespace Tizen { namespace Ui { namespace Controls {
31 class _FramePresenter;
33 class _IFrameEventListener;
34 class _IFormActivationChangeEventListener;
43 class _OSP_EXPORT_ _Frame
44 : public Tizen::Ui::_Window
45 , virtual public Tizen::Base::Runtime::IEventListener
46 , virtual public Tizen::Ui::_IUiEventListener
47 , virtual public Tizen::Ui::_IUiEventPreviewer
51 static _Frame* CreateFrameN(void);
52 virtual ~_Frame(void);
55 virtual void OnDraw(void);
56 virtual void OnActivated(void);
57 virtual void OnChildAttached(const Tizen::Ui::_Control& child);
58 virtual void OnChildDetached(const Tizen::Ui::_Control& child);
59 virtual bool OnNotifiedN(const Tizen::Ui::_Control& source, Tizen::Base::Collection::IList* pArgs);
60 virtual void OnFrameActivated(void);
61 virtual void OnFrameDeactivated(void);
62 virtual void OnFrameMinimized(void);
63 virtual void OnFrameRestored(void);
64 virtual result OnBoundsChanging(const Tizen::Graphics::FloatRectangle& bounds);
65 virtual result OnAttached(void);
66 virtual void OnBackgroundColorChanged(Tizen::Graphics::Color& backgroundColor);
69 void SetCurrentForm(const Tizen::Ui::Controls::_Form* pForm);
70 Tizen::Ui::Controls::_Form* GetCurrentForm(void) const;
73 virtual bool IsOrientationRoot(void) const;
74 void SetRotation(bool rotation);
77 void AddFrameEventListener(const Tizen::Ui::Controls::_IFrameEventListener& listener);
78 void RemoveFrameEventListener(const Tizen::Ui::Controls::_IFrameEventListener& listener);
79 void SetFormActivationChangeEventListener(const Tizen::Ui::Controls::_IFormActivationChangeEventListener* plistener);
82 void SetFloatingBounds(const Tizen::Graphics::Rectangle& rect);
83 void SetFloatingBounds(const Tizen::Graphics::FloatRectangle& rect);
84 result SetShowMode(FrameShowMode showMode);
85 FrameShowMode GetShowMode(bool minimize = true) const;
86 bool IsActivated(void) const;
89 virtual void ResetFocusList(void);
90 virtual Tizen::Base::Collection::IListT<_Control*>* GetFocusList(void) const;
91 virtual _Control* GetFocusTraversalControl(_Control* pControl) const;
92 virtual void SetFocusTraversalControl(_Control* pControl);
95 virtual _Control* GetFocusControl(const _Control* pControl) const;
96 virtual _Control* GetCurrentFocusControl(void) const;
97 virtual void SetFocusControl(const _Control* pControl, bool on);
100 void SetChangingBoundsEnabled(bool enable);
103 result SetPresenter(const _FramePresenter& framePresenter);
107 _Frame(const _Frame&);
108 _Frame& operator =(const _Frame&);
112 _FramePresenter* __pFramePresenter;
113 _FrameEvent* __pFrameEvent;
114 Tizen::Graphics::FloatRectangle __floatingBounds;
115 FrameShowMode __showMode;
121 bool __changingBoundsEnabled;
122 _IFormActivationChangeEventListener* __pFormActivationChangeEventListener;
125 }}} // Tizen::Ui::Controls
127 #endif // _FUICTRL_INTERNAL_FRAME_H_