Refactored old API from RenderableActor into ImageActor.
[platform/core/uifw/dali-core.git] / dali / internal / event / actor-attachments / renderable-attachment-impl.h
1 #ifndef __DALI_INTERNAL_RENDERABLE_ATTACHMENT_H__
2 #define __DALI_INTERNAL_RENDERABLE_ATTACHMENT_H__
3
4 /*
5  * Copyright (c) 2014 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/public-api/actors/renderable-actor.h>
23 #include <dali/internal/event/actor-attachments/actor-attachment-impl.h>
24
25 namespace Dali
26 {
27
28 namespace Internal
29 {
30
31 namespace SceneGraph
32 {
33 class RenderableAttachment;
34 }
35
36 /**
37  * An base class for renderable actor attachments
38  */
39 class RenderableAttachment : public ActorAttachment
40 {
41 public:
42
43
44
45 protected:
46
47   /**
48    * Protected constructor; only base classes are instantiatable.
49    * @param[in] stage Used to send messages to scene-graph.
50    */
51   RenderableAttachment( Stage& stage );
52
53   /**
54    * A reference counted object may only be deleted by calling Unreference()
55    */
56   virtual ~RenderableAttachment();
57
58 private:
59
60   // Undefined
61   RenderableAttachment(const RenderableAttachment&);
62
63   // Undefined
64   RenderableAttachment& operator=(const RenderableAttachment& rhs);
65
66   /**
67    * Helper for getting the scene-graph renderable attachment.
68    * @return The scene object.
69    */
70   const SceneGraph::RenderableAttachment& GetSceneAttachment() const;
71
72   /**
73    * @copydoc Dali::Internal::ActorAttachment::OnStageConnection()
74    */
75   virtual void OnStageConnection();
76
77   /**
78    * @copydoc Dali::Internal::ActorAttachment::OnStageDisconnection()
79    */
80   virtual void OnStageDisconnection();
81
82   /**
83    * For derived classes, chained from OnStageConnection()
84    */
85   virtual void OnStageConnection2() = 0;
86
87   /**
88    * For derived classes, chained from OnStageDisconnection()
89    */
90   virtual void OnStageDisconnection2() = 0;
91
92   /**
93    * For derived classes to provide a corresponding scene-graph object
94    * @return The scene-object.
95    */
96   virtual const SceneGraph::RenderableAttachment& GetSceneObject() const = 0;
97
98 private: // Data, cached for actor-thread getters
99
100 };
101
102 } // namespace Internal
103
104 } // namespace Dali
105
106 #endif // __DALI_INTERNAL_RENDERABLE_ATTACHMENT_H__