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