Dali 3D User Interface Engine
constrainer.h
Go to the documentation of this file.
1 #ifndef __DALI_INTERNAL_CONSTRAINER_H__
2 #define __DALI_INTERNAL_CONSTRAINER_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
24 
25 namespace Dali
26 {
27 
28 namespace Internal
29 {
30 
33 
39 class Constrainer : public Object, public Object::Observer
40 {
41 public:
42 
46  Constrainer();
47 
51  virtual ~Constrainer();
52 
53 public: // Object methods
54 
58  virtual unsigned int GetDefaultPropertyCount() const{return 0;}
59 
63  virtual void GetDefaultPropertyIndices( Property::IndexContainer& indices ) const{}
64 
68  virtual const char* GetDefaultPropertyName( Property::Index index ) const{return 0;}
69 
73  virtual Property::Index GetDefaultPropertyIndex( const std::string& name ) const{return Property::INVALID_INDEX;}
74 
78  virtual bool IsDefaultPropertyWritable( Property::Index index ) const{return false;}
79 
83  virtual bool IsDefaultPropertyAnimatable( Property::Index index ) const{return false;}
84 
88  virtual bool IsDefaultPropertyAConstraintInput( Property::Index index ) const{return false;}
89 
94 
98  virtual void SetDefaultProperty( Property::Index index, const Property::Value& propertyValue ){}
99 
104 
108  virtual const SceneGraph::PropertyOwner* GetSceneObject() const{return 0;}
109 
114 
118  virtual const PropertyInputImpl* GetSceneObjectInputProperty( Property::Index index ) const{return 0;}
119 
120 public: // Object::Observer methods
121 
125  virtual void SceneObjectAdded( Object& object ){}
126 
130  virtual void SceneObjectRemoved( Object& object ){}
131 
135  virtual void ObjectDestroyed( Object& object );
136 
137 public:
138 
147  virtual void Apply( Property target, Property source, const Vector2& range, const Vector2& wrap) = 0;
148 
154  void Remove( Dali::Handle& target );
155 
156 protected:
157 
163  void Observe( Dali::Handle& handle );
164 
165 private:
166 
168 };
169 
170 } // namespace Internal
171 
172 } // namespace Dali
173 
174 #endif // __DALI_INTERNAL_CONSTRAINER_H__
Dali Docs Home
Read more about Dali