Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / animations / FUiAnim_ControlVisualElement.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        FUiAnim_ControlVisualElement.h
20  * @brief       Header file of  _ControlVisualElement class
21  *
22  * This file contains declarations _ControlVisualElement class.
23  */
24
25 #ifndef _FUI_ANIM_INTERNAL_CONTROL_VISUAL_ELEMENT_H_
26 #define _FUI_ANIM_INTERNAL_CONTROL_VISUAL_ELEMENT_H_
27
28 #include "FUiAnim_VisualElement.h"
29 #include "FUi_Colorf.h"
30
31 namespace Tizen { namespace Ui { namespace Animations
32 {
33
34 class _ControlVisualElement
35         : public _VisualElement
36 {
37 #if 0
38         DECLARE_CLASS_BEGIN(_ControlVisualElement, _VisualElementImpl);
39         DECLARE_PROPERTY(VePropBounds, _PropGetControlBounds, _PropSetControlBounds);
40         DECLARE_PROPERTY(VePropImplicitAnimationEnabled, _PropGetControlImplicitAnimationEnabled, _PropSetControlImplicitAnimationEnabled);
41         DECLARE_PROPERTY(VePropPropertyPropagationEnabled, _PropGetControlPropertyPropagationEnabled, _PropSetControlPropertyPropagationEnabled);
42         DECLARE_CLASS_END();
43 #endif
44
45 public:
46         /**
47          * This is the default constructor for this class.
48          *
49          * @since 2.0
50          */
51         _ControlVisualElement(void);
52
53
54         /**
55          * Initializes the instance of _ControlVisualElement.
56          *
57          * @since 2.0
58          * @return              An error code
59          * @exception   E_SUCCESS               This method was successful.
60          * @exception   E_SYSTEM                A system error occurred.
61          */
62         result ConstructControlVisualElement(void);
63
64 protected:
65         /**
66          * This is the destructor for this class.
67          *
68          * @since 2.0
69          */
70         virtual ~_ControlVisualElement(void);
71
72
73         _ControlVisualElement(const _ControlVisualElement& rhs);
74
75 public:
76         /**
77          * Definition for VisualElement's ZOrder Group.
78          * Z_ORDER_GROUP_SYSTEM group has higher position then  position of Z_ORDER_GROUP_ALWASY_ON_TOP group.
79          * @since 2.0
80          */
81         static const int Z_ORDER_GROUP_CONTROL = 2001;   // the UI system use this level. (Control)
82
83         /**
84          * Clones the instance of VisualElement.
85          *
86          * @since 2.0
87          * @return              The pointer to the cloned VisualElement instance.
88          */
89         virtual VisualElement* CloneN(void) const;
90
91         /**
92          * Gets the top-most child ControlVisualElement indicated by @c point.
93          *
94          * @since 2.0
95          * @return              the child ControlVisualElement indicated by point.
96          * @param[in]   point                           The position to find the child ControlVisualElement.
97          */
98         _ControlVisualElement* GetControlChildAtPoint(Tizen::Graphics::FloatPoint& point);
99
100
101         bool IsAutoResizeChildrenEnabled(void) const;
102
103         result SetAutoResizeChildrenEnabled(bool autoResize);
104
105
106         virtual Variant OnGetPropertyRequested(const Tizen::Base::String& property) const;
107
108
109         virtual result OnSetPropertyRequested(const Tizen::Base::String& property, const Variant& value);
110
111 private:
112         _ControlVisualElement* __GetControlChildAtPoint(Tizen::Graphics::FloatPoint& point, int parentHitTest);
113
114         Variant _PropGetControlBounds(void) const;
115         result _PropSetControlBounds(const Variant& v);
116
117         Variant _PropGetControlImplicitAnimationEnabled(void) const;
118         result _PropSetControlImplicitAnimationEnabled(const Variant& v);
119
120         Variant _PropGetControlPropertyPropagationEnabled(void) const;
121         result _PropSetControlPropertyPropagationEnabled(const Variant& v);
122 private:
123         bool __autoResize;
124
125 };              // _ControlVisualElement
126
127 }}}             // Tizen::Ui::Animations
128
129 #endif //_FUI_ANIM_INTERNAL_CONTROL_VISUAL_ELEMENT_H_
130