Merge "Remove obsolete and non functional SizeChanged signal from actor" into tizen
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / buttons / button-painter-impl.h
1 #ifndef __DALI_TOOLKIT_INTERNAL_BUTTON_PAINTER_H__
2 #define __DALI_TOOLKIT_INTERNAL_BUTTON_PAINTER_H__
3
4 /*
5  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
6  *
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
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
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.
18  *
19  */
20
21 // INTERNAL INCLUDES
22 #include <dali/public-api/object/ref-object.h>
23 #include <dali/public-api/signals/connection-tracker.h>
24
25 // INTERNAL INCLUDES
26
27 namespace Dali
28 {
29
30 // Forward declarations
31
32 struct Vector3;
33
34 namespace Toolkit
35 {
36
37 // Forward declarations
38
39 class Button;
40
41 namespace Internal
42 {
43
44 // Forward declarations
45
46 class ButtonPainter;
47
48 // Type definitions
49
50 typedef IntrusivePtr<ButtonPainter> ButtonPainterPtr;
51
52 /**
53  * ButtonPainter is an interface which provides common functionality to all painters.
54  */
55 class ButtonPainter : public RefObject, public ConnectionTracker
56 {
57 public:
58   /**
59    * Destructor.
60    *
61    */
62   virtual ~ButtonPainter() {}
63
64   /**
65    * Initializes the painter.
66    *
67    * This method is called from the Dali::Toolkit::Internal::Button.
68    *
69    * @param[inout] button The button in which all actors that form its appearance are going to be added.
70    */
71   virtual void Initialize( Toolkit::Button& button ) = 0;
72
73   /**
74    * Sets the new size.
75    *
76    * This method is called from the Dali::Toolkit::Internal::Button when its size changes.
77    *
78    * @param[inout] button The button which stores button's images.
79    * @param[in] size The new size.
80    */
81   virtual void SetSize( Toolkit::Button& button, const Vector3& size ) = 0;
82
83   /**
84    * This method is called from the Dali::Toolkit::Internal::PushButton when the \e disabled property changes.
85    *
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.
88    */
89   virtual void SetDisabled( Toolkit::Button& button, bool disabled ) = 0;
90
91   /**
92    * Sets the animation time.
93    * @param [in] animationTime The animation time in seconds.
94    */
95   virtual void SetAnimationTime( float animationTime ) = 0;
96
97   /**
98    * Retrieves the animation time.
99    * @return The animation time in seconds.
100    */
101   virtual float GetAnimationTime() const = 0;
102 };
103
104 } // namespace Internal
105
106 } // namespace Toolkit
107
108 } // namespace Dali
109
110 #endif // __DALI_TOOLKIT_INTERNAL_BUTTON_PAINTER_H__