2 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://floralicense.org/license/
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an AS IS BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
18 #include <dali/public-api/object/property-conditions.h>
21 #include <dali/public-api/object/property-value.h>
22 #include <dali/internal/event/common/property-conditions-impl.h>
27 PropertyCondition::PropertyCondition()
28 : BaseHandle(new Internal::PropertyCondition())
33 PropertyCondition::~PropertyCondition()
38 PropertyCondition::ArgumentContainer PropertyCondition::GetArguments()
40 return GetImplementation(*this).arguments;
43 const PropertyCondition::ArgumentContainer& PropertyCondition::GetArguments() const
45 return GetImplementation(*this).arguments;
48 PropertyCondition LessThanCondition(float arg)
50 PropertyCondition condition;
51 GetImplementation(condition).type = Internal::PropertyCondition::LessThan;
52 GetImplementation(condition).arguments.push_back(Property::Value(arg));
57 PropertyCondition GreaterThanCondition(float arg)
59 PropertyCondition condition;
60 GetImplementation(condition).type = Internal::PropertyCondition::GreaterThan;
61 GetImplementation(condition).arguments.push_back(Property::Value(arg));
66 PropertyCondition InsideCondition(float arg0, float arg1)
68 PropertyCondition condition;
69 GetImplementation(condition).type = Internal::PropertyCondition::Inside;
70 GetImplementation(condition).arguments.push_back(Property::Value(arg0));
71 GetImplementation(condition).arguments.push_back(Property::Value(arg1));
76 PropertyCondition OutsideCondition(float arg0, float arg1)
78 PropertyCondition condition;
79 GetImplementation(condition).type = Internal::PropertyCondition::Outside;
80 GetImplementation(condition).arguments.push_back(Property::Value(arg0));
81 GetImplementation(condition).arguments.push_back(Property::Value(arg1));