Tizen 2.1 base
[framework/osp/uifw.git] / inc / FUiAnimVisualElement.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        FUiAnimVisualElement.h
20  * @brief       This is the header file for the %VisualElement class.
21  *
22  * This header file contains the declarations of the %VisualElement class.
23  */
24
25 #ifndef _FUI_ANIM_VISUAL_ELEMENT_H_
26 #define _FUI_ANIM_VISUAL_ELEMENT_H_
27
28 #include <FBaseObject.h>
29 #include <FBaseString.h>
30 #include <FGrpFloatMatrix4.h>
31 #include <FGrpFloatPoint.h>
32 #include <FGrpFloatRectangle.h>
33 #include <FUiVariant.h>
34 #include <FUiAnimTypes.h>
35 #include <FUiAnimIVisualElementAnimationProvider.h>
36 #include <FUiAnimIVisualElementContentProvider.h>
37 #include <FUiAnimIVisualElementEventListener.h>
38
39 namespace Tizen { namespace Graphics {
40 class Canvas;
41 }}
42
43 namespace Tizen { namespace Ui { namespace Animations
44 {
45
46 class VisualElementSurface;
47 class _VisualElementImpl;
48
49
50 /**
51  * @class       VisualElement
52  * @brief       This class is a base class for all displayable objects on screen with animations.
53  *
54  * @since       2.0
55  *
56  * The %VisualElement class is a base class for all displayable objects on screen with animations.
57  * It encapsulates properties about coordinates (bounds, transform matrix, children transform matrix and so on),
58  * contents (content bounds, clipping, opacity, show state and so on) and tree-hierarchy.
59  * It also provides infrastructure necessary for animations (AddAnimation(), RemoveAnimation() and so on).
60  * A %VisualElement object instantiated by applications works as a model object and may have a cloned counter part for presentation on screen which has a separated life-cycle.
61  * The presentation object is managed by system and applications must not change properties of it.
62  * Most animations of %VisualElement are applied on presentation objects. Properties set by applications are stored in model objects while properties of presentation objects
63  * are changing during implicit or explicit animations.
64  *
65  * This class also provides interfaces such as IVisualElementContentProvider, IVisualElementEventListener, and IVisualElementAnimationProvider to override default behaviors
66  * without inheritances.
67  *
68  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/visualelement.htm">Visual Elements</a>.
69  *
70  */
71
72 class _OSP_EXPORT_ VisualElement
73         : public Tizen::Base::Object
74 {
75 public:
76         /**
77          * The lowest drawing group, such as, background element.
78          *
79          * @since               2.0
80          */
81         static const int Z_ORDER_GROUP_LOWEST   = -1000;
82
83
84         /**
85          * The level of the default group.
86          *
87          * @since               2.0
88          */
89         static const int Z_ORDER_GROUP_NORMAL   = 0;
90
91
92         /**
93          * The highest drawing group, such as, top-most element.
94          *
95          * @since               2.0
96          */
97         static const int Z_ORDER_GROUP_HIGHEST  = 1000;
98
99
100         /**
101          *      @enum RenderOperation
102          *      Defines the render operation for %VisualElement. @n
103          *      The contents of %VisualElement will be composited on screen using this operation.
104          */
105         enum RenderOperation
106         {
107                 RENDER_OPERATION_BLEND = 0,             /**< The contents will be displayed blended with underlying %VisualElements */
108                 RENDER_OPERATION_COPY                   /**< The contents will be displayed obscuring other underlying %VisualElements */
109         };
110
111
112         /**
113          * The object is not fully constructed after this constructor is called.
114          * For full construction, the Construct() method must be called right after calling this constructor.
115          *
116          * @since               2.0
117          */
118         VisualElement(void);
119
120         /**
121          * Initializes this instance of %VisualElement.
122          *
123          * @since               2.0
124          *
125          * @return              An error code
126          * @exception   E_SUCCESS                       The method is successful.
127          * @exception   E_SYSTEM                        A system error has occurred.
128          */
129         result Construct(void);
130
131         /**
132          * Deallocates this instance and all descendants of %VisualElement.
133          *
134          * @since               2.0
135          *
136          * @remarks             This method must be used to destroy this instance. @n
137          *                              Do not use @c delete operator.
138          * @remarks             This method first destroys children, and then it destroys the parent(this instance).
139          * @remarks             This method will call OnDestructing() callback before deallocating the instance.
140          * @remarks             The destructing sequence is as follows:
141          *                              1. Destroy children recursively.
142          *                              2. Calls %OnDestructing() callback.
143          *                              3. Detaches from parent.
144          *                              4. Removes all animations associated with this instance.
145          *                              5. Deallocates this instance.
146          * @see Construct()
147          */
148         void Destroy(void);
149
150         /**
151          * Sets the animation provider which creates implicit animations.
152          *
153          * @since               2.0
154          *
155          * @return              An error code
156          * @param[in]   pProvider                       The animation provider to create implicit animations
157          * @exception   E_SUCCESS                       The method is successful.
158          * @exception   E_INVALID_OPERATION     This instance does not allow to set an animation provider. @n
159          *                                                              The animation provider can be set to the model instance only.
160          *
161          * @see         IVisualElementAnimationProvider
162          * @see         GetAnimationProvider()
163          */
164         result SetAnimationProvider(IVisualElementAnimationProvider* pProvider);
165
166         /**
167          * Gets the assigned animation provider.
168          *
169          * @since               2.0
170          *
171          * @return              The animation provider
172          * @exception   E_INVALID_OPERATION     This instance does not allow to get an animation provider. @n
173          *                                                              The animation provider can be set to the model instance only.
174          * @remarks             The specific error code can be accessed using the GetLastResult() method.
175          * @see         IVisualElementAnimationProvider
176          * @see         SetAnimationProvider()
177          */
178         IVisualElementAnimationProvider* GetAnimationProvider(void) const;
179
180         /**
181          * Sets the content provider which customizes information on contents.
182          *
183          * @since               2.0
184          *
185          * @param[in]   pProvider                       The content provider to customize information on content
186          * @exception   E_SUCCESS                       The method is successful.
187          * @exception   E_INVALID_OPERATION     This instance does not allow to set a content provider. @n
188          *                                                              The content provider can be set to the model instance only.
189          * @see         IVisualElementContentProvider
190          * @see         GetContentProvider()
191          */
192         result SetContentProvider(IVisualElementContentProvider* pProvider);
193
194         /**
195          * Gets the assigned content provider.
196          *
197          * @since               2.0
198          *
199          * @return              The content provider
200          * @exception   E_INVALID_OPERATION     This instance does not allow to get content provider. @n
201          *                                                              The content provider can be set to the model instance only.
202          * @remarks             The specific error code can be accessed using the GetLastResult() method.
203          * @see         IVisualElementContentProvider
204          * @see         SetContentProvider()
205          */
206         IVisualElementContentProvider* GetContentProvider(void) const;
207
208         /**
209          * Sets the %VisualElement event listener.
210          *
211          * @since               2.0
212          *
213          * @param[in]   pListener                       The %VisualElement event listener
214          * @exception   E_SUCCESS                       The method is successful.
215          * @exception   E_INVALID_OPERATION     This instance does not allow to set an event listener. @n
216          *                                                              The event listener can be set to the model instance only.
217          * @see         IVisualElementEventListener
218          * @see         GetVisualElementEventListener()
219          */
220         result SetVisualElementEventListener(IVisualElementEventListener* pListener);
221
222         /**
223          * Gets the assigned %VisualElement event listener.
224          *
225          * @since               2.0
226          *
227          * @return              The %VisualElement event listener
228          * @exception   E_INVALID_OPERATION     This instance does not allow to get an event listener. @n
229          *                                                              The event listener can be set to the model instance only.
230          * @remarks             The specific error code can be accessed using the GetLastResult() method.
231          * @see         IVisualElementEventListener
232          * @see         SetVisualElementEventListener()
233          */
234         IVisualElementEventListener* GetVisualElementEventListener(void) const;
235
236
237         /**
238          * Overrides the OnConstructed() method to provide user-specific initialization code.
239          *
240          * @since               2.0
241          *
242          * @remarks             This method is called after the instance is initialized by the Construct() method successfully.
243          * @see Construct()
244          * @see Destroy()
245          * @see OnDestructing()
246          */
247         virtual void OnConstructed(void);
248
249         /**
250          * Overrides the OnDestructing() method to provide user-specific termination code.
251          *
252          * @since               2.0
253          *
254          * @remarks             This method is called before deallocating the %VisualElement instance by the Destroy() method.
255          * @see Destroy()
256          * @see Construct()
257          * @see OnConstructed()
258          */
259         virtual void OnDestructing(void);
260
261         /**
262          * Called by the GetChildAt() method to check whether this instance contains the @c point specified. @n
263          * If the Tizen::Ui::Animations::IVisualElementAnimationProvider interface is set to this instance,
264          * the Tizen::Ui::Animations::IVisualElementContentProvider::HitTest() callback will be called instead.
265          *
266          * @since               2.0
267          *
268          * @return              The hit test result
269          * @param[in]   point                   The hit position in the coordinate space of this instance
270          * @remarks             Hit test results must be one of the following values: @n
271          *                                       - Tizen::Ui::Animations::HitTestResult::HIT_TEST_NOWHERE
272          *                                       - Tizen::Ui::Animations::HitTestResult::HIT_TEST_MATCH
273          * @see GetChildAt()
274          * @see IVisualElementContentProvider::HitTest()
275          */
276         virtual HitTestResult OnHitTest(const Tizen::Graphics::FloatPoint& point);
277
278         /**
279          * Before the system calls OnDraw() method to fill the contents, the %OnPrepareDraw() method is called to give an opportunity to hook or prepare drawing. @n
280          * If the [IVisualElementContentProvider](@ref Tizen::Ui::Animations::IVisualElementContentProvider) interface is set to this instance,
281          * the [PrepareDraw()](@ref Tizen::Ui::Animations::IVisualElementContentProvider::PrepareDraw) callback will be called instead.
282          *
283          * @since               2.0
284          *
285          * @return              @c true if OnDraw() can be called, @n
286          *              else @c false
287          * @see IVisualElementContentProvider::PrepareDraw()
288          */
289         virtual bool OnPrepareDraw(void);
290
291         /**
292          * Called to fill contents on the canvas provided by the system. @n
293          * If the [IVisualElementContentProvider](@ref Tizen::Ui::Animations::IVisualElementContentProvider) is set to this instance,
294          * the [DrawContent()](@ref Tizen::Ui::Animations::IVisualElementContentProvider::DrawContent) callback will be called instead.
295          *
296          * @since               2.0
297          *
298          * @param[in]   canvas                  The canvas to fill the contents of %VisualElement
299          * @see IVisualElementContentProvider::DrawContent()
300          */
301         virtual void OnDraw(Tizen::Graphics::Canvas& canvas);
302
303         /**
304          * Overrides the %OnCreateAnimationForProperty() method to provide user-specific implicit animation. @n
305          * If the [IVisualElementAnimationProvider](@ref Tizen::Ui::Animations::IVisualElementAnimationProvider) interface is set to this instance,
306          * the [CreateAnimationForProperty()](@ref Tizen::Ui::Animations::IVisualElementAnimationProvider::CreateAnimationForProperty) callback will be called instead.
307          *
308          * @since               2.0
309          *
310          * @return              The VisualElementAnimation instance for the specified property, @n
311                                         else @c null to disable implicit animation for the property
312          * @param[in]   property                        The property to animate implicitly
313          * @remarks             The returned [Animation](@ref Tizen::Ui::Animations::VisualElementAnimation) instance must be allocated on the heap if needed. @n
314          *                              If you do not need an implicit animation for the @c property at the time this method is called, return @c null.
315          * @see IVisualElementAnimationProvider::CreateAnimationForProperty()
316          */
317         virtual VisualElementAnimation* OnCreateAnimationForProperty(const Tizen::Base::String& property);
318
319         /**
320          * Overrides the %OnGetPropertyRequested() method to provide user-specific properties or to change default behaviors of %VisualElement class. @n
321          * This method is called whenever GetProperty() is called.
322          *
323          * @since               2.0
324          *
325          * @return              The property's value
326          * @param[in]   property                        The property name
327          * @see                 SetProperty()
328          * @see                 GetProperty()
329          * @see                 OnSetPropertyRequested()
330          */
331         virtual Tizen::Ui::Variant OnGetPropertyRequested(const Tizen::Base::String& property) const;
332
333         /**
334          * Overrides the %OnSetPropertyRequested() method to provide user-specific properties or to change default behaviors of %VisualElement class. @n
335          * This method is called whenever SetProperty() is called.
336          *
337          * @since               2.0
338          *
339          * @return              An error code
340          * @param[in]   property                        The property name
341          * @param[in]   value                           The value of the property to set
342          * @see                 SetProperty()
343          * @see                 GetProperty()
344          * @see                 OnGetPropertyRequested()
345          */
346         virtual result OnSetPropertyRequested(const Tizen::Base::String& property, const Tizen::Ui::Variant& value);
347
348         /**
349          * Gets the parent of this instance.
350          *
351          * @since               2.0
352          *
353          * @return              The parent of the this instance
354          */
355         VisualElement* GetParent(void) const;
356
357         /**
358          * Gets a list of children of this instance.
359          *
360          * @since               2.0
361          *
362          * @return              The list of children of this instance
363          * @exception   E_SUCCESS                       The method is successful.
364          * @exception   E_OUT_OF_MEMORY         The memory is insufficient.
365          * @remarks             The specific error code can be accessed using the GetLastResult() method.
366          * @remarks             If an exception occurs, this method returns @c null.
367          */
368         Tizen::Base::Collection::IList* GetChildrenN(void) const;
369
370         /**
371          * Gets the count of children.
372          *
373          * @since               2.0
374          *
375          * @return              The count of children
376          */
377         int GetChildrenCount(void) const;
378
379         /**
380          * Checks whether this instance is a child or descendant of the specified one.
381          *
382          * @since               2.0
383          *
384          * @return              @c true if this instance is a child or descendant of the specified one, @n
385          *                              else @c false
386          * @param[in]   other                           An instance of %VisualElement to test relationship
387          */
388         bool IsChildOf(const VisualElement& other) const;
389
390         /**
391          * Attaches a child to this instance. @n
392          * The %AttachChild() method attaches the specified @c child at the highest position in the Z order group of the @c child.
393          * If you need to change Z-Order group, you can change it using the SetZOrderGroup() method.
394          *
395          * @since               2.0
396          *
397          * @return              An error code
398          * @param[in]   child                           The %VisualElement instance to attach to this instance
399          * @exception   E_SUCCESS                       The method is successful.
400          * @exception   E_INVALID_ARG           The input parameter is incorrect. Either of the following conditions has occurred: @n
401          *                                                                      - The specified @c child is not instantiated successfully. @n
402          *                                                                      - The specified @c child is this instance. @n
403          *                                                                      - The specified @c child is already an ancestor of this instance.
404          * @see         SetZOrderGroup()
405          * @see         InsertChild()
406          * @see         DetachChild()
407          * @see         ChangeZOrder()
408          */
409         result AttachChild(const VisualElement& child);
410
411         /**
412          * Inserts a child to this instance. @n
413          * If @c pReference is not @c null, the Z order group of @c child will be changed into that of @c pReference and @c child will be
414          * placed right above or below the @c pReference instance according to the @c above parameter.
415          *
416          * @since               2.0
417          *
418          * @return              An error code
419          * @param[in]   child                           The %VisualElement instance to attach to this instance
420          * @param[in]   pReference                      A pointer to the %VisualElement instance that is referenced
421          * @param[in]   above                           Specifies the position of @c child relative to the @c pReference
422          * @exception   E_SUCCESS                       The method is successful.
423          * @exception   E_INVALID_ARG           The input parameter is incorrect. Either of the following conditions has occurred: @n
424          *                                                                      - The specified @c child is not instantiated successfully. @n
425          *                                                                      - The specified @c child is this instance. @n
426          *                                                                      - The specified @c child and @c pReference are same. @n
427          *                                                                      - The specified @c child is already an ancestor of this instance. @n
428          *                                                                      - The parent of @c pReference is not this instance if @c pReference is not @c null. @n
429          * @remarks             If @c above is @c true, the @c child will be attached above @c pReference in Z order,
430          *                              else it will be attached below the @c pReference %VisualElement. @n
431          *                              If @c pReference is @c null, the @c child will be attached at the highest position in the @c child's Z order group,
432          *                              else the child will be attached at the lowest position in the @c child's Z order group.
433          * @see         SetZOrderGroup()
434          * @see         AttachChild()
435          * @see         DetachChild()
436          * @see         ChangeZOrder()
437          */
438         result InsertChild(const VisualElement& child, const VisualElement* pReference, bool above);
439
440         /**
441          * Detaches a child from this instance.
442          *
443          * @since               2.0
444          *
445          * @param[in]   child                           The %VisualElement instance to detach from this instance
446          * @exception   E_SUCCESS                       The method is successful.
447          * @exception   E_OBJ_NOT_FOUND         The specified @c child is not a child of this instance.
448          * @remarks             This method detaches @c child from this instance. If you need to deallocate %VisualElement, call Destroy() method, not C++ delete.
449          * @see         InsertChild()
450          * @see         AttachChild()
451          */
452         result DetachChild(const VisualElement& child);
453
454         /**
455          * Changes Z order of this instance.
456          *
457          * @since               2.0
458          *
459          * @param[in]   pReference                      A pointer to the %VisualElement instance that is referenced
460          * @param[in]   above                           Specifies the position of this instance relative to the @c pReference
461          * @exception   E_SUCCESS                       The method is successful.
462          * @exception   E_INVALID_ARG           The input parameter is incorrect. Either of the following conditions has occurred: @n
463          *                                                                      - This instance does not have a parent (not attached). @n
464          *                                                                      - This instance and @c pReference do not have same parent if @c pReference is not @c null. @n
465          *                                                                      - The specified @c pReference is this instance. @n
466          * @remarks             If @c above is @c true, this instance will be attached above @c pReference in Z order,
467          *                              else it will be attached below the @c pReference %VisualElement. @n
468          *                              If @c pReference is @c null, this instance will be attached at the highest position in the Z order group of this instance,
469          *                              else the child will be attached at the lowest position in the Z order group of this instance.
470          * @see         InsertChild()
471          * @see         AttachChild()
472          * @see         DetachChild()
473          */
474         result ChangeZOrder(const VisualElement* pReference, bool above);
475
476         /**
477          * Gets the child of the specified @c name. @n
478          * If there are multiple matches of the name, it returns the first match.
479          *
480          * @since               2.0
481          *
482          * @return              The %VisualElement instance having the specified @c name @n
483          *                              else @c null if there is not %VisualElement with the specified @c name
484          * @param[in]   name                            The name of the %VisualElement
485          * @param[in]   searchDescendants       @c true to find a match among all the descendants of this instance, @n
486          *                                                                      else @c false
487          * @exception   E_SUCCESS                       The method is successful.
488          * @exception   E_OBJ_NOT_FOUND  There is no %VisualElement with the specified @c name.
489          * @remarks             The specific error code can be accessed using the GetLastResult() method.
490          * @remarks             If an exception occurs, this method returns @c null.
491          * @see         GetName()
492          * @see         SetName()
493          */
494         VisualElement* GetChild(const Tizen::Base::String& name, bool searchDescendants) const;
495
496         /**
497          * Gets the farthest (highest Z order) %VisualElement descendant including this instance that contains a specified @c point. @n
498          * The OnHitTest() method or [HitTest](@ref Tizen::Ui::Animations::IVisualElementContentProvider::HitTest) callback may be called
499          * for descendants of this instance including itself.
500          *
501          * @since               2.0
502          *
503          * @return              The %VisualElement that contains @c point, @n
504          *                              else @c null if @c point is completely outside of this instance
505          * @param[in]   point                           The position in coordinate space of this instance
506          * @exception   E_SUCCESS                       The method is successful.
507          * @exception   E_OBJ_NOT_FOUND         There is no %VisualElement containing the specified @c point.
508          * @remarks             The specific error code can be accessed using the GetLastResult() method.
509          * @remarks             If an exception occurs, this method returns @c null.
510          * @remarks             This method assumes that all ancestors of this instance do not clip children.
511          * @see         IVisualElementContentProvider::HitTest()
512          * @see         OnHitTest()
513          * @see         IsClipChildrenEnabled()
514          * @see         SetClipChildrenEnabled()
515          */
516         VisualElement* GetChildAt(const Tizen::Graphics::FloatPoint& point) const;
517
518         /**
519          * Adds an animation without key name.
520          *
521          * @since               2.0
522          *
523          * @return              An error code
524          * @param[in]   animation                       The animation instance
525          * @exception   E_SUCCESS                       The method is successful.
526          * @exception   E_INVALID_ARG           The input parameter is incorrect.
527          * @exception   E_INVALID_OPERATION     This instance is not a model object. @n
528          *                                                                      An animation can be added to the model instance only.
529          * @see                 RemoveAnimation()
530          * @see                 GetAnimationN()
531          */
532         result AddAnimation(const VisualElementAnimation& animation);
533
534         /**
535          * Adds an animation with key name.
536          *
537          * @since               2.0
538          *
539          * @return              An error code
540          * @param[in]   keyName                         The name of the animation that is used to identify animations @n
541          *                                                                      Empty @c keyName is allowed.
542          * @param[in]   animation                       The animation instance
543          * @exception   E_SUCCESS                       The method is successful.
544          * @exception   E_INVALID_ARG           The input parameter is incorrect.
545          * @exception   E_OBJ_ALREADY_EXIST     An animation with @c keyName already exists.
546          * @exception   E_INVALID_OPERATION     This instance is not a model object. @n
547          *                                                                      An animation can be added to the model instance only.
548          * @see                 RemoveAnimation()
549          * @see                 GetAnimationN()
550          */
551         result AddAnimation(const Tizen::Base::String& keyName, const VisualElementAnimation& animation);
552
553         /**
554          * Removes the animation with the specified @c keyName.
555          *
556          * @since               2.0
557          *
558          * @return              An error code
559          * @param[in]   keyName                         The name of the animation to remove
560          * @exception   E_SUCCESS                       The method is successful.
561          * @exception   E_OBJ_NOT_FOUND         An animation with @c keyName does not exist.
562          * @see                 AddAnimation()
563          * @see                 GetAnimationN()
564          */
565         result RemoveAnimation(const Tizen::Base::String& keyName);
566
567         /**
568          * Gets the animation playing for the specified property.
569          *
570          * @since               2.0
571          *
572          * @return              A pointer to the animation
573          * @param[in]   keyName                         The name of the animation
574          * @exception   E_SUCCESS                       The method is successful.
575          * @exception   E_OBJ_NOT_FOUND         An animation with @c keyName does not exist.
576          * @remarks             The specific error code can be accessed using the GetLastResult() method.
577          * @remarks             If an exception occurs, this method returns @c null.
578          * @see                 AddAnimation()
579          * @see                 RemoveAnimation()
580          */
581         VisualElementAnimation* GetAnimationN(const Tizen::Base::String& keyName) const;
582
583         /**
584          * Removes all animations.
585          *
586          * @since               2.0
587          *
588          * @see                 AddAnimation()
589          * @see                 RemoveAnimation()
590          */
591         void RemoveAllAnimations(void);
592
593         /**
594          * Adds a rectangle to update region of this instance. @n
595          * The update region represents the portion of the %VisualElement's area that must be redrawn by the OnDraw() method.
596          *
597          * @since               2.0
598          *
599          * @return              An error code
600          * @param[in]   pRectangle                      The pointer to the rectangular region that contains the coordinates of the rectangle to add to the update region @n
601          *                                              If @c pRectangle is @c null, entire area is added to the update region.
602          * @exception   E_SUCCESS                       The method is successful.
603          * @exception   E_INVALID_OPERATION     The contents of this instance is set by the SetSurface() method.
604          * @see                 SetSurface()
605          */
606         result InvalidateRectangle(const Tizen::Graphics::FloatRectangle* pRectangle);
607
608         /**
609          * Gets the smallest rectangle that completely encloses the update region of this instance. @n
610          * Applications can use the update region in the OnDraw() method to minimize the redrawing area to improve performance.
611          * The %GetUpdateRectangle() method returns an empty rectangle if it is not called inside OnDraw() method.
612          *
613          * @since               2.0
614          *
615          * @return              The rectangle to update
616          * @remarks             The specific error code can be accessed using the GetLastResult() method.
617          * @remarks             If an exception occurs, this method returns FloatRectangle(0.0, 0.0, -1.0, -1.0).
618          * @see                 InvalidateRectangle()
619          */
620         Tizen::Graphics::FloatRectangle GetUpdateRectangle(void) const;
621
622         /**
623          * Updates the content area of all the descendants including this instance.
624          * The %Draw() method will call OnDraw() or DrawContent() method only if there are regions invalidated by InvalidateRectangle().
625          * The platform will call this method later automatically if applications do not call explicitly.
626          *
627          * @since               2.0
628          *
629          * @return              An error code
630          * @exception   E_SUCCESS                       The method is successful.
631          * @exception   E_INVALID_STATE         This instance is not attached to the maintained tree for displaying. @n
632          *                                              For displaying, this instance should be descendant of the root %VisualElement.
633          * @exception   E_SYSTEM                        A system error has occurred.
634          * @see IVisualElementContentProvider
635          */
636         result Draw(void);
637
638         /**
639          * Marks the entire area of this instance to be flushed.
640          *
641          * @since               2.0
642          *
643          * @return              An error code
644          * @exception   E_SUCCESS                       The method is successful.
645          *
646          * @see         Flush()
647          */
648         result SetFlushNeeded(void);
649
650         /**
651          * Creates and returns a graphics canvas whose bounds, position, and size are equal to those of this instance.
652          *
653          * @since               2.0
654          *
655          * @return              The graphic canvas of the %VisualElement, @n
656          *                              else @c null if an exception occurs
657          * @exception   E_SUCCESS                       The method is successful.
658          * @exception   E_INVALID_STATE         This instance is in an invalid state.
659          * @exception   E_INVALID_OPERATION     The contents of this instance is set by the SetSurface() method.
660          * @exception   E_OUT_OF_RANGE          The size of the %VisualElement instance is @c 0 or smaller.
661          * @remarks             This method allocates a Tizen::Graphics::Canvas whose bounds are equal to that of the %VisualElement.
662          *                              It is the developer's responsibility to deallocate the canvas after use.
663          *                              The canvas is guaranteed to be valid only if the properties of the parent %VisualElement of the canvas remain unchanged.
664          *                              Therefore, one must delete previously allocated canvas and create a new canvas using this method,
665          *                              if the size or position of the %VisualElement is changed. @n
666          * @remarks             The specific error code can be accessed using the GetLastResult() method.
667          * @remarks             If an exception occurs, this method returns @c null.
668          * @see                 GetCanvasN(const Tizen::Graphics::Rectangle& bounds)
669          */
670         Tizen::Graphics::Canvas* GetCanvasN(void) const;
671
672
673         /**
674          * Creates and returns a graphic canvas of the specified area.
675          *
676          * @since               2.0
677          *
678          * @return              The graphic canvas of the %VisualElement, @n
679          *                              else @c null if an exception occurs
680          * @param[in]   bounds                          The position relative to the top-left corner of the %VisualElement and size
681          * @exception   E_SUCCESS                       The method is successful.
682          * @exception   E_INVALID_STATE         This instance is in an invalid state.
683          * @exception   E_INVALID_OPERATION     The contents of this instance is set by the SetSurface() method.
684          * @exception   E_OUT_OF_RANGE          The specified @c bounds do not intersect with the bounds of the %VisualElement. @n
685          *                                                                      The width and height must be greater than @c 0.
686          * @remarks             Only the graphic canvas of displayable %VisualElement can be obtained.
687          *                              If the specified area is not inside the %VisualElement,
688          *                              the graphics canvas of overlapped area between the %VisualElement and the specified @c bound is returned. @n
689          *                              This method allocates a Tizen::Graphics::Canvas whose bounds are equal to that of the %VisualElement.
690          *                              It is the developer's responsibility to deallocate the canvas after use.
691          *                              The canvas is guaranteed to be valid only if the properties of the parent %VisualElement of the canvas remain unchanged.
692          *                              Therefore, one must delete previously allocated canvas and create a new canvas using this method,
693          *                              if the size or position of the control is changed. @n
694          * @remarks             The specific error code can be accessed using the GetLastResult() method.
695          * @remarks             If an exception occurs, this method returns @c null.
696          * @see                 GetCanvasN()
697          */
698         Tizen::Graphics::Canvas* GetCanvasN(const Tizen::Graphics::Rectangle& bounds) const;
699
700         /**
701          * Gets the name of this instance.
702          *
703          * @since               2.0
704          *
705          * @return              The name of this instance
706          */
707         Tizen::Base::String GetName(void) const;
708
709         /**
710          * Sets the name of this instance.
711          *
712          * @since               2.0
713          *
714          * @param[in]   name                            The name of the %VisualElement instance @n
715          *                                  Empty or duplicated name with other instances are also allowed.
716          */
717         void SetName(const Tizen::Base::String& name);
718
719         /**
720          * Gets the value of the %VisualElement's property.
721          *
722          * @since               2.0
723          *
724          * @return              The value of the specified property
725          * @param[in]   property                        The %VisualElement's property
726          * @exception   E_SUCCESS                       The method is successful.
727          * @exception   E_KEY_NOT_FOUND         The specified @c property is not found.
728          * @remarks             The specific error code can be accessed using the GetLastResult() method.
729          * @remarks             If an exception occurs, this method returns @c Variant::NULL_VARIANT.
730          * @remarks             Additional exceptions can occur according to the behavior of subclasses.
731          * @see                 SetProperty()
732          * @see                 OnGetPropertyRequested()
733          */
734         Variant GetProperty(const Tizen::Base::String& property) const;
735
736         /**
737          * Sets the value of the %VisualElement's property.
738          *
739          * @since               2.0
740          *
741          * @return              The property's value
742          * @param[in]   property                        The %VisualElement's property
743          * @param[in]   value                           The value of the %VisualElement's property to set
744          * @exception   E_SUCCESS                       The method is successful.
745          * @exception   E_KEY_NOT_FOUND         The specified @c property is not found.
746          * @remarks             Additional exceptions can occur according to the behavior of subclasses.
747          * @see                 GetProperty()
748          * @see                 OnSetPropertyRequested()
749          */
750         result SetProperty(const Tizen::Base::String& property, const Variant& value);
751
752         /**
753          * Sets the Z order group of this instance.
754          *
755          * @since               2.0
756          *
757          * @return              An error code
758          * @param[in]   zOrderGroup                     The value of Z order which must be between @c Z_ORDER_GROUP_LOWEST and @c Z_ORDER_GROUP_HIGHEST @n
759          *                                                                      The default value is @c Z_ORDER_GROUP_NORMAL.
760          * @exception   E_SUCCESS                       The method is successful.
761          * @exception   E_OUT_OF_RANGE          The @c zOrderGroup is not between @c Z_ORDER_GROUP_LOWEST and @c Z_ORDER_GROUP_HIGHEST.
762          * @remarks             You can choose the @c zOrderGroup value as follows: @n
763          *                              - Tizen::Ui::Animations::Z_ORDER_GROUP_LOWEST @n
764          *                              - Tizen::Ui::Animations::Z_ORDER_GROUP_NORMAL @n
765          *                              - Tizen::Ui::Animations::Z_ORDER_GROUP_HIGHEST @n
766          *                              Or you can specify an integer value between @c ZORDER_GROUP_LOWEST and @c ZORDER_GROUP_HIGHEST.
767          * @see GetZOrderGroup()
768          */
769         result SetZOrderGroup(int zOrderGroup);
770
771         /**
772          * Gets the Z order group of this instance.
773          *
774          * @since               2.0
775          *
776          * @return              The Z order group of this instance
777          * @see SetZOrderGroup()
778          */
779         int GetZOrderGroup(void) const;
780
781         /**
782          * Checks whether the redraw-on-resize feature is enabled.
783          *
784          * @since               2.0
785          *
786          * @return              @c true if the redraw-on-resize feature is enabled, @n
787          *                              else @c false
788          * @remarks             The entire content area will be added to the update region when bounds are changed if redraw-on-resize is enabled. @n
789          *                              Otherwise, current contents will be scaled for the new bounds of this instance without redrawing.
790          * @see SetRedrawOnResizeEnabled()
791          */
792         bool IsRedrawOnResizeEnabled(void) const;
793
794         /**
795          * Enables or disables the redraw-on-resize feature.
796          *
797          * @since               2.0
798          *
799          * @param[in]   enable                          Set to @c true if invalidation is needed whenever resized, @n
800          *                                                                      else @c false
801          * @see IsRedrawOnResizeEnabled()
802          */
803         void SetRedrawOnResizeEnabled(bool enable);
804
805         /**
806          * Gets the position and the size of this instance.
807          *
808          * @since               2.0
809          *
810          * @return              An instance of the Tizen::Graphics::FloatRectangle that represents the position of top-left corner, @n
811          *                              the width, and the height of this instance. @n It has relative coordinate space to the parent.
812          * @see                 SetBounds()
813          */
814         Tizen::Graphics::FloatRectangle GetBounds(void) const;
815
816         /**
817          * Sets the position and the size of this instance.
818          *
819          * @since               2.0
820          *
821          * @return              An error code
822          * @param[in]   bounds                          The new bounds of this instance
823          * @exception   E_SUCCESS                       The method is successful.
824          * @exception   E_INVALID_STATE         This instance is in an invalid state.
825          * @remarks             When the size of @c bounds is changed, the entire content area will be added to the update region of this instance if redraw-on-resize feature is enabled.
826          * @see                 GetBounds()
827          * @see                 IsRedrawOnResizeEnabled()
828          * @see                 SetRedrawOnResizeEnabled()
829          */
830         result SetBounds(const Tizen::Graphics::FloatRectangle& bounds);
831
832         /**
833          * Gets the position on the Z-axis.
834          *
835          * @since               2.0
836          *
837          * @return              The position on the Z-axis
838          * @see                 SetZPosition()
839          */
840         float GetZPosition(void) const;
841
842         /**
843          * Sets the position on the Z-axis.
844          *
845          * @since               2.0
846          *
847          * @param[in]   zPosition                       The position on the Z-axis
848          * @see                 GetZPosition()
849          */
850         void SetZPosition(float zPosition);
851
852         /**
853          * Checks whether this instance is visible or not. @n
854          * Even if the show state is @c true, this instance can be invisible when show state of one of the ancestors is @c false.
855          *
856          * @since               2.0
857          *
858          * @return              @c true if this instance is visible, @n
859          *                              else @c false
860          * @see                 GetShowState()
861          * @see                 SetShowState()
862          */
863         bool IsVisible(void) const;
864
865         /**
866          * Gets the show state of this instance.
867          *
868          * @since               2.0
869          *
870          * @return              The show state of the %VisualElement instance, @n
871          *                              else @c false
872          * @remarks             Even if the show state is @c true, the %VisualElement is invisible if it is not attached to a parent.
873          * @see                 SetShowState()
874          * @see                 IsVisible()
875          */
876         bool GetShowState(void) const;
877
878         /**
879          * Sets the show state of this instance.
880          *
881          * @since               2.0
882          *
883          * @param[in]   show                            Set to @c true if this instance needs to show, @n
884          *                                                                      else @c false
885          * @see                 GetShowState()
886          * @see                 IsVisible()
887          */
888         void SetShowState(bool show);
889
890         /**
891          * Gets the opacity of this instance.
892          *
893          * @since               2.0
894          *
895          * @return              The opacity of this instance
896          * @see                 SetOpacity()
897          */
898         float GetOpacity(void) const;
899
900         /**
901          * Sets the opacity of this instance.
902          *
903          * @since               2.0
904          *
905          * @param[in]   opacity                         The new opacity which must be within the range [0.0, 1.0]
906          * @remarks             The changing opacity affects all the descendants of this instance.
907          * @see                 GetOpacity()
908          */
909         void SetOpacity(float opacity);
910
911         /**
912          * Enables or disables the implicit animation. @n
913          * If enabled, implicit animations may be created whenever animatable properties of this instance change.
914          *
915          * @since               2.0
916          *
917          * @param[in]   enable  Set to @c true to enable the implicit animation, @n
918          *                                              else @c false
919          * @remarks             The implicit animation is enabled by default.
920          * @see                 IsImplicitAnimationEnabled()
921          */
922         void SetImplicitAnimationEnabled(bool enable);
923
924         /**
925          * Checks whether the implicit animation is enabled.
926          *
927          * @since               2.0
928          *
929          * @return              @c true if the implicit animation is enabled, @n
930          *                              else @c false
931          * @see                 SetImplicitAnimationEnabled()
932          */
933         bool IsImplicitAnimationEnabled(void) const;
934
935         /**
936          * Gets the transform matrix of this instance.
937          *
938          * @since               2.0
939          *
940          * @return              The transform matrix of this instance
941          * @see                 SetTransformMatrix()
942          */
943         Tizen::Graphics::FloatMatrix4 GetTransformMatrix(void) const;
944
945         /**
946          * Sets the transform matrix of this instance.
947          *
948          * @since               2.0
949          *
950          * @return              An error code
951          * @param[in]   transform                       The transform matrix
952          * @exception   E_SUCCESS                       The method is successful.
953          * @exception   E_INVALID_ARG           The input parameter is incorrect. @n
954          *                              The E_INVALID_ARG exception occurs when the specified @c transform is not invertible.
955          * @see                 GetTransformMatrix()
956          */
957         result SetTransformMatrix(const Tizen::Graphics::FloatMatrix4& transform);
958
959         /**
960          * Gets the transform matrix applied to each child.
961          *
962          * @since               2.0
963          *
964          * @return              The transform matrix applied to each child
965          * @remarks             The transform matrix for children is typically used for the projection matrix to layout children in 3D space.
966          * @see                 SetChildrenTransformMatrix()
967          */
968         Tizen::Graphics::FloatMatrix4 GetChildrenTransformMatrix(void) const;
969
970         /**
971          * Sets the transform matrix applied to each child.
972          *
973          * @since               2.0
974          *
975          * @return              An error code
976          * @param[in]   transform                       The transform matrix
977          * @exception   E_SUCCESS                       The method is successful.
978          * @exception   E_INVALID_ARG           The input parameter is incorrect. @n
979          *                              The E_INVALID_ARG exception occurs when the specified @c transform is not invertible.
980          * @see                 GetChildrenTransformMatrix()
981          */
982         result SetChildrenTransformMatrix(const Tizen::Graphics::FloatMatrix4& transform);
983
984
985         /**
986          * Gets the anchor point for this instance's transform matrix in uniform coordinate space
987          * (0.0 and 1.0 mean left/top and right/bottom of the bounds, respectively).
988          *
989          * @since               2.0
990          *
991          * @return              The anchor point of this instance
992          * @see                 SetAnchor()
993          */
994         Tizen::Graphics::FloatPoint GetAnchor(void) const;
995
996         /**
997          * Sets the anchor point of this instance's transform matrix in uniform coordinate space
998          * (0.0 and 1.0 mean left/top and right/bottom of the bounds, respectively).
999          *
1000          * @since               2.0
1001          *
1002          * @param[in]   anchor                          The anchor point in uniform coordinate space
1003          * @see                 GetAnchor()
1004          */
1005         void SetAnchor(const Tizen::Graphics::FloatPoint& anchor);
1006
1007         /**
1008          * Gets the Z component of this instance's anchor point for transform matrix.
1009          *
1010          * @since               2.0
1011          *
1012          * @return              The Z component of the anchor point
1013          * @see                 SetAnchorZ()
1014          */
1015         float GetAnchorZ(void) const;
1016
1017         /**
1018          * Sets the Z component of this instance's anchor point for transform matrix.
1019          *
1020          * @since               2.0
1021          *
1022          * @param[in]   anchorZ                         The Z component of anchor point
1023          * @see                 GetAnchorZ()
1024          */
1025         void SetAnchorZ(float anchorZ);
1026
1027         /**
1028          * Gets the custom data of this instance.
1029          *
1030          * @since               2.0
1031          *
1032          * @return              The user data associated with this instance
1033          * @see                 SetUserData()
1034          */
1035         void* GetUserData(void) const;
1036
1037         /**
1038          * Sets the custom data of this instance.
1039          *
1040          * @since               2.0
1041          *
1042          * @param[in]   pUserData                       The user data associated with this instance
1043          * @see                 GetUserData()
1044          */
1045         void SetUserData(void* pUserData);
1046
1047         /**
1048          * Sets the contents of this instance with the specified VisualElementSurface. @n
1049          * The contents of the @c pSurface is not copied by the %SetSurface() method, but shared with this instance.
1050          *
1051          * @since               2.0
1052          *
1053          * @return              An error code
1054          * @param[in]   pSurface                        The pointer to VisualElementSurface @n
1055          *                                                                      If @c pSurface is @c null, surface will be created internally by system.
1056          * @exception   E_SUCCESS                       The method is successful.
1057          * @exception   E_INVALID_OPERATION     This instance does not allow VisualElementSurface for contents.
1058          * @remarks             If applications modify the contents of @c pSurface, the modifications will be applied to all
1059          *                              the %VisualElements which share same VisualElementSurface. But in this case, applications need to call
1060          *                              the SetFlushNeeded() method for those %VisualElements because the modifications of the @c pSurface will not be applied on the screen automatically.
1061          * @see                 GetSurfaceN()
1062          */
1063         result SetSurface(VisualElementSurface* pSurface);
1064
1065         /**
1066          * Gets the VisualElementSurface this instance uses for its contents.
1067          *
1068          * @since               2.0
1069          *
1070          * @return              A pointer to VisualElementSurface
1071          * @exception   E_SUCCESS                       The method is successful.
1072          * @exception   E_SYSTEM                        A system error has occurred.
1073          * @remarks             The specific error code can be accessed using the GetLastResult() method.
1074          * @remarks             If an exception occurs, this method returns @c null.
1075          * @see                 SetSurface()
1076          */
1077         VisualElementSurface* GetSurfaceN(void) const;
1078
1079         /**
1080          * Sets the render operation of this instance.
1081          *
1082          * @since               2.0
1083          *
1084          * @return              An error code
1085          * @param[in]   renderOperation         The new rendering operation
1086          * @exception   E_SUCCESS                       The method is successful.
1087          * @exception   E_INVALID_ARG           The specified @c renderOperation is out of range.
1088          * @see                 GetRenderOperation()
1089          */
1090         result SetRenderOperation(RenderOperation renderOperation);
1091
1092         /**
1093          * Gets the render operation of this instance.
1094          *
1095          * @since               2.0
1096          *
1097          * @return              The render operation of this instance
1098          * @see                 SetRenderOperation()
1099          */
1100         RenderOperation GetRenderOperation(void) const;
1101
1102         /**
1103          * Checks whether all the descendants are clipped to the bounds of this instance.
1104          *
1105          * @since               2.0
1106          *
1107          * @return              @c true if this instance clips all the descendants, @n
1108          *              else @c false
1109          * @see                 SetClipChildrenEnabled()
1110          */
1111         bool IsClipChildrenEnabled(void) const;
1112
1113         /**
1114          * Enables or disables clipping of all the descendants.
1115          *
1116          * @since               2.0
1117          *
1118          * @param[in]   clipChildren            Set to @c true if all the descendants are needed to clip to the bounds of this instance, @n
1119          *                                      else @c false
1120          * @see                 IsClipChildrenEnabled()
1121          */
1122         void SetClipChildrenEnabled(bool clipChildren);
1123
1124         /**
1125          * Converts the specified @c point in @c pFromVisualElement coordinate space to this instance's coordinate space.
1126          *
1127          * @since                       2.0
1128          *
1129          * @return                      An error code
1130          * @param[in,out]       point                           The point to convert
1131          * @param[in]           pFromVisualElement      The %VisualElement instance with @c point in its coordinate space
1132          * @exception           E_SUCCESS                       The method is successful.
1133          * @exception           E_INVALID_ARG           The input parameter is incorrect.
1134          * @remarks                     This instance and @c pFromVisualElement must share a common ancestor. @n
1135          *                                      If @c null, it is regarded that @c point is in the screen coordinate space.
1136          * @see                         ConvertCoordinates(Tizen::Graphics::FloatRectangle& rectangle, const VisualElement* pFromVisualElement)
1137          */
1138         result ConvertCoordinates(Tizen::Graphics::FloatPoint& point, const VisualElement* pFromVisualElement) const;
1139
1140         /**
1141          * Converts the specified @c rectangle in @c pFromVisualElement coordinate space to this instance's coordinate space.
1142          *
1143          * @since                       2.0
1144          *
1145          * @return                      An error code
1146          * @param[in,out]       rectangle                       The rectangle to convert
1147          * @param[in]           pFromVisualElement      The %VisualElement instance with @c rectangle in its coordinate space
1148          * @exception           E_SUCCESS                       The method is successful.
1149          * @exception           E_INVALID_ARG           The input parameter is incorrect.
1150          * @exception           E_SYSTEM                        A system error has occurred.
1151          * @remarks                     This instance and @c pFromVisualElement must share a common parent. @n
1152          *                                      If @c null, it is regarded that @c rectangle is in the screen coordinate space.
1153          * @see                         ConvertCoordinates(Tizen::Graphics::FloatPoint& point, const VisualElement* pFromVisualElement)
1154          */
1155         result ConvertCoordinates(Tizen::Graphics::FloatRectangle& rectangle, const VisualElement* pFromVisualElement) const;
1156
1157         /**
1158          * Sets the sub-rectangle of contents which this instance must display.
1159          *
1160          * @since               2.0
1161          *
1162          * @return              An error code
1163          * @param[in]   contentBounds                   The sub-rectangle of contents to display in uniform coordinate space
1164          * @exception   E_SUCCESS                               The method is successful.
1165          * @exception   E_INVALID_ARG                   The width and height of @c contentBounds must be greater than @c 0.0.
1166          * @remarks             Default @c contentBounds is FloatRectangle(0.0, 0.0, 1.0, 1.0).
1167          * @remarks             If each component of @c contentBounds is not within the range [0.0, 1.0], the integer portion of the coordinates are
1168          *                              ignored and only fractional part is used which creates a repeating contents.
1169          * @see                 GetContentBounds()
1170          */
1171         result SetContentBounds(const Tizen::Graphics::FloatRectangle& contentBounds);
1172
1173         /**
1174          * Gets the sub-rectangle of contents which this instance must display.
1175          *
1176          * @since               2.0
1177          *
1178          * @return              The sub-rectangle of contents to be displayed in uniform coordinate space
1179          * @remarks             Default @c contentBounds is FloatRectangle(0.0, 0.0, 1.0, 1.0).
1180          * @see                 SetContentBounds()
1181          */
1182         Tizen::Graphics::FloatRectangle GetContentBounds(void) const;
1183
1184         /**
1185          * Acquires the %VisualElement instance for display.
1186          *
1187          * @since               2.0
1188          *
1189          * @return              The %VisualElement instance for display(readonly)
1190          * @remarks             If this instance is a presentation object, this method returns itself.
1191          * @see                ReleasePresentationInstance()
1192          */
1193         const VisualElement* AcquirePresentationInstance(void);
1194
1195         /**
1196          * Releases the %VisualElement instance for display.
1197          *
1198          * @since               2.0
1199          *
1200          * @remarks             This method should be called only after AcquirePresentationInstance() call.
1201          * @see                AcquirePresentationInstance()
1202          */
1203         void ReleasePresentationInstance(void);
1204
1205         /**
1206          * Acquires the %VisualElement instance for model.
1207          *
1208          * @since               2.0
1209          *
1210          * @return              The %VisualElement instance for model(readonly)
1211          * @remarks             If this instance is a model object, this method returns itself.
1212          * @see                ReleaseModelInstance()
1213          */
1214
1215         const VisualElement* AcquireModelInstance(void);
1216
1217         /**
1218          * Releases the %VisualElement instance for model.
1219          *
1220          * @since               2.0
1221          *
1222          * @remarks             This method should be called only after AcquireModelInstance() call.
1223          */
1224         void ReleaseModelInstance(void);
1225
1226         /**
1227          * Flushes %VisualElements on screen.
1228          *
1229          * @since               2.0
1230          *
1231          * @return              An error code
1232          * @exception   E_SUCCESS                       The method is successful.
1233          * @exception   E_SYSTEM                        A system error has occurred.
1234          * @remarks             Because this method may degrade the performance of system, applications must use this method only when really needed.
1235          * @see                 SetFlushNeeded()
1236          */
1237         static result Flush(void);
1238
1239
1240 protected:
1241         /**
1242          * This is copy constructor for the %VisualElement class.
1243          *
1244          * @since               2.0
1245          *
1246          * @param[in]   rhs                     An instance of %VisualElement
1247          * @see         CloneN()
1248          */
1249         VisualElement(const VisualElement& rhs);
1250
1251         /**
1252          * This is the destructor for this class.
1253          *
1254          * @since               2.0
1255          *
1256          * @remarks             The delete operator cannot be used to deallocate the %VisualElement instance.
1257          * @see         Destroy()
1258          */
1259         virtual ~VisualElement(void);
1260
1261         /**
1262          * Creates and returns a polymorphic copy of this %VisualElement instance for the presentation. @n
1263          * All descendants of %VisualElement must implement the %CloneN() method and the copy constructor appropriately. @n
1264          * When the %VisualElement instance is created, the framework make a %VisualElement for the presentation with this method.
1265          *
1266          * @since               2.0
1267          *
1268          * @return              The clone of this instance
1269          */
1270         virtual VisualElement* CloneN(void) const;
1271
1272
1273         //
1274         // This method is for internal use only. Using this method can cause behavioral, security-related,
1275         // and consistency-related issues in the application.
1276         //
1277         //
1278         // This method is reserved and may change its name at any time without prior notice.
1279         //
1280         // @since               2.0
1281         //
1282         virtual void VisualElement_Reserved1(void) {}
1283
1284
1285         //
1286         // This method is for internal use only. Using this method can cause behavioral, security-related,
1287         // and consistency-related issues in the application.
1288         //
1289         //
1290         // This method is reserved and may change its name at any time without prior notice.
1291         //
1292         // @since               2.0
1293         //
1294         virtual void VisualElement_Reserved2(void) {}
1295
1296
1297         //
1298         // This method is for internal use only. Using this method can cause behavioral, security-related,
1299         // and consistency-related issues in the application.
1300         //
1301         //
1302         // This method is reserved and may change its name at any time without prior notice.
1303         //
1304         // @since               2.0
1305         //
1306         virtual void VisualElement_Reserved3(void) {}
1307
1308
1309         //
1310         // This method is for internal use only. Using this method can cause behavioral, security-related,
1311         // and consistency-related issues in the application.
1312         //
1313         //
1314         // This method is reserved and may change its name at any time without prior notice.
1315         //
1316         // @since               2.0
1317         //
1318         virtual void VisualElement_Reserved4(void) {}
1319
1320
1321         //
1322         // This method is for internal use only. Using this method can cause behavioral, security-related,
1323         // and consistency-related issues in the application.
1324         //
1325         //
1326         // This method is reserved and may change its name at any time without prior notice.
1327         //
1328         // @since               2.0
1329         //
1330         virtual void VisualElement_Reserved5(void) {}
1331
1332
1333 private:
1334
1335         //
1336         // The implementation of this assignment constructor is intentionally blank to prohibit assignment of objects.
1337         //
1338         // @since               2.0
1339         //
1340         VisualElement& operator =(const VisualElement& rhs);
1341
1342
1343 protected:
1344         _VisualElementImpl* _pVisualElementImpl;
1345
1346         friend class _VisualElementImpl;
1347 };              // VisualElement
1348
1349
1350 }}}             // Tizen::Ui::Animations
1351
1352 #endif //_FUIANIMVISUALELEMENT_H_