1 #ifndef __DALI_TOOLKIT_INTERNAL_BUTTON_PAINTER_H__
2 #define __DALI_TOOLKIT_INTERNAL_BUTTON_PAINTER_H__
5 * Copyright (c) 2014 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/object/ref-object.h>
23 #include <dali/public-api/signals/connection-tracker.h>
30 // Forward declarations
37 // Forward declarations
44 // Forward declarations
50 typedef IntrusivePtr<ButtonPainter> ButtonPainterPtr;
53 * ButtonPainter is an interface which provides common functionality to all painters.
55 class ButtonPainter : public RefObject, public ConnectionTracker
62 virtual ~ButtonPainter() {}
65 * Initializes the painter.
67 * This method is called from the Dali::Toolkit::Internal::Button.
69 * @param[inout] button The button in which all actors that form its appearance are going to be added.
71 virtual void Initialize( Toolkit::Button& button ) = 0;
76 * This method is called from the Dali::Toolkit::Internal::Button when its size changes.
78 * @param[inout] button The button which stores button's images.
79 * @param[in] size The new size.
81 virtual void SetSize( Toolkit::Button& button, const Vector3& size ) = 0;
84 * This method is called from the Dali::Toolkit::Internal::PushButton when the \e disabled property changes.
86 * @param[inout] button The button in which all actors that form its appearance are going to be added.
87 * @param[in] disabled The disabled state.
89 virtual void SetDisabled( Toolkit::Button& button, bool disabled ) = 0;
92 * Sets the animation time.
93 * @param [in] animationTime The animation time in seconds.
95 virtual void SetAnimationTime( float animationTime ) = 0;
98 * Retrieves the animation time.
99 * @return The animation time in seconds.
101 virtual float GetAnimationTime() const = 0;
104 } // namespace Internal
106 } // namespace Toolkit
110 #endif // __DALI_TOOLKIT_INTERNAL_BUTTON_PAINTER_H__