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 FUiAnimVisualElementContentProvider.h
20 * @brief This is the header file for the %VisualElementContentProvider class.
22 * This header file contains the declarations of the %VisualElementContentProvider class.
25 #ifndef _FUIANIM_VISUAL_ELEMENT_CONTENT_PROVIDER_H_
26 #define _FUIANIM_VISUAL_ELEMENT_CONTENT_PROVIDER_H_
28 #include <FUiAnimIVisualElementContentProvider.h>
30 namespace Tizen { namespace Graphics {
35 namespace Tizen { namespace Ui { namespace Animations
41 * @class VisualElementContentProvider
42 * @brief This class customizes content of VisualElement.
46 * The %VisualElementContentProvider class provides the content and information on it. The class that needs to customize content must implement this interface, and
47 * using the VisualElement::SetContentProvider() method register to the VisualElement.
48 * This class implements IVisualElementContentProvider for the default operation of the contents.
50 class _OSP_EXPORT_ VisualElementContentProvider
51 : public IVisualElementContentProvider
55 * This is the default constructor for this class.
59 VisualElementContentProvider(void);
63 * This is the destructor for this class.
67 virtual ~VisualElementContentProvider(void);
71 * Checks whether the %PrepareDraw() method is invoked by UI framework before DrawContent() is called. @n
72 * If this method returns @c true, VisualElement can call the %DrawContent() method.
76 * @return @c true if DrawContent() can be called, @n
78 * @param[in] target The VisualElement instance to check
80 virtual bool PrepareDraw(VisualElement& target);
84 * Fills the contents in the given canvas.
88 * @param[in] target The VisualElement instance to draw
89 * @param[in] canvas The graphic canvas for drawing
90 * @see VisualElement::OnDraw()
91 * @see VisualElement::InvalidateRectangle()
93 virtual void DrawContent(VisualElement& target, Tizen::Graphics::Canvas& canvas);
97 * The %HitTest() method is called by VisualElement::GetChildAt(). @n
98 * The %VisualElement::GetChildAt() method traverses through a list of all the children, and performs a hit test search at the @c point using this method. @n
99 * You can modify hit test search result by overriding this method.
103 * @return The hit test result
104 * @param[in] target The VisualElement target to test
105 * @param[in] point The position of source to check
106 * @remarks Hit test results must be one of the following: @n
107 * - Tizen::Ui::Animations::HitTestResult::HIT_TEST_NOWHERE
108 * - Tizen::Ui::Animations::HitTestResult::HIT_TEST_MATCH
109 * @see VisualElement::GetChildAt()
111 virtual HitTestResult HitTest(VisualElement& target, const Tizen::Graphics::FloatPoint& point);
114 VisualElementContentProvider(const VisualElementContentProvider& value);
115 VisualElementContentProvider& operator =(const VisualElementContentProvider& value);
117 }; // VisualElementContentProvider
120 }}} // Tizen::Ui::Animations
122 #endif //_FUIANIM_VISUAL_ELEMENT_CONTENT_PROVIDER_H_