022164a21faef5378404c8e6bb20926e42b9a5b2
[platform/core/uifw/dali-core.git] / dali / internal / event / object / custom-object-internal.h
1 #ifndef __DALI_INTERNAL_CUSTOM_OBJECT_H__
2 #define __DALI_INTERNAL_CUSTOM_OBJECT_H__
3
4 //
5 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
6 //
7 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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 // INTERNAL INCLUDES
21 #include <dali/internal/event/common/proxy-object.h>
22
23 namespace Dali
24 {
25
26 namespace Internal
27 {
28
29 namespace SceneGraph
30 {
31 class PropertyOwner;
32 }
33
34 class CustomObject : public ProxyObject
35 {
36 public:
37
38   /**
39    * Create a new custom object.
40    * @return A pointer to the newly allocated object.
41    */
42   static CustomObject* New();
43
44   /**
45    * @copydoc Dali::Internal::ProxyObject::IsSceneObjectRemovable()
46    */
47   virtual bool IsSceneObjectRemovable() const;
48
49   /**
50    * @copydoc Dali::Internal::ProxyObject::GetSceneObject()
51    */
52   virtual const SceneGraph::PropertyOwner* GetSceneObject() const;
53
54   /**
55    * @copydoc Dali::Internal::ProxyObject::GetSceneObjectAnimatableProperty()
56    */
57   virtual const SceneGraph::PropertyBase* GetSceneObjectAnimatableProperty( Property::Index index ) const;
58
59   /**
60    * @copydoc Dali::Internal::ProxyObject::GetSceneObjectInputProperty()
61    */
62   virtual const PropertyInputImpl* GetSceneObjectInputProperty( Property::Index index ) const;
63
64   /**
65    * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyCount()
66    */
67   virtual unsigned int GetDefaultPropertyCount() const;
68
69   /**
70    * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyIndices()
71    */
72   virtual void GetDefaultPropertyIndices( Property::IndexContainer& indices ) const;
73
74   /**
75    * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyName()
76    */
77   virtual const std::string& GetDefaultPropertyName(Property::Index index) const;
78
79   /**
80    * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyIndex()
81    */
82   virtual Property::Index GetDefaultPropertyIndex(const std::string& name) const;
83
84   /**
85    * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyWritable()
86    */
87   virtual bool IsDefaultPropertyWritable(Property::Index index) const;
88
89   /**
90    * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyAnimatable()
91    */
92   virtual bool IsDefaultPropertyAnimatable(Property::Index index) const;
93
94   /**
95    * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyAConstraintInput()
96    */
97   virtual bool IsDefaultPropertyAConstraintInput( Property::Index index ) const;
98
99   /**
100    * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyType()
101    */
102   virtual Property::Type GetDefaultPropertyType(Property::Index index) const;
103
104   /**
105    * @copydoc Dali::Internal::ProxyObject::SetDefaultProperty()
106    */
107   virtual void SetDefaultProperty(Property::Index index, const Property::Value& propertyValue);
108
109   /**
110    * @copydoc Dali::Internal::ProxyObject::GetDefaultProperty()
111    */
112   virtual Property::Value GetDefaultProperty( Property::Index index ) const;
113
114   /**
115    * @copydoc Dali::Internal::ProxyObject::InstallSceneObjectProperty()
116    */
117   virtual void InstallSceneObjectProperty( SceneGraph::PropertyBase& newProperty, const std::string& name, unsigned int index );
118
119 protected:
120
121   /**
122    * A reference counted object may only be deleted by calling Unreference()
123    */
124   virtual ~CustomObject();
125
126   /**
127    * Private constructor; see also CustomObject::New()
128    */
129   CustomObject();
130
131   // Undefined
132   CustomObject(const CustomObject&);
133
134   // Undefined
135   CustomObject& operator=(const CustomObject& rhs);
136
137 protected:
138
139   SceneGraph::PropertyOwner* mUpdateObject;
140 };
141
142 } // namespace Internal
143
144 } // namespace Dali
145
146 #endif // __DALI_INTERNAL_CUSTOM_OBJECT_H__