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 Flora License, Version 1.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://floralicense.org/license/
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.
21 #include <dali/public-api/object/ref-object.h>
22 #include <dali/public-api/signals/connection-tracker.h>
29 // Forward declarations
36 // Forward declarations
43 // Forward declarations
49 typedef IntrusivePtr<ButtonPainter> ButtonPainterPtr;
52 * ButtonPainter is an interface which provides common functionality to all painters.
54 class ButtonPainter : public RefObject, public ConnectionTracker
61 virtual ~ButtonPainter() {}
64 * Initializes the painter.
66 * This method is called from the Dali::Toolkit::Internal::Button.
68 * @param[inout] button The button in which all actors that form its appearance are going to be added.
70 virtual void Initialize( Toolkit::Button& button ) = 0;
75 * This method is called from the Dali::Toolkit::Internal::Button when its size changes.
77 * @param[inout] button The button which stores button's images.
78 * @param[in] size The new size.
80 virtual void SetSize( Toolkit::Button& button, const Vector3& size ) = 0;
83 * This method is called from the Dali::Toolkit::Internal::PushButton when the \e dimmed property changes.
85 * @param[inout] button The button in which all actors that form its appearance are going to be added.
86 * @param[in] dimmed The dimmed state.
88 virtual void SetDimmed( Toolkit::Button& button, bool dimmed ) = 0;
91 * Sets the animation time.
92 * @param [in] animationTime The animation time in seconds.
94 virtual void SetAnimationTime( float animationTime ) = 0;
97 * Retrieves the animation time.
98 * @return The animation time in seconds.
100 virtual float GetAnimationTime() const = 0;
103 } // namespace Internal
105 } // namespace Toolkit
109 #endif // __DALI_TOOLKIT_INTERNAL_BUTTON_PAINTER_H__