Dali 3D User Interface Engine
property-notification-impl.h
Go to the documentation of this file.
1 #ifndef __DALI_INTERNAL_PROPERTY_NOTIFICATION_H__
2 #define __DALI_INTERNAL_PROPERTY_NOTIFICATION_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
26 
27 namespace Dali
28 {
29 
30 class PropertyCondition;
31 
32 namespace Internal
33 {
34 
35 namespace SceneGraph
36 {
37 class PropertyNotification;
38 class UpdateManager;
39 }
40 
41 class Actor;
42 class PropertyNotification;
43 class Object;
45 
47 
54 {
55 public:
56 
59 
64 
72  static PropertyNotificationPtr New(Property& target,
73  int componentIndex,
74  const Dali::PropertyCondition& condition);
75 
76 public:
77 
82 
86  void EmitSignalNotify();
87 
91  void Enable();
92 
96  void Disable();
97 
103  void SetNotifyResult(bool result);
104 
108  const Dali::PropertyCondition& GetCondition() const;
109 
113  Dali::Handle GetTarget() const;
114 
119 
123  void SetNotifyMode( NotifyMode mode );
124 
129 
133  bool GetNotifyResult() const;
134 
140  bool CompareSceneObject( const SceneGraph::PropertyNotification* sceneObject );
141 
142 protected:
143 
153  PropertyNotificationManager& propertyNotificationManager,
154  Property& target,
155  int componentIndex,
156  const Dali::PropertyCondition& condition);
157 
161  void CreateSceneObject();
162 
166  void DestroySceneObject();
167 
171  virtual ~PropertyNotification();
172 
173 private:
174 
175  // Undefined
177 
178  // Undefined
180 
181 protected:
182 
185 
187 
188 private:
189 
199 };
200 
201 } // namespace Internal
202 
203 // Helpers for public-api forwarding methods
204 
206 {
207  DALI_ASSERT_ALWAYS( pub && "PropertyNotification handle is empty" );
208 
209  BaseObject& handle = pub.GetBaseObject();
210 
211  return static_cast<Internal::PropertyNotification&>(handle);
212 }
213 
215 {
216  DALI_ASSERT_ALWAYS( pub && "PropertyNotification handle is empty" );
217 
218  const BaseObject& handle = pub.GetBaseObject();
219 
220  return static_cast<const Internal::PropertyNotification&>(handle);
221 }
222 
223 } // namespace Dali
224 
225 #endif // __DALI_INTERNAL_PROPERTY_NOTIFICATION_H__
Dali Docs Home
Read more about Dali