1 #ifndef __DALI_TOOLKIT_INTERNAL_CHECK_BOX_BUTTON_H__
2 #define __DALI_TOOLKIT_INTERNAL_CHECK_BOX_BUTTON_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/common/dali-vector.h>
23 #include <dali/public-api/shader-effects/shader-effect.h>
26 #include <dali-toolkit/public-api/controls/buttons/check-box-button.h>
27 #include <dali-toolkit/devel-api/shader-effects/image-region-effect.h>
29 #include "button-impl.h"
41 * CheckBoxButton implementation class.
43 * \sa Dali::Toolkit::CheckBoxButton
45 class CheckBoxButton : public Button
50 * Create a new CheckBoxButton.
51 * @return A smart-pointer to the newly allocated CheckBoxButton.
53 static Dali::Toolkit::CheckBoxButton New();
58 * Construct a new CheckBoxButton.
63 * A reference counted object may only be deleted by calling Unreference()
65 virtual ~CheckBoxButton();
68 * Setup the ticking effect to the selected image.
70 void SetTickUVEffect();
72 private: // From Button
76 * @copydoc Toolkit::Internal::Button::OnInitialize
78 virtual void OnInitialize();
81 * @copydoc Toolkit::Internal::Button::OnLabelSet
83 virtual void OnLabelSet( bool noPadding );
86 * @copydoc Toolkit::Internal::Button::OnDisabled
88 virtual void OnDisabled();
91 * @copydoc Toolkit::Internal::Button::PrepareForTranstionIn( Actor actor )
93 virtual void PrepareForTranstionIn( Actor actor );
96 * @copydoc Toolkit::Internal::Button::PrepareForTranstionOut( Actor actor )
98 virtual void PrepareForTranstionOut( Actor actor );
101 * @copydoc Toolkit::Internal::Button::OnTransitionInImage( Actor actor )
103 virtual void OnTransitionIn( Actor actor );
108 CheckBoxButton( const CheckBoxButton& );
111 CheckBoxButton& operator=( const CheckBoxButton& );
114 Actor mSelectedImage;
117 } // namespace Internal
119 // Helpers for public-api forwarding methods
121 inline Toolkit::Internal::CheckBoxButton& GetImplementation( Toolkit::CheckBoxButton& button )
123 DALI_ASSERT_ALWAYS( button );
125 Dali::RefObject& handle = button.GetImplementation();
127 return static_cast<Toolkit::Internal::CheckBoxButton&>( handle );
130 inline const Toolkit::Internal::CheckBoxButton& GetImplementation( const Toolkit::CheckBoxButton& button )
132 DALI_ASSERT_ALWAYS( button );
134 const Dali::RefObject& handle = button.GetImplementation();
136 return static_cast<const Toolkit::Internal::CheckBoxButton&>( handle );
139 } // namespace Toolkit
143 #endif // __DALI_TOOLKIT_INTERNAL_CHECK_BOX_BUTTON_H__