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.
18 * @file FUiAnim_VisualElement.h
19 * @brief This is the header file for the _VisualElement class.
21 * This header file contains declarations of the @e _VisualElement class.
23 #ifndef _FUIANIM_INTERNAL_VISUAL_ELEMENT_H_
24 #define _FUIANIM_INTERNAL_VISUAL_ELEMENT_H_
26 #include <FUiAnimVisualElement.h>
27 #include "FUi_Colorf.h"
29 namespace Tizen { namespace Ui { namespace Animations
32 class _OSP_EXPORT_ _VisualElement
33 : public VisualElement
38 * This is the default constructor for this class.
47 * This is the destructor for this class.
51 virtual ~_VisualElement(void);
54 IVisualElementAnimationProvider* GetAnimationProvider(void) const;
56 IVisualElementContentProvider* GetContentProvider(void) const;
58 IVisualElementEventListener* GetVisualElementEventListener(void) const;
63 * Clones the instance of VisualElement.
66 * @return The pointer to the cloned VisualElement instance.
68 virtual VisualElement* CloneN(void) const;
71 * Gets the current background color of the VisualElement.
74 * @return The background color of the VisualElement.
75 * @see SetBackgroundColor()
77 _Colorf GetBackgroundColor(void) const;
80 * Changes the background color of the VisualElement.
83 * @return An error code
84 * @param[in] color The new background color.
85 * @exception E_SUCCESS The method was successful.
86 * @see GetBackgroundColor()
89 result SetBackgroundColor(const _Colorf& color);
93 * Sets the custom data of the VisualElement.
96 * @param[in] pUserData data to save.
98 void SetControlUserData(void* pUserData);
101 * Gets the custom data of the VisualElement.
105 void* GetControlUserData(void) const;
108 * Gets the top-most child ControlVisualElement indicated by @c point.
111 * @return the child ControlVisualElement indicated by point.
112 * @param[in] point The position to find the child ControlVisualElement.
114 // _VisualElement* GetControlChildAtPoint(Tizen::Graphics::FloatPoint& point);
117 * Overrides this method to check the element can draw.
121 virtual bool OnPrepareDraw(void);
123 result SetClipToParent(bool clipToParent);
124 result SetBackBufferEnabled(bool enable);
125 result SetSurfaceOpaque(bool isSurfaceOpaque);
127 Tizen::Graphics::FloatRectangle GetBoundingBox(void);
128 result SetZOrder(const VisualElement* pReference, bool above);
130 result SetImageSource(const Tizen::Base::String& fileName);
131 result SetContentOpacity(float contentOpacity);
133 result ScrollByPoint(const Tizen::Graphics::FloatPoint& pointOffset, bool scrollSelf);
135 result Capture(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::FloatRectangle& boundsToDraw, bool withChilren);
136 class _INativeNode* GetNativeNode(void) const;
138 _VisualElement* GetPresentation(void);
139 _VisualElement* GetModel(void);
142 _VisualElement(const _VisualElement& rhs);
149 }}} // Tizen::Ui::Animations
151 #endif //_FUIANIM_INTERNAL_VISUAL_ELEMENT_H_