1 #ifndef __DALI_INTERNAL_PROPERTY_CONDITIONS_H__
2 #define __DALI_INTERNAL_PROPERTY_CONDITIONS_H__
5 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 #include <dali/public-api/common/dali-common.h>
23 #include <dali/public-api/object/base-object.h>
24 #include <dali/public-api/object/property-conditions.h>
25 #include <dali/public-api/object/property-value.h>
26 #include <dali/public-api/object/property-value.h>
35 * Structure to contain PropertyCondition internal data
38 class PropertyCondition : public Dali::BaseObject
48 False, ///< Result Always False
49 LessThan, ///< Magnitude of type is less than float value (arg0).
50 GreaterThan, ///< Magnitude of type is greater than float value (arg0).
51 Inside, ///< Magnitude of type is within float values (arg0 & arg1).
52 Outside, ///< Magnitude of type is outside float values (arg0 & arg1).
53 Step, ///< Value of type has crossed a step amount
54 VariableStep ///< Similar to step, except user can define a list of steps from reference value
65 virtual ~PropertyCondition();
70 PropertyCondition(const PropertyCondition& rhs);
73 PropertyCondition& operator=(const PropertyCondition& rhs);
77 Type type; ///< The condition Type.
78 Dali::Vector<float> arguments; ///< The condition Arguments.
82 } // namespace Internal
84 // Helpers for public-api forwarding methods
86 inline Internal::PropertyCondition& GetImplementation(Dali::PropertyCondition& pub)
88 DALI_ASSERT_ALWAYS( pub && "PropertyCondition handle is empty" );
90 BaseObject& handle = pub.GetBaseObject();
92 return static_cast<Internal::PropertyCondition&>(handle);
95 inline const Internal::PropertyCondition& GetImplementation(const Dali::PropertyCondition& pub)
97 DALI_ASSERT_ALWAYS( pub && "PropertyCondition handle is empty" );
99 const BaseObject& handle = pub.GetBaseObject();
101 return static_cast<const Internal::PropertyCondition&>(handle);
106 #endif // __DALI_INTERNAL_PROPERTY_CONDITIONS_H__