Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / inc / FUiCtrl_Indicator.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  * @file                FUiCtrl_Indicator.h
19  * @brief               This is the header file for the %_Indicator class.
20  *
21  * This header file contains the declarations of the %_Indicator class.
22  */
23 #ifndef _FUI_CTRL_INTERNAL_INDICATOR_H_
24 #define _FUI_CTRL_INTERNAL_INDICATOR_H_
25
26 #include <FBaseRtTimer.h>
27 #include "FUi_Control.h"
28 #include "FUi_EcoreEvas.h"
29
30 namespace Tizen { namespace Ui { namespace Animations
31 {
32 class VisualElementSurface;
33 }}}
34
35 namespace Tizen { namespace Ui { namespace Controls
36 {
37 class _Form;
38
39 class _Indicator
40         : public _Control
41         , public Tizen::Base::Runtime::ITimerEventListener
42 {
43 public:
44                 _Indicator(void);
45                 virtual ~_Indicator(void);
46
47                 static _Indicator* CreateIndicator(void);
48
49                 result SetIndicatorShowState(bool state);
50                 result SetIndicatorOpacity(_IndicatorOpacity opacity);
51                 bool GetIndicatorShowState(void) const;
52                 _IndicatorOpacity GetIndicatorOpacity(void) const;
53                 result AddEvasObject(_Form* pForm);
54                 result DeleteEvasObject(void);
55                 result SetSurface(Tizen::Ui::Animations::VisualElementSurface* pSurface);
56
57                 virtual void OnChangeLayout(_ControlOrientation orientation);
58                 virtual result OnAttachedToMainTree(void);
59                 virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
60                 static void OnDisconnected(Ecore_Evas *pEe);
61
62 private:
63                 _Indicator(const _Indicator& value);
64                 _Indicator& operator =(const _Indicator& value);
65
66                 Tizen::Graphics::Rectangle GetIndicatorBounds(void) const;
67
68 private:
69                 Evas_Object* __pPortraitIndicatorEvasObject;
70                 Evas_Object* __pLandscapeIndicatorEvasObject;
71                 Tizen::Base::Runtime::Timer* __pConnectionTimer;
72                 Tizen::Ui::Animations::VisualElementSurface* __pPortraitSurface;
73                 Tizen::Ui::Animations::VisualElementSurface* __pLandScapeSurface;
74                 Tizen::Ui::Animations::VisualElementSurface* __pCurrentSurface;
75                 Tizen::Ui::Animations::_VisualElement* __pVisualElement;
76                 bool __showstate;
77                 _IndicatorOpacity __opacity;
78
79 }; // _Indicator
80
81 }}} // Tizen::Ui::Controls
82
83 #endif // _FUI_CTRL_INTERNAL_INDICATOR_H_