ControlRenderer & RendererFactory for Toolkit Controls
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / renderers / color / color-renderer.h
1 #ifndef __DALI_TOOLKIT_INTERNAL_COLOR_RENDERER_H__
2 #define __DALI_TOOLKIT_INTERNAL_COLOR_RENDERER_H__
3
4 /*
5  * Copyright (c) 2015 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 // INTERNAL INCLUDES
22 #include <dali-toolkit/internal/controls/renderers/control-renderer-impl.h>
23
24 namespace Dali
25 {
26
27 namespace Toolkit
28 {
29
30 namespace Internal
31 {
32
33 /**
34  * The renderer which renders a solid color to the control's quad
35  *
36  * The following properties are required for create a ColorRender
37  *
38  * | %Property Name   | Type        |
39  * |------------------|-------------|
40  * | blend-color      | VECTOR4     |
41  */
42 class ColorRenderer: public ControlRenderer
43 {
44 public:
45
46   /**
47    * @brief Constructor.
48    */
49   ColorRenderer();
50
51   /**
52    * @brief A reference counted object may only be deleted by calling Unreference().
53    */
54   virtual ~ColorRenderer();
55
56 public:  // from ControlRenderer
57
58   /**
59    * @copydoc ControlRenderer::Initialize
60    */
61   virtual void Initialize( RendererFactoryCache& factoryCache, const Property::Map& propertyMap );
62
63   /**
64    * @copydoc ControlRenderer::SetSize
65    */
66   virtual void SetSize( const Vector2& size );
67
68   /**
69    * @copydoc ControlRenderer::SetClipRect
70    */
71   virtual void SetClipRect( const Rect<int>& clipRect );
72
73   /**
74    * @copydoc ControlRenderer::SetOffset
75    */
76   virtual void SetOffset( const Vector2& offset );
77
78   /**
79    * @copydoc ControlRenderer::SetOnStage
80    */
81   virtual void SetOnStage( Actor& actor );
82
83 private:
84
85   // Undefined
86   ColorRenderer( const ColorRenderer& colorRenderer );
87
88   // Undefined
89   ColorRenderer& operator=( const ColorRenderer& colorRenderer );
90
91 private:
92
93   Vector4 mBlendColor;
94
95 };
96
97 } // namespace Internal
98
99 } // namespace Toolkit
100
101 } // namespace Dali
102
103 #endif /* __DALI_TOOLKIT_INTERNAL_COLOR_RENDERER_H__ */