Changes after ShaderEffect removal
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / buttons / check-box-button-impl.h
1 #ifndef __DALI_TOOLKIT_INTERNAL_CHECK_BOX_BUTTON_H__
2 #define __DALI_TOOLKIT_INTERNAL_CHECK_BOX_BUTTON_H__
3
4 /*
5  * Copyright (c) 2016 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 // EXTERNAL INCLUDES
22 #include <dali/public-api/common/dali-vector.h>
23
24 // INTERNAL INCLUDES
25 #include <dali-toolkit/public-api/controls/buttons/check-box-button.h>
26
27 #include "button-impl.h"
28
29 namespace Dali
30 {
31
32 namespace Toolkit
33 {
34
35 namespace Internal
36 {
37
38 /**
39  * CheckBoxButton implementation class.
40  *
41  * \sa Dali::Toolkit::CheckBoxButton
42  */
43 class CheckBoxButton : public Button
44 {
45 public:
46
47   /**
48    * Create a new CheckBoxButton.
49    * @return A smart-pointer to the newly allocated CheckBoxButton.
50    */
51   static Dali::Toolkit::CheckBoxButton New();
52
53 private:
54
55   /**
56    * Construct a new CheckBoxButton.
57    */
58   CheckBoxButton();
59
60   /**
61    * A reference counted object may only be deleted by calling Unreference()
62    */
63   virtual ~CheckBoxButton();
64
65   /**
66    * Setup the ticking effect to the selected image.
67    */
68   void SetTickUVEffect();
69
70 private: // From Button
71
72
73   /**
74    * @copydoc Toolkit::Internal::Button::OnInitialize
75    */
76   virtual void OnInitialize();
77
78   /**
79    * @copydoc Toolkit::Internal::Button::OnLabelSet
80    */
81   virtual void OnLabelSet( bool noPadding );
82
83   /**
84    * @copydoc Toolkit::Internal::Button::OnDisabled
85    */
86   virtual void OnDisabled();
87
88   /**
89    * @copydoc Toolkit::Internal::Button::PrepareForTranstionIn( Actor actor )
90    */
91   virtual void PrepareForTranstionIn( Actor actor );
92
93   /**
94    * @copydoc Toolkit::Internal::Button::PrepareForTranstionOut( Actor actor )
95    */
96   virtual void PrepareForTranstionOut( Actor actor );
97
98   /**
99    * @copydoc Toolkit::Internal::Button::OnTransitionInImage( Actor actor )
100    */
101   virtual void OnTransitionIn( Actor actor );
102
103 private:
104
105   // Undefined
106   CheckBoxButton( const CheckBoxButton& );
107
108   // Undefined
109   CheckBoxButton& operator=( const CheckBoxButton& );
110
111 private:
112   Actor         mSelectedImage;
113 };
114
115 } // namespace Internal
116
117 // Helpers for public-api forwarding methods
118
119 inline Toolkit::Internal::CheckBoxButton& GetImplementation( Toolkit::CheckBoxButton& button )
120 {
121   DALI_ASSERT_ALWAYS( button );
122
123   Dali::RefObject& handle = button.GetImplementation();
124
125   return static_cast<Toolkit::Internal::CheckBoxButton&>( handle );
126 }
127
128 inline const Toolkit::Internal::CheckBoxButton& GetImplementation( const Toolkit::CheckBoxButton& button )
129 {
130   DALI_ASSERT_ALWAYS( button );
131
132   const Dali::RefObject& handle = button.GetImplementation();
133
134   return static_cast<const Toolkit::Internal::CheckBoxButton&>( handle );
135 }
136
137 } // namespace Toolkit
138
139 } // namespace Dali
140
141 #endif // __DALI_TOOLKIT_INTERNAL_CHECK_BOX_BUTTON_H__