fed09d1db4ff71b8be2617c0e724032e185ad161
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / renderers / debug / debug-visual.h
1 #ifndef __DALI_TOOLKIT_INTERNAL_DEBUG_RENDERER_H__
2 #define __DALI_TOOLKIT_INTERNAL_DEBUG_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/visual-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 wireframe outline to the control's quad for debugging
35  *
36  */
37 class DebugVisual: public Visual
38 {
39 public:
40
41   /**
42    * @brief Constructor.
43    *
44    * @param[in] factoryCache A pointer pointing to the VisualFactoryCache object
45    */
46   DebugVisual( VisualFactoryCache& factoryCache );
47
48   /**
49    * @brief A reference counted object may only be deleted by calling Unreference().
50    */
51   virtual ~DebugVisual();
52
53 protected:
54
55   /**
56    * @copydoc Visual::DoSetOnStage
57    */
58   virtual void DoSetOnStage( Actor& actor );
59
60   /**
61    * @copydoc Visual::CreatePropertyMap
62    */
63   virtual void DoCreatePropertyMap( Property::Map& map ) const;
64
65
66 private:
67   /**
68    * Create the geometry which presents the quad wireframe.
69    * @return The border geometry
70    */
71   Geometry CreateQuadWireframeGeometry();
72
73   /**
74    * @brief Initialise the renderer from the cache, if not available, create and save to the cache for sharing.
75    */
76   void InitializeRenderer();
77
78 private:
79
80   // Undefined
81   DebugVisual( const DebugVisual& debugRenderer );
82
83   // Undefined
84   DebugVisual& operator=( const DebugVisual& debugRenderer );
85
86 };
87
88 } // namespace Internal
89
90 } // namespace Toolkit
91
92 } // namespace Dali
93
94 #endif /* __DALI_TOOLKIT_INTERNAL_DEBUG_RENDERER_H__ */