1 #ifndef DALI_TOOLKIT_TEST_TEST_BUTTON_H
2 #define DALI_TOOLKIT_TEST_TEST_BUTTON_H
5 * Copyright (c) 2016 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.
20 #include <dali-toolkit/dali-toolkit.h>
21 #include <test-animation-data.h>
30 class TestButton : public Dali::Toolkit::Control
35 PROPERTY_START_INDEX = Dali::Toolkit::Control::CONTROL_PROPERTY_END_INDEX + 1,
36 PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000
42 PRESS_TRANSITION = PROPERTY_START_INDEX,
49 TestButton(const TestButton& button);
50 TestButton(Impl::TestButton& impl);
51 TestButton(Dali::Internal::CustomActor* internal);
52 TestButton& operator=( const TestButton& button);
54 static TestButton New();
55 static TestButton DownCast( Dali::BaseHandle handle );
61 class TestButton : public Dali::Toolkit::Internal::Control
64 static Test::TestButton New();
66 static void SetProperty( Dali::BaseObject* object,
67 Dali::Property::Index index,
68 const Dali::Property::Value& value );
70 static Dali::Property::Value GetProperty( Dali::BaseObject* object,
71 Dali::Property::Index propertyIndex );
75 virtual ~TestButton();
78 Test::TestAnimationData mPressTransitionData;
79 Test::TestAnimationData mReleaseTransitionData;
80 Test::TestAnimationData mDisabledTransitionData;
81 Test::TestAnimationData mEnabledTransitionData;
84 inline TestButton& GetImpl( Test::TestButton& handle )
86 DALI_ASSERT_ALWAYS( handle );
87 Dali::RefObject& object = handle.GetImplementation();
88 return static_cast<TestButton&>( object );
91 inline const TestButton& GetImpl( const Test::TestButton& handle )
93 DALI_ASSERT_ALWAYS( handle );
94 const Dali::RefObject& object = handle.GetImplementation();
95 return static_cast<const TestButton&>( object );
103 #endif // DALI_TOOLKIT_TEST_TEST_BUTTON_H