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 FUiAnim_VisualElementImpl.h
20 * @brief This is the header file for the _VisualElementImpl class.
22 * This header file contains the declarations of the _VisualElementImpl class.
25 #ifndef _FUI_ANIM_INTERNAL_VISUAL_ELEMENT_IMPL_H_
26 #define _FUI_ANIM_INTERNAL_VISUAL_ELEMENT_IMPL_H_
28 #include <FBaseString.h>
29 #include <FBaseColArrayList.h>
30 #include <FGrpFloatMatrix4.h>
31 #include <FGrpCanvas.h>
32 #include <FGrpRectangle.h>
33 #include <FGrpFloatPoint.h>
34 #include <FGrpFloatDimension.h>
35 #include <FGrpFloatRectangle.h>
36 #include <FUiAnimVisualElementAnimation.h>
37 #include <FUiAnimVisualElementSurface.h>
38 #include <FUiAnimVisualElement.h>
41 #include "FUi_PropertyBase.h"
43 #include "FUiAnim_RootVisualElement.h"
44 #include "FUiAnim_VisualElementSharedData.h"
45 #include "FUiAnim_TransformMatrix3Df.h"
46 #include "FUiAnim_VisualElementCoordinateSystem.h"
48 #define SUPPORT_CUSTOMIZING_ATTACH_DETACH_ANIMATION
50 namespace Tizen { namespace Ui
53 class _ControlManagerImpl;
54 class _EflUiEventManager;
57 namespace Tizen { namespace Ui { namespace Controls
62 namespace Tizen { namespace Web { namespace Controls
67 namespace Tizen { namespace Ui { namespace Animations
70 class _IVisualElementObserver;
71 class IVisualElementAnimationProvider;
72 class IVisualElementContentProvider;
73 class IVisualElementEventListener;
74 class _AnimationManager;
77 extern const wchar_t* VePropBounds;
78 extern const wchar_t* VePropContentBounds;
79 extern const wchar_t* VePropContentOpacity;
80 extern const wchar_t* VePropRenderOperation;
81 extern const wchar_t* VePropOpacity;
82 extern const wchar_t* VePropShowState;
83 extern const wchar_t* VePropAnchor;
84 extern const wchar_t* VePropAnchorZ;
85 extern const wchar_t* VePropTransform;
86 extern const wchar_t* VePropChildrenTransform;
87 extern const wchar_t* VePropZPosition;
88 extern const wchar_t* VePropZOrderGroup;
89 extern const wchar_t* VePropClipToParent;
90 extern const wchar_t* VePropClipChildren;
91 extern const wchar_t* VePropName;
92 extern const wchar_t* VePropSurfaceOpaque;
93 extern const wchar_t* VePropPropertyPropagationEnabled;
94 extern const wchar_t* VePropImplicitAnimationEnabled;
96 #if defined(SUPPORT_CUSTOMIZING_ATTACH_DETACH_ANIMATION)
97 extern const wchar_t* VePropActionDetach;
98 extern const wchar_t* VePropActionInsert;
101 extern const wchar_t* VeSubPropBounds;
102 extern const wchar_t* VeSubPropBoundsPosition;
103 extern const wchar_t* VeSubPropBoundsSize;
105 extern const wchar_t* VeSubPropTransform;
106 extern const wchar_t* VeSubPropTransformRotationX;
107 extern const wchar_t* VeSubPropTransformRotationY;
108 extern const wchar_t* VeSubPropTransformRotationZ;
109 extern const wchar_t* VeSubPropTransformScaleX;
110 extern const wchar_t* VeSubPropTransformScaleY;
111 extern const wchar_t* VeSubPropTransformScaleZ;
112 extern const wchar_t* VeSubPropTransformTranslationX;
113 extern const wchar_t* VeSubPropTransformTranslationY;
114 extern const wchar_t* VeSubPropTransformTranslationZ;
115 extern const wchar_t* VeSubPropTransformRotationAnchorX;
116 extern const wchar_t* VeSubPropTransformRotationAnchorY;
117 extern const wchar_t* VeSubPropTransformRotationAnchorZ;
118 extern const wchar_t* VeSubPropTransformScaleAnchorX;
119 extern const wchar_t* VeSubPropTransformScaleAnchorY;
120 extern const wchar_t* VeSubPropTransformScaleAnchorZ;
122 extern const wchar_t* VeSubPropTransformRotationXY;
123 extern const wchar_t* VeSubPropTransformScaleXY;
124 extern const wchar_t* VeSubPropTransformTranslationXY;
125 extern const wchar_t* VeSubPropTransformRotationAnchorXY;
126 extern const wchar_t* VeSubPropTransformScaleAnchorXY;
128 extern const wchar_t* VeSubPropChildrenTransform;
129 extern const wchar_t* VeSubPropChildrenTransformRotationX;
130 extern const wchar_t* VeSubPropChildrenTransformRotationY;
131 extern const wchar_t* VeSubPropChildrenTransformRotationZ;
132 extern const wchar_t* VeSubPropChildrenTransformScaleX;
133 extern const wchar_t* VeSubPropChildrenTransformScaleY;
134 extern const wchar_t* VeSubPropChildrenTransformScaleZ;
135 extern const wchar_t* VeSubPropChildrenTransformTranslationX;
136 extern const wchar_t* VeSubPropChildrenTransformTranslationY;
137 extern const wchar_t* VeSubPropChildrenTransformTranslationZ;
138 extern const wchar_t* VeSubPropChildrenTransformRotationAnchorX;
139 extern const wchar_t* VeSubPropChildrenTransformRotationAnchorY;
140 extern const wchar_t* VeSubPropChildrenTransformRotationAnchorZ;
141 extern const wchar_t* VeSubPropChildrenTransformScaleAnchorX;
142 extern const wchar_t* VeSubPropChildrenTransformScaleAnchorY;
143 extern const wchar_t* VeSubPropChildrenTransformScaleAnchorZ;
145 extern const wchar_t* VeSubPropChildrenTransformRotationXY;
146 extern const wchar_t* VeSubPropChildrenTransformScaleXY;
147 extern const wchar_t* VeSubPropChildrenTransformTranslationXY;
148 extern const wchar_t* VeSubPropChildrenTransformRotationAnchorXY;
149 extern const wchar_t* VeSubPropChildrenTransformScaleAnchorXY;
151 extern const wchar_t* VePrivPropShowOpacity;
154 extern Tizen::Base::String* pVePropBounds;
155 extern Tizen::Base::String* pVePropContentBounds;
156 extern Tizen::Base::String* pVePropContentOpacity;
157 extern Tizen::Base::String* pVePropRenderOperation;
158 extern Tizen::Base::String* pVePropOpacity;
159 extern Tizen::Base::String* pVePropShowState;
160 extern Tizen::Base::String* pVePropAnchor;
161 extern Tizen::Base::String* pVePropAnchorZ;
162 extern Tizen::Base::String* pVePropTransform;
163 extern Tizen::Base::String* pVePropChildrenTransform;
164 extern Tizen::Base::String* pVePropZPosition;
165 extern Tizen::Base::String* pVePropZOrderGroup;
166 extern Tizen::Base::String* pVePropClipToParent;
167 extern Tizen::Base::String* pVePropClipChildren;
168 extern Tizen::Base::String* pVePropName;
169 extern Tizen::Base::String* pVePropSurfaceOpaque;
170 extern Tizen::Base::String* pVePropPropertyPropagationEnabled;
171 extern Tizen::Base::String* pVePropImplicitAnimationEnabled;
173 #if defined(SUPPORT_CUSTOMIZING_ATTACH_DETACH_ANIMATION)
174 extern Tizen::Base::String* pVePropActionDetach;
175 extern Tizen::Base::String* pVePropActionAttach;
178 extern Tizen::Base::String* pVeSubPropBounds;
179 extern Tizen::Base::String* pVeSubPropBoundsPosition;
180 extern Tizen::Base::String* pVeSubPropBoundsSize;
182 extern Tizen::Base::String* pVeSubPropTransform;
183 extern Tizen::Base::String* pVeSubPropTransformRotationX;
184 extern Tizen::Base::String* pVeSubPropTransformRotationY;
185 extern Tizen::Base::String* pVeSubPropTransformRotationZ;
186 extern Tizen::Base::String* pVeSubPropTransformScaleX;
187 extern Tizen::Base::String* pVeSubPropTransformScaleY;
188 extern Tizen::Base::String* pVeSubPropTransformScaleZ;
189 extern Tizen::Base::String* pVeSubPropTransformTranslationX;
190 extern Tizen::Base::String* pVeSubPropTransformTranslationY;
191 extern Tizen::Base::String* pVeSubPropTransformTranslationZ;
192 extern Tizen::Base::String* pVeSubPropTransformRotationAnchorX;
193 extern Tizen::Base::String* pVeSubPropTransformRotationAnchorY;
194 extern Tizen::Base::String* pVeSubPropTransformRotationAnchorZ;
195 extern Tizen::Base::String* pVeSubPropTransformScaleAnchorX;
196 extern Tizen::Base::String* pVeSubPropTransformScaleAnchorY;
197 extern Tizen::Base::String* pVeSubPropTransformScaleAnchorZ;
199 extern Tizen::Base::String* pVeSubPropTransformRotationXY;
200 extern Tizen::Base::String* pVeSubPropTransformScaleXY;
201 extern Tizen::Base::String* pVeSubPropTransformTranslationXY;
202 extern Tizen::Base::String* pVeSubPropTransformRotationAnchorXY;
203 extern Tizen::Base::String* pVeSubPropTransformScaleAnchorXY;
205 extern Tizen::Base::String* pVeSubPropChildrenTransform;
206 extern Tizen::Base::String* pVeSubPropChildrenTransformRotationX;
207 extern Tizen::Base::String* pVeSubPropChildrenTransformRotationY;
208 extern Tizen::Base::String* pVeSubPropChildrenTransformRotationZ;
209 extern Tizen::Base::String* pVeSubPropChildrenTransformScaleX;
210 extern Tizen::Base::String* pVeSubPropChildrenTransformScaleY;
211 extern Tizen::Base::String* pVeSubPropChildrenTransformScaleZ;
212 extern Tizen::Base::String* pVeSubPropChildrenTransformTranslationX;
213 extern Tizen::Base::String* pVeSubPropChildrenTransformTranslationY;
214 extern Tizen::Base::String* pVeSubPropChildrenTransformTranslationZ;
215 extern Tizen::Base::String* pVeSubPropChildrenTransformRotationAnchorX;
216 extern Tizen::Base::String* pVeSubPropChildrenTransformRotationAnchorY;
217 extern Tizen::Base::String* pVeSubPropChildrenTransformRotationAnchorZ;
218 extern Tizen::Base::String* pVeSubPropChildrenTransformScaleAnchorX;
219 extern Tizen::Base::String* pVeSubPropChildrenTransformScaleAnchorY;
220 extern Tizen::Base::String* pVeSubPropChildrenTransformScaleAnchorZ;
222 extern Tizen::Base::String* pVeSubPropChildrenTransformRotationXY;
223 extern Tizen::Base::String* pVeSubPropChildrenTransformScaleXY;
224 extern Tizen::Base::String* pVeSubPropChildrenTransformTranslationXY;
225 extern Tizen::Base::String* pVeSubPropChildrenTransformRotationAnchorXY;
226 extern Tizen::Base::String* pVeSubPropChildrenTransformScaleAnchorXY;
228 extern Tizen::Base::String* pVePrivPropShowOpacity;
232 * @class _VisualElementImpl
233 * @brief This class provides methods to control VisualElement.
238 class _OSP_EXPORT_ _VisualElementImpl
239 : public Tizen::Ui::_PropertyBase
241 DECLARE_CLASS_BEGIN(_VisualElementImpl, Tizen::Ui::_PropertyBase);
242 DECLARE_PROPERTY(VePropBounds, GetBoundsProperty, SetBoundsProperty);
243 DECLARE_PROPERTY(VeSubPropBoundsPosition, GetBoundsPositionSubProperty, SetBoundsPositionSubProperty);
244 DECLARE_PROPERTY(VeSubPropBoundsSize, GetBoundsSizeSubProperty, SetBoundsSizeSubProperty);
245 DECLARE_PROPERTY(VePropRenderOperation, GetRenderOperationProperty, SetRenderOperationProperty);
246 DECLARE_PROPERTY(VePropContentBounds, GetContentBoundsProperty, SetContentBoundsProperty);
247 DECLARE_PROPERTY(VePropContentOpacity, GetContentOpacityProperty, SetContentOpacityProperty);
248 DECLARE_PROPERTY(VePropOpacity, GetOpacityProperty, SetOpacityProperty);
249 DECLARE_PROPERTY(VePropShowState, GetShowStateProperty, SetShowStateProperty);
250 DECLARE_PROPERTY(VePropAnchor, GetAnchorProperty, SetAnchorProperty);
251 DECLARE_PROPERTY(VePropAnchorZ, GetAnchorZProperty, SetAnchorZProperty);
252 DECLARE_PROPERTY(VePropTransform, GetTransformMatrixProperty, SetTransformMatrixProperty);
253 DECLARE_PROPERTY(VeSubPropTransformRotationX, GetTransformRotationXSubProperty, SetTransformRotationXSubProperty);
254 DECLARE_PROPERTY(VeSubPropTransformRotationY, GetTransformRotationYSubProperty, SetTransformRotationYSubProperty);
255 DECLARE_PROPERTY(VeSubPropTransformRotationZ, GetTransformRotationZSubProperty, SetTransformRotationZSubProperty);
256 DECLARE_PROPERTY(VeSubPropTransformRotationAnchorXY, GetTransformRotationAnchorXYSubProperty, SetTransformRotationAnchorXYSubProperty);
257 DECLARE_PROPERTY(VeSubPropTransformRotationXY, GetTransformRotationXYSubProperty, SetTransformRotationXYSubProperty);
258 DECLARE_PROPERTY(VeSubPropTransformScaleX, GetTransformScaleXSubProperty, SetTransformScaleXSubProperty);
259 DECLARE_PROPERTY(VeSubPropTransformScaleY, GetTransformScaleYSubProperty, SetTransformScaleYSubProperty);
260 DECLARE_PROPERTY(VeSubPropTransformScaleZ, GetTransformScaleZSubProperty, SetTransformScaleZSubProperty);
261 DECLARE_PROPERTY(VeSubPropTransformScaleAnchorXY, GetTransformScaleAnchorXYSubProperty, SetTransformScaleAnchorXYSubProperty);
262 DECLARE_PROPERTY(VeSubPropTransformScaleXY, GetTransformScaleXYSubProperty, SetTransformScaleXYSubProperty);
263 DECLARE_PROPERTY(VeSubPropTransformTranslationX, GetTransformTranslationXSubProperty, SetTransformTranslationXSubProperty);
264 DECLARE_PROPERTY(VeSubPropTransformTranslationY, GetTransformTranslationYSubProperty, SetTransformTranslationYSubProperty);
265 DECLARE_PROPERTY(VeSubPropTransformTranslationZ, GetTransformTranslationZSubProperty, SetTransformTranslationZSubProperty);
266 DECLARE_PROPERTY(VeSubPropTransformTranslationXY, GetTransformTranslationXYSubProperty, SetTransformTranslationXYSubProperty);
267 DECLARE_PROPERTY(VePropChildrenTransform, GetChildrenTransformMatrixProperty, SetChildrenTransformMatrixProperty);
268 DECLARE_PROPERTY(VeSubPropChildrenTransformRotationX, GetChildrenTransformRotationXSubProperty, SetChildrenTransformRotationXSubProperty);
269 DECLARE_PROPERTY(VeSubPropChildrenTransformRotationY, GetChildrenTransformRotationYSubProperty, SetChildrenTransformRotationYSubProperty);
270 DECLARE_PROPERTY(VeSubPropChildrenTransformRotationZ, GetChildrenTransformRotationZSubProperty, SetChildrenTransformRotationZSubProperty);
271 DECLARE_PROPERTY(VeSubPropChildrenTransformRotationAnchorXY, GetChildrenTransformRotationAnchorXYSubProperty, SetChildrenTransformRotationAnchorXYSubProperty);
272 DECLARE_PROPERTY(VeSubPropChildrenTransformRotationXY, GetChildrenTransformRotationXYSubProperty, SetChildrenTransformRotationXYSubProperty);
273 DECLARE_PROPERTY(VeSubPropChildrenTransformScaleX, GetChildrenTransformScaleXSubProperty, SetChildrenTransformScaleXSubProperty);
274 DECLARE_PROPERTY(VeSubPropChildrenTransformScaleY, GetChildrenTransformScaleYSubProperty, SetChildrenTransformScaleYSubProperty);
275 DECLARE_PROPERTY(VeSubPropChildrenTransformScaleZ, GetChildrenTransformScaleZSubProperty, SetChildrenTransformScaleZSubProperty);
276 DECLARE_PROPERTY(VeSubPropChildrenTransformScaleAnchorXY, GetChildrenTransformScaleAnchorXYSubProperty, SetChildrenTransformScaleAnchorXYSubProperty);
277 DECLARE_PROPERTY(VeSubPropChildrenTransformScaleXY, GetChildrenTransformScaleXYSubProperty, SetChildrenTransformScaleXYSubProperty);
278 DECLARE_PROPERTY(VeSubPropChildrenTransformTranslationX, GetChildrenTransformTranslationXSubProperty, SetChildrenTransformTranslationXSubProperty);
279 DECLARE_PROPERTY(VeSubPropChildrenTransformTranslationY, GetChildrenTransformTranslationYSubProperty, SetChildrenTransformTranslationYSubProperty);
280 DECLARE_PROPERTY(VeSubPropChildrenTransformTranslationZ, GetChildrenTransformTranslationZSubProperty, SetChildrenTransformTranslationZSubProperty);
281 DECLARE_PROPERTY(VeSubPropChildrenTransformTranslationXY, GetChildrenTransformTranslationXYSubProperty, SetChildrenTransformTranslationXYSubProperty);
282 DECLARE_PROPERTY(VePropZPosition, GetZPositionProperty, SetZPositionProperty);
283 DECLARE_PROPERTY(VePropZOrderGroup, GetZOrderGroupProperty, SetZOrderGroupProperty);
284 DECLARE_PROPERTY(VePropClipToParent, GetClipToParentProperty, SetClipToParentProperty);
285 DECLARE_PROPERTY(VePropClipChildren, GetClipChildrenProperty, SetClipChildrenProperty);
286 DECLARE_PROPERTY(VePropName, GetNameProperty, SetNameProperty);
287 DECLARE_PROPERTY(VePropSurfaceOpaque, GetSurfaceOpaqueProperty, SetSurfaceOpaqueProperty);
288 DECLARE_PROPERTY(VePropImplicitAnimationEnabled, GetImplicitAnimationProperty, SetImplicitAnimationProperty);
289 DECLARE_PROPERTY(VePropPropertyPropagationEnabled, GetPropertyPropagationProperty, SetPropertyPropagationProperty);
291 // private and internal property
292 DECLARE_PROPERTY(VePrivPropShowOpacity, GetShowOpacityPrivateProperty, SetShowOpacityPrivateProperty);
297 IVisualElementAnimationProvider* GetAnimationProvider(void) const;
299 result SetAnimationProvider(IVisualElementAnimationProvider* pProvider);
301 IVisualElementContentProvider* GetContentProvider(void) const;
303 result SetContentProvider(IVisualElementContentProvider* pProvider);
305 IVisualElementEventListener* GetVisualElementEventListener(void) const;
307 result SetVisualElementEventListener(IVisualElementEventListener* pListener);
309 static _VisualElementImpl* GetInstance(VisualElement& element)
311 return element._pVisualElementImpl;
314 static const _VisualElementImpl* GetInstance(const VisualElement& element)
316 return element._pVisualElementImpl;
319 static result FlushI(void);
321 static const int Z_ORDER_GROUP_ALWAYS_BELOW_BOTTOM = -1000; // lowest drawing gadget.(Background)
322 static const int Z_ORDER_GROUP_NORMAL = 0; // level of the default group.
323 static const int Z_ORDER_GROUP_ALWAYS_ON_TOP = 1000; // highest drawing gadget.
325 result SetZOrderGroup(int zorderGroup);
326 int GetZOrderGroup(void) const;
328 VisualElementSurface* GetSurfaceN(void) const;
329 result SetSurface(const VisualElementSurface* pSurface);
331 result SetContentBounds(const Tizen::Graphics::FloatRectangle& contentBounds);
332 Tizen::Graphics::FloatRectangle GetContentBounds(void) const;
335 * Checks whether the back buffer is enabled or not.
338 * @return @c true if the back buffer is enabled @n
339 * @c false, otherwise
341 bool GetBackBufferEnabled(void) const;
344 * Sets whether the back buffer is enabled or not.
347 * @return An error code.
348 * @param[in] enabled Set to @c true if need to enable the back buffer @n
349 * @c false, otherwise
351 result SetBackBufferEnabled(bool enabled);
354 * Checks whether the VisualElement will be redrawn or not when resized.
357 * @return @c true if the VisualElement is redrawn @n
358 * @c false, otherwise
360 bool GetRedrawOnResizeEnabled(void) const;
363 * Sets whether the VisualElement is redrawn or not when resized.
366 * @return An error code.
367 * @param[in] enabled Set to @c true if need to redraw the VisualElement when resized @n
368 * @c false, otherwise
370 result SetRedrawOnResizeEnabled(bool enabled);
373 * Gets the bounding box information of the VisualElement.
376 * @return Rectangular coordinates.
378 Tizen::Graphics::FloatRectangle GetBoundingBox(void) const;
380 Tizen::Graphics::FloatRectangle GetBounds(void) const;
381 result SetBounds(const Tizen::Graphics::FloatRectangle& bounds);
383 float GetZPosition(void) const;
384 result SetZPosition(float zPosition);
386 bool IsVisible(void) const;
387 bool GetShowState(void) const;
388 result SetShowState(bool show);
391 * Gets the current opacity of the VisualElement.
394 * @return The opacity of the VisualElement.
395 * @exception E_SUCCESS The method was successful.
396 * @exception E_INVALID_STATE This instance is in an invalid state.
399 float GetContentOpacity(void) const;
402 * Changes the opacity of the VisualElement.
405 * @return An error code
406 * @param[in] contentOpacity The new opacity.
407 * @exception E_SUCCESS The method was successful.
408 * @exception E_INVALID_STATE This instance is in an invalid state.
412 result SetContentOpacity(float contentOpacity);
415 * Gets absolute opacity of the VisualElement .
418 * @return 0.0 ~ 1.0 multiplied by parent's absolute opacity.
419 * @exception E_SUCCESS The method was successful.
420 * @exception E_INVALID_STATE This instance is in an invalid state.
422 float GetOpacityFromRoot(void) const;
424 float GetOpacity(void) const;
425 result SetOpacity(float opacity);
427 Tizen::Graphics::FloatPoint GetAnchor(void) const;
428 result SetAnchor(const Tizen::Graphics::FloatPoint& anchor);
430 float GetAnchorZ(void) const;
431 result SetAnchorZ(float anchorZ);
433 Tizen::Graphics::FloatMatrix4 GetTransformMatrix(void) const;
434 result SetTransformMatrix(const Tizen::Graphics::FloatMatrix4& xform);
436 Tizen::Graphics::FloatMatrix4 GetChildrenTransformMatrix(void) const;
437 result SetChildrenTransformMatrix(const Tizen::Graphics::FloatMatrix4& xform);
440 * Checks whether the VisualElement has been clipped to parent or not.
443 * @return @c true, if the VisualElement has been clipped @n
444 * @c false, otherwise
445 * @exception E_SUCCESS The method was successful.
446 * @exception E_INVALID_STATE This instance is in an invalid state.
447 * @see SetClipToParent()
449 bool IsClipToParent(void) const;
452 * Changes the clipping state of the VisualElement.
455 * @return An error code
456 * @param[in] clipToParent Set to @c true if need to be clipped to the parent VisualElement @n
457 * @c false, otherwise
458 * @exception E_SUCCESS The method was successful.
459 * @exception E_INVALID_STATE This instance is in an invalid state.
460 * @see IsClipToParent()
463 result SetClipToParent(bool clipToParent);
465 bool IsClipChildrenEnabled(void) const;
466 result SetClipChildrenEnabled(bool clipChildren);
469 * Gets the Root of the VisualElementImpl.
472 * @return The root of the VisualElement
473 * @exception E_SUCCESS The method was successful.
474 * @exception E_INVALID_STATE This instance is in an invalid state.
476 _VisualElementImpl* GetRoot(void) const;
480 * Gets the Root of the VisualElement.
483 * @return The root of the VisualElement. The return type is _RootVisualElement.
484 * @exception E_SUCCESS The method was successful.
485 * @exception E_INVALID_STATE This instance is in an invalid state.
488 _RootVisualElement* GetRootPublic(void) const
490 if (unlikely(IsPropsInvalidated(HIERARCHY_PROPERTY_COORDINATES)))
492 const_cast< _VisualElementImpl* >(this)->RebuildCoordinates();
495 if (unlikely(!__pRoot))
498 return dynamic_cast< _RootVisualElement* >(__pRoot->__pPublicInstance);
501 _VisualElementImpl* GetParent(void) const;
503 int GetChildrenCount(void) const;
504 Tizen::Base::Collection::IList* GetPublicChildrenN(void) const;
506 bool IsChildOf(const _VisualElementImpl& element) const;
507 result SetZOrder(const _VisualElementImpl* pReference, bool above);
509 result AddChild(_VisualElementImpl& child);
510 result InsertChild(_VisualElementImpl& child, const _VisualElementImpl* pReference, bool above);
511 result RemoveChild(_VisualElementImpl& child, bool deallocate = false);
513 Tizen::Base::String GetName(void) const;
514 result SetName(const Tizen::Base::String& name);
516 result SetUserData(void* pUserData);
517 void* GetUserData(void) const;
519 _VisualElementImpl* GetChild(const Tizen::Base::String& name, bool searchAllDescendants) const;
521 result SetFlushNeeded(void);
523 result InvalidateRectangle(const Tizen::Graphics::FloatRectangle* pRectangle);
526 * Gets the rectangular region information was invalidated.
529 * @return The rectangular region information was invalidated.
531 Tizen::Graphics::FloatRectangle GetInvalidatedRectangle(void) const;
532 Tizen::Graphics::FloatRectangle GetUpdateRectangle(void) const;
535 * Checks whether the VisualElement is opaque or not.
538 * @return @c true, if the VisualElement is opaque @n
539 * @c false, otherwise
541 virtual bool IsOpaque(void) const;
544 * Checks whether the surface is opaque or not.
547 * @return @c true, if the surface is opaque @n
548 * @c false, otherwise
550 bool IsSurfaceOpaque(void) const;
553 * Changes the opaque of the surface.
556 * @return An error code
557 * @param[in] isSurfaceOpaque The new show state.
558 * @exception E_SUCCESS The method was successful.
559 * @see IsSurfaceOpaque()
562 result SetSurfaceOpaque(bool isSurfaceOpaque);
565 Tizen::Graphics::Canvas* GetCanvasN(void);
566 Tizen::Graphics::Canvas* GetCanvasN(const Tizen::Graphics::Rectangle& bounds);
569 * Gets the top-most child VisualElement indicated by @c point.
572 * @return the child VisualElement indicated by point.
573 * @param[in] point The position to find the child VisualElement.
575 _VisualElementImpl* GetChildAt(const Tizen::Graphics::FloatPoint& point);
577 result ConvertCoordinates(Tizen::Graphics::FloatPoint& point, const _VisualElementImpl* pFromElement) const;
578 result ConvertCoordinates(Tizen::Graphics::FloatRectangle& rectangle, const _VisualElementImpl* pFromElement) const;
581 * Converts the specified four 3-dimensional coordinates @c (x, y, z) in @c pFromVisualElement coordinate space to this instance's coordinate space.
585 * @return An error code
586 * @param[in,out] x The values of X-axis to be converted.
587 * @param[in,out] y The values of Y-axis to be converted.
588 * @param[in,out] z The values of Z-axis to be converted.
589 * @param[in] count The number of coordinates in the @c (x, y, z) array.
590 * @param[in] pFromVisualElement The %VisualElement instance with @c (x, y, z) in its coordinate space.
591 * @exception E_SUCCESS The method is successful.
592 * @exception E_INVALID_ARG The input parameter is incorrect.
593 * @exception E_SYSTEM A system error has occurred.
594 * @remarks This instance and @c pFromVisualElement must share a common parent.@n
595 * If @c null, it is regarded that the @c point is in the root %c VisualElement(%c Frame) coordinate space.
596 * @see ConvertCoordinates(Tizen::Graphics::FloatRectangle& rectangle, const VisualElement* pFromVisualElement)
597 * @see ConvertCoordinates(Tizen::Graphics::FloatPoint& point, const VisualElement* pFromVisualElement)
599 result ConvertCoordinates(float* x, float* y, float* z, int count, const _VisualElementImpl* pFromElement) const;
601 result AddAnimation(const Tizen::Base::String* keyName, VisualElementAnimation& animation);
602 result RemoveAnimation(const Tizen::Base::String& keyName);
604 VisualElementAnimation* GetAnimationN(const Tizen::Base::String& keyName) const;
607 * Gets the animation playing for the specified property.
610 * @return The pointer to the animation
611 * @param[in] property The name of the property.
612 * @exception E_SUCCESS The method was successful.
613 * @see AddAnimation()
614 * @see RemoveAnimation()
616 VisualElementAnimation* GetAnimationForPropertyN(const Tizen::Base::String& property) const;
618 result RemoveAllAnimations(void);
621 * Scrolls the VisualElement.
624 * @param[in] pointOffset The new position to scroll
625 * @param[in] scrollSelf TBD
626 * @return An error code
627 * @exception E_SUCCESS The method was successful.
629 result ScrollByPoint(const Tizen::Graphics::FloatPoint& pointOffset, bool scrollSelf);
632 * Gets the VisualElement for presentation.
635 * @return the VisualElement for presentation.
637 _VisualElementImpl* GetPresentation(void) const
640 return __pPresentation;
644 * Gets the VisualElement for presentation.
647 * @return the VisualElement for presentation.
649 _VisualElementImpl* GetModel(void) const
655 // only using in the control
656 void SetHidingParentNeeded(bool need)
658 __isHidingParent = need;
659 if(this == __pModel && __pPresentation)
661 __pPresentation->__isHidingParent = need;
666 // only using in internal instance( RootVisualElement or Dummy)
667 void SetInternal(bool internal)
669 __isInternal = internal;
670 if(this == __pModel && __pPresentation)
672 __pPresentation->__isInternal = internal;
677 * Gets the VisualElement's native node.
680 * @return INativeNode , this value Platform dependency .
682 class _INativeNode* GetNativeNode(void) const
684 return GetSharedData().pNativeNode;
688 * This method returned the status that the VisualElement could enable the implicit animation to do.
691 * @return true/false implicit animation enable status.
693 bool GetImplicitAnimationEnabled(void) const;
696 * Set enable or disable the implicit animation of the VisualElement .
700 result SetImplicitAnimationEnabled(bool enable);
703 * Checks whether the property propagation is enabled or not.
706 * @return @c true if the property propagation is enabled @n
707 * @c false, otherwise
708 * @exception E_INVALID_STATE This instance is in an invalid state.
710 bool GetPropertyPropagationEnabled(void) const;
713 * Sets whether the property propagation is enabled or not.
716 * @return An error code.
717 * @param[in] enable Set to @c true if need to enable the property propagation @n
718 * @c false, otherwise
719 * @exception E_SUCCESS The method was successful.
720 * @exception E_INVALID_STATE This instance is in an invalid state.
722 result SetPropertyPropagationEnabled(bool enable);
725 * This method fill the canvas with the drawn surface.
728 * @param[in] canvas capture target.
729 * @param[in] boundsToDraw capture region of the VisualElement.
730 * @param[in] withChildren capture with the children.
731 * @return An error code
733 result Capture(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& boundsToDraw, bool withChilren);
734 //Tizen::Graphics::Bitmap* CaptureBitmapN(bool withChildren = false);
737 * This method return stored public VisualElement instance pointer.
740 * @return pointer of the public VisualElement instance.
742 VisualElement* GetPublic(void) const
744 return __pPublicInstance;
748 result SetImageSource(const Tizen::Base::String& filePath);
749 result SetRenderOperation(VisualElement::RenderOperation renderOperation);
753 * Gets the rendering operation of the VisualElement.
756 * @return The rendering operation of the VisualElement.
757 * @see SetRenderOperation()
759 VisualElement::RenderOperation GetRenderOperation(void) const;
761 result SetPropertyI(const Tizen::Base::String& property, const Variant& value);
762 result InvokeOnSetPropertyRequested(const Tizen::Base::String& property, const Variant& value);
764 Variant InvokeOnGetPropertyRequested(const Tizen::Base::String& property) const
766 if (__pPublicInstance)
768 return __pPublicInstance->OnGetPropertyRequested(property);
774 * The hit testing default logic.
777 * @return hit test result.
778 * @param[in] point hit test position.
779 * @see InvokeHitTest()
781 int HitTestI(const Tizen::Graphics::FloatPoint& point);
785 * The creating animation for the property.
788 * @return animation instance for the property.
789 * @param[in] property property name.
790 * @see InvokeCreateAnimationForProperty()
792 VisualElementAnimation* CreateAnimationForPropertyI(const Tizen::Base::String& property);
794 typedef void (*BoundsChangedCallback)(void*);
795 void SetBoundsChangedCallback(BoundsChangedCallback pCallback, void* pData);
798 // virtual _VisualElementImpl* CloneN(void);
800 void InvalidateHierarchyProps(int invalidProps, bool broadcastToChildren, bool propagateToParentsOnly);
803 _VisualElementImpl(void);
804 _VisualElementImpl(VisualElement& element);
805 _VisualElementImpl(VisualElement& presentation, _VisualElementImpl& modelImpl);
806 virtual ~_VisualElementImpl(void);
807 _VisualElementImpl& operator =(const _VisualElementImpl& rhs);
809 result Construct(void);
813 Variant GetBoundsProperty(void) const;
814 result SetBoundsProperty(const Variant& v);
816 Variant GetBoundsPositionSubProperty(void) const;
817 result SetBoundsPositionSubProperty(const Variant& v);
819 Variant GetBoundsSizeSubProperty(void) const;
820 result SetBoundsSizeSubProperty(const Variant& v);
822 Variant GetZPositionProperty(void) const;
823 result SetZPositionProperty(const Variant& v);
825 Variant GetZOrderGroupProperty(void) const;
826 result SetZOrderGroupProperty(const Variant& v);
828 Variant GetShowStateProperty(void) const;
829 result SetShowStateProperty(const Variant& v);
831 Variant GetShowOpacityPrivateProperty(void) const;
832 result SetShowOpacityPrivateProperty(const Variant& v);
834 Variant GetRenderOperationProperty(void) const;
835 result SetRenderOperationProperty(const Variant& v);
837 Variant GetContentOpacityProperty(void) const;
838 result SetContentOpacityProperty(const Variant& v);
840 Variant GetContentBoundsProperty(void) const;
841 result SetContentBoundsProperty(const Variant& v);
843 Variant GetOpacityProperty(void) const;
844 result SetOpacityProperty(const Variant& v);
846 Variant GetAnchorProperty(void) const;
847 result SetAnchorProperty(const Variant& v);
849 Variant GetAnchorZProperty(void) const;
850 result SetAnchorZProperty(const Variant& v);
852 Variant GetTransformMatrixProperty(void) const;
853 result SetTransformMatrixProperty(const Variant& v);
855 Variant GetTransformRotationXSubProperty(void) const;
856 result SetTransformRotationXSubProperty(const Variant& v);
858 Variant GetTransformRotationYSubProperty(void) const;
859 result SetTransformRotationYSubProperty(const Variant& v);
861 Variant GetTransformRotationZSubProperty(void) const;
862 result SetTransformRotationZSubProperty(const Variant& v);
864 Variant GetTransformRotationXYSubProperty(void) const;
865 result SetTransformRotationXYSubProperty(const Variant& v);
867 Variant GetTransformRotationAnchorXSubProperty(void) const;
868 result SetTransformRotationAnchorXSubProperty(const Variant& v);
870 Variant GetTransformRotationAnchorYSubProperty(void) const;
871 result SetTransformRotationAnchorYSubProperty(const Variant& v);
873 Variant GetTransformRotationAnchorZSubProperty(void) const;
874 result SetTransformRotationAnchorZSubProperty(const Variant& v);
876 Variant GetTransformRotationAnchorXYSubProperty(void) const;
877 result SetTransformRotationAnchorXYSubProperty(const Variant& v);
879 Variant GetTransformScaleXSubProperty(void) const;
880 result SetTransformScaleXSubProperty(const Variant& v);
882 Variant GetTransformScaleYSubProperty(void) const;
883 result SetTransformScaleYSubProperty(const Variant& v);
885 Variant GetTransformScaleZSubProperty(void) const;
886 result SetTransformScaleZSubProperty(const Variant& v);
888 Variant GetTransformScaleXYSubProperty(void) const;
889 result SetTransformScaleXYSubProperty(const Variant& v);
891 Variant GetTransformScaleAnchorXSubProperty(void) const;
892 result SetTransformScaleAnchorXSubProperty(const Variant& v);
894 Variant GetTransformScaleAnchorYSubProperty(void) const;
895 result SetTransformScaleAnchorYSubProperty(const Variant& v);
897 Variant GetTransformScaleAnchorZSubProperty(void) const;
898 result SetTransformScaleAnchorZSubProperty(const Variant& v);
900 Variant GetTransformScaleAnchorXYSubProperty(void) const;
901 result SetTransformScaleAnchorXYSubProperty(const Variant& v);
903 Variant GetTransformTranslationXSubProperty(void) const;
904 result SetTransformTranslationXSubProperty(const Variant& v);
906 Variant GetTransformTranslationYSubProperty(void) const;
907 result SetTransformTranslationYSubProperty(const Variant& v);
909 Variant GetTransformTranslationZSubProperty(void) const;
910 result SetTransformTranslationZSubProperty(const Variant& v);
912 Variant GetTransformTranslationXYSubProperty(void) const;
913 result SetTransformTranslationXYSubProperty(const Variant& v);
915 Variant GetChildrenTransformMatrixProperty(void) const;
916 result SetChildrenTransformMatrixProperty(const Variant& v);
918 Variant GetChildrenTransformRotationXSubProperty(void) const;
919 result SetChildrenTransformRotationXSubProperty(const Variant& v);
921 Variant GetChildrenTransformRotationYSubProperty(void) const;
922 result SetChildrenTransformRotationYSubProperty(const Variant& v);
924 Variant GetChildrenTransformRotationZSubProperty(void) const;
925 result SetChildrenTransformRotationZSubProperty(const Variant& v);
927 Variant GetChildrenTransformRotationXYSubProperty(void) const;
928 result SetChildrenTransformRotationXYSubProperty(const Variant& v);
930 Variant GetChildrenTransformRotationAnchorXSubProperty(void) const;
931 result SetChildrenTransformRotationAnchorXSubProperty(const Variant& v);
933 Variant GetChildrenTransformRotationAnchorYSubProperty(void) const;
934 result SetChildrenTransformRotationAnchorYSubProperty(const Variant& v);
936 Variant GetChildrenTransformRotationAnchorZSubProperty(void) const;
937 result SetChildrenTransformRotationAnchorZSubProperty(const Variant& v);
939 Variant GetChildrenTransformRotationAnchorXYSubProperty(void) const;
940 result SetChildrenTransformRotationAnchorXYSubProperty(const Variant& v);
942 Variant GetChildrenTransformScaleXSubProperty(void) const;
943 result SetChildrenTransformScaleXSubProperty(const Variant& v);
945 Variant GetChildrenTransformScaleYSubProperty(void) const;
946 result SetChildrenTransformScaleYSubProperty(const Variant& v);
948 Variant GetChildrenTransformScaleZSubProperty(void) const;
949 result SetChildrenTransformScaleZSubProperty(const Variant& v);
951 Variant GetChildrenTransformScaleXYSubProperty(void) const;
952 result SetChildrenTransformScaleXYSubProperty(const Variant& v);
954 Variant GetChildrenTransformScaleAnchorXSubProperty(void) const;
955 result SetChildrenTransformScaleAnchorXSubProperty(const Variant& v);
957 Variant GetChildrenTransformScaleAnchorYSubProperty(void) const;
958 result SetChildrenTransformScaleAnchorYSubProperty(const Variant& v);
960 Variant GetChildrenTransformScaleAnchorZSubProperty(void) const;
961 result SetChildrenTransformScaleAnchorZSubProperty(const Variant& v);
963 Variant GetChildrenTransformScaleAnchorXYSubProperty(void) const;
964 result SetChildrenTransformScaleAnchorXYSubProperty(const Variant& v);
966 Variant GetChildrenTransformTranslationXSubProperty(void) const;
967 result SetChildrenTransformTranslationXSubProperty(const Variant& v);
969 Variant GetChildrenTransformTranslationYSubProperty(void) const;
970 result SetChildrenTransformTranslationYSubProperty(const Variant& v);
972 Variant GetChildrenTransformTranslationZSubProperty(void) const;
973 result SetChildrenTransformTranslationZSubProperty(const Variant& v);
975 Variant GetChildrenTransformTranslationXYSubProperty(void) const;
976 result SetChildrenTransformTranslationXYSubProperty(const Variant& v);
978 Variant GetClipToParentProperty(void) const;
979 result SetClipToParentProperty(const Variant& v);
981 Variant GetClipChildrenProperty(void) const;
982 result SetClipChildrenProperty(const Variant& v);
984 Variant GetNameProperty(void) const;
985 result SetNameProperty(const Variant& v);
987 Variant GetSurfaceOpaqueProperty(void) const;
988 result SetSurfaceOpaqueProperty(const Variant& v);
990 Variant GetImplicitAnimationProperty(void) const;
991 result SetImplicitAnimationProperty(const Variant& v);
993 Variant GetPropertyPropagationProperty(void) const;
994 result SetPropertyPropagationProperty(const Variant& v);
996 static void AdjustSizeForSurface(float& width, float& height)
998 float originalWidth = width;
999 float originalHeight = height;
1000 _VisualElementCoordinateSystem::MakeIntegralDimension(width, height);
1002 if (originalWidth > 0.0f && width == 0.0f)
1007 if (originalHeight > 0.0f && height == 0.0f)
1013 result SetBoundsI(const Tizen::Graphics::FloatRectangle& bounds);
1014 result SetZPositionI(float zPosition);
1015 result SetShowOpacityI(float showOpacity);
1016 result SetShowStateI(bool show);
1017 result SetContentBoundsI(const Tizen::Graphics::FloatRectangle& contentBounds);
1018 result SetContentOpacityI(float contentOpacity);
1019 result SetOpacityI(float opacity);
1020 result SetAnchorI(const Tizen::Graphics::FloatPoint& anchor);
1021 result SetAnchorZI(float anchorZ);
1022 result SetPropertyPropagationEnabledI(bool enable);
1023 result SetTransformMatrixI(const Tizen::Graphics::FloatMatrix4& xform, bool updateDecomposed = true);
1024 result SetChildrenTransformMatrixI(const Tizen::Graphics::FloatMatrix4& xform, bool updateDecomposed = true);
1025 result SetZOrderGroupI(int zOrderGroup);
1027 bool CheckIfAnimatable(const Tizen::Base::String& property) const;
1028 bool IsSurfaceNeeded(void) const;
1029 void RebuildSurfaces(void);
1030 void ResetSurfaceIfNeeded(void);
1031 _VisualElementImpl* GetRenderTarget(void) const;
1032 _VisualElementImpl* GetClipSource(void) const
1034 if (unlikely(IsPropsInvalidated(HIERARCHY_PROPERTY_COORDINATES)))
1036 const_cast< _VisualElementImpl* >(this)->RebuildCoordinates();
1039 return __pClipSource;
1042 int GetChildIndex(const _VisualElementImpl& child) const;
1043 result RemoveChildWithoutReconfiguring(int indexChild, bool invalidate);
1044 result RemoveAllChild(void);
1045 void RemoveFromParent(void);
1047 void RebuildNativeNodeTree(_VisualElementImpl& parent);
1048 void ExposeRectangle(const Tizen::Graphics::FloatRectangle* pDirtyRectangle, bool invalidate);
1050 bool IsVisibleI(void) const
1052 if (unlikely(IsPropsInvalidated(HIERARCHY_PROPERTY_COORDINATES | HIERARCHY_PROPERTY_SHOWSTATE | HIERARCHY_PROPERTY_OPACITY | HIERARCHY_PROPERTY_CONTENTOPACITY)))
1054 const_cast< _VisualElementImpl* >(this)->RebuildVisibility();
1060 void SetRootNeedsContentUpdate(void)
1062 if (unlikely(__childrenNeedsUpdateProps & HIERARCHY_PROPERTY_CONTENT))
1064 _RootVisualElement* pRoot = GetRootPublic();
1067 pRoot->SetNeedsContentUpdate(true);
1072 bool IsAncestorDestroying(void) const
1074 const _VisualElementImpl* pElement = __pParent;
1076 while (pElement != null)
1078 if (pElement->__isDestroying)
1083 pElement = pElement->GetParent();
1088 // Presentation update method(observer)
1089 void UpdatePresentationWhenChildRemoved(_VisualElementImpl& child, bool deallocate);
1090 void UpdatePresentationWhenZOrderChanged(const _VisualElementImpl* pReferenceModel, bool above);
1091 result UpdatePresentationWhenCustomPropertyChanged(const Tizen::Base::String& property, const Variant& value);
1093 // invoke the delegation method.
1094 void InvokeOnConstructed(void);
1096 void InvokeOnDestructing(void);
1098 result InvokeOnChildAttaching( _VisualElementImpl& child);
1100 void InvokeOnChildAttached( _VisualElementImpl& child);
1102 result InvokeOnChildDetaching( _VisualElementImpl& child);
1104 void InvokeOnChildDetached( _VisualElementImpl& child);
1106 result InvokeOnAttaching( _VisualElementImpl& parent);
1108 void InvokeOnAttached(void);
1110 result InvokeOnDetaching(void);
1112 void InvokeOnDetached( _VisualElementImpl& parent);
1114 result InvokeOnAnimationAdded( const VisualElementAnimation* pAnimation);
1116 result InvokeOnAnimationRemoved( const VisualElementAnimation* pAnimation);
1118 void InvokeOnShowStateChanged(bool showState);
1121 * Called when transform matrix is about to be changed.
1124 * @param[in] source VisualElement instance to be changed.
1125 * @param[in,out] newTransform Transform matrix to be applied.
1127 result InvokeOnTransformMatrixChanging(Tizen::Graphics::FloatMatrix4& newTransform);
1130 * Called when transform matrix is changed.
1133 * @param[in] source VisualElement instance changed.
1134 * @param[in] oldTransform The old transform matrix
1136 void InvokeOnTransformMatrixChanged(const Tizen::Graphics::FloatMatrix4& oldTransform);
1139 * Called when transform matrix for children is about to be changed.
1142 * @param[in] source VisualElement instance to be changed.
1143 * @param[in,out] newTransform Transform matrix for children to be applied.
1145 result InvokeOnChildrenTransformMatrixChanging(Tizen::Graphics::FloatMatrix4& newTransform);
1148 * Called when transform matrix for children is changed.
1151 * @param[in] source VisualElement instance changed.
1152 * @param[in] oldTransform The old transform matrix
1154 void InvokeOnChildrenTransformMatrixChanged(const Tizen::Graphics::FloatMatrix4& oldTransform);
1157 * Called when bounds is about to be changed.
1160 * @param[in] source VisualElement instance to be changed.
1161 * @param[in,out] newBounds The new bounds
1163 result InvokeOnBoundsChanging(Tizen::Graphics::FloatRectangle& newBounds);
1166 * Called when bounds is changed.
1169 * @param[in] source VisualElement instance changed.
1170 * @param[in] oldBounds The old bounds
1172 void InvokeOnBoundsChanged(const Tizen::Graphics::FloatRectangle& oldBounds);
1175 * For checking that point is in the VisualElement region.
1178 * @param[in] point the point to check in self coordinate system.
1181 int InvokeHitTest(const Tizen::Graphics::FloatPoint& point);
1185 * Overrides this method to check the element can draw.
1189 bool InvokePrepareDraw(void);
1192 * Overrides this method to provide user-specific draw code.
1196 void InvokeOnDraw( Tizen::Graphics::Canvas& canvas);
1199 * Overrides this method to provide user-specific implicit animation.
1201 * return return _Animation instance for the specified property, or null to disable implcit animation for the property.
1204 VisualElementAnimation* InvokeCreateAnimationForProperty(const Tizen::Base::String& property);
1206 VisualElement* CreateElementForImplicitAnimationN(void) const;
1207 result CreateElementTreeForDetachImplicitAnimation(_VisualElementImpl& child);
1209 Tizen::Graphics::FloatRectangle GetVisibleRect(void) const;
1210 Tizen::Graphics::FloatRectangle GetDrawableRect(void) const;
1212 const Tizen::Graphics::FloatRectangle& GetBoundingBoxI(void) const;
1213 const Tizen::Graphics::FloatMatrix4& GetMatrixToSuper(void) const;
1214 const Tizen::Graphics::FloatMatrix4& GetMatrixToTop(void) const;
1215 const Tizen::Graphics::FloatMatrix4& GetMatrixFromTop(void) const;
1216 Tizen::Graphics::FloatMatrix4 CalcMatrixToBase(const _VisualElementImpl& base) const;
1217 const Tizen::Graphics::FloatMatrix4& GetMatrixToClipSource(void) const;
1219 void DrawRectangleIfNeeded(const Tizen::Graphics::FloatRectangle& drawRect);
1220 void DrawRectangle(const Tizen::Graphics::FloatRectangle& drawRect);
1222 void LockInvalidate(bool lock);
1223 void InvalidateHierarchyPropsDownward(int invalidProps, bool broadcastToChildren, bool propagateToParentsOnly);
1224 void InvalidateVisibleRectToRenderTarget(const Tizen::Graphics::FloatRectangle* pDirtyRectangle);
1225 void RebuildCoordinates(void);
1226 void RebuildVisibility(void);
1227 void RebuildHierarchyProps(int props, bool checkSurface, bool reconfSurfaceOnly);
1228 void UpdateHierarchyProps(void);
1229 void FlushNativeChanges(void);
1231 void SetSurfaceChanged(void);
1233 bool IsPropsInvalidated(int props) const
1235 return (__invalidatedProps & props) != 0;
1238 void SetPropsValidaty(int validProps, int invalidProps)
1240 __invalidatedProps &= ~validProps;
1241 __invalidatedProps |= invalidProps;
1243 if (this == __pPresentation)
1244 GetSharedData().invalidatedNativeProps |= invalidProps;
1247 bool IsDrawingObject(void) const
1249 return (this == __pModel);
1252 result InvalidateRectangleI(const Tizen::Graphics::FloatRectangle* pRectangle);
1254 int GetZOrderGroupIndex(int orderGroup, int& begin, int& end) const;
1255 result ChangeZOrder(_VisualElementImpl& child, const _VisualElementImpl* pReference, bool above, int zorderGroup);
1257 _VisualElementImpl* GetChildAtPointI(const Tizen::Graphics::FloatPoint& point, int parentHitTest);
1259 result AddAnimationI(const Tizen::Base::String* pKeyName, VisualElementAnimation& animation);
1260 result AddAnimationGroupI(const Tizen::Base::String* pKeyName, VisualElementAnimation& animation);
1262 result CaptureI(Tizen::Graphics::Canvas& outputCanvas, const Tizen::Graphics::FloatRectangle& rectDest, _VisualElementImpl& reference, const Tizen::Graphics::FloatRectangle& clipRect, bool withChilren, int depth);
1264 _VisualElementSharedData& GetSharedData(void) const
1266 return *__pSharedData;
1269 bool CreateImplicitAnimationIfNeeded(const Tizen::Base::String& property, const Variant& newValue, const Variant& currentPresntationValue, const Tizen::Base::String** pSubList);
1274 HITTEST_NOWHERE = 0,
1275 HITTEST_NOMORECHILDREN = 1,
1281 HIERARCHY_PROPERTY_COORDINATES = 0x01,
1282 HIERARCHY_PROPERTY_OPACITY = 0x02,
1283 HIERARCHY_PROPERTY_SHOWSTATE = 0x04,
1284 HIERARCHY_PROPERTY_CONTENTOPACITY = 0x08,
1285 HIERARCHY_PROPERTY_NATIVENODE = HIERARCHY_PROPERTY_CONTENTOPACITY,
1286 HIERARCHY_PROPERTY_SURFACE = 0x10, // only for presentation element
1287 HIERARCHY_PROPERTY_CONTENT = 0x20,
1288 HIERARCHY_PROPERTY_CONTENTBOUNDS = 0x40,
1289 HIERARCHY_PROPERTY_MASK = 0x7F
1295 _VisualElementSharedData* __pSharedData;
1296 _VisualElementImpl* __pParent;
1297 _VisualElementImpl* __pModel;
1298 _VisualElementImpl* __pPresentation;
1300 // _RootVisualElement* __pRoot;
1301 _VisualElementImpl* __pRoot;
1304 float __showOpacity;
1306 bool __needRecreateSurface;
1308 Tizen::Graphics::FloatRectangle __bounds;
1309 Tizen::Graphics::FloatDimension __alignedSize;
1310 Tizen::Graphics::FloatRectangle __contentBounds;
1311 bool __useContentBounds;
1313 float __contentOpacity;
1315 Tizen::Graphics::FloatPoint __anchor;
1317 Tizen::Graphics::FloatMatrix4 __transform;
1318 _TransformMatrix3Df __decomposedTransform;
1319 Tizen::Graphics::FloatMatrix4 __childrenTransform;
1320 _TransformMatrix3Df __decomposedChildrenTransform;
1322 unsigned int __childrenNeedsUpdateProps;
1323 unsigned int __invalidatedProps;
1325 bool __matrixFromTopValid;
1326 bool __matrixFromTopInvertible;
1327 bool __matrixToSuperValid;
1328 bool __matrixToTopValid;
1329 bool __matrixToClipSourceValid;
1330 bool __boundingBoxValid;
1331 bool __visibleRectValid;
1332 bool __needTransform;
1333 bool __needClipForUntransformed;
1334 bool __isImplicitAnimationEnabled;
1336 bool __isClipChildren;
1338 Tizen::Graphics::FloatRectangle __boundingBox;
1339 Tizen::Graphics::FloatRectangle __boundingBoxToClipSource;
1340 Tizen::Graphics::FloatMatrix4 __matrixToSuper;
1341 Tizen::Graphics::FloatMatrix4 __matrixToTop;
1342 Tizen::Graphics::FloatMatrix4 __matrixFromTop;
1343 Tizen::Graphics::FloatMatrix4 __matrixToClipSource;
1344 _VisualElementImpl* __pClipSource;
1346 Tizen::Graphics::FloatRectangle __visibleRect;
1348 bool __isPropertyPropagationEnabled;
1349 bool __isDestroying;
1350 bool __isHidingParent;
1352 bool __isAllowedTreeModification;
1354 class ChildrenListT : public Tizen::Base::Collection::ArrayListT<_VisualElementImpl*>
1357 _VisualElementImpl* GetChildAt(int index) const
1359 _VisualElementImpl* pChild = null;
1360 if (likely(GetAt(index, pChild) == E_SUCCESS))
1367 ChildrenListT __children;
1369 VisualElement* __pPublicInstance; // for public class instance pointer
1371 Tizen::Base::String __imageFilePath;
1372 VisualElement::RenderOperation __renderOperation;
1374 BoundsChangedCallback __pBoundsChangedCallback;
1375 void* __pBoundsChangedCallbackData;
1377 friend class _VeDebug;
1378 friend class _EflNode;
1379 friend class _VisualElementModelObserver;
1380 friend class VisualElement;
1381 friend class _VisualElement;
1382 friend class _ControlVisualElement;
1383 friend class _RootVisualElement;
1384 friend class _AnimationManager;
1385 friend class _DisplayManager;
1386 }; // _VisualElementImpl
1388 }}} // Tizen::Ui::Animations
1390 #endif //_FUI_ANIM_INTERNAL_VISUAL_ELEMENT_IMPL_H_