1 #ifndef __DALI_TOOLKIT_INTERNAL_CHECK_BOX_BUTTON_H__
2 #define __DALI_TOOLKIT_INTERNAL_CHECK_BOX_BUTTON_H__
5 * Copyright (c) 2016 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/devel-api/shader-effects/shader-effect.h>
26 #include <dali-toolkit/public-api/controls/buttons/check-box-button.h>
28 #include "button-impl.h"
40 * CheckBoxButton implementation class.
42 * \sa Dali::Toolkit::CheckBoxButton
44 class CheckBoxButton : public Button
49 * Create a new CheckBoxButton.
50 * @return A smart-pointer to the newly allocated CheckBoxButton.
52 static Dali::Toolkit::CheckBoxButton New();
57 * Construct a new CheckBoxButton.
62 * A reference counted object may only be deleted by calling Unreference()
64 virtual ~CheckBoxButton();
67 * Setup the ticking effect to the selected image.
69 void SetTickUVEffect();
71 private: // From Button
75 * @copydoc Toolkit::Internal::Button::OnInitialize
77 virtual void OnInitialize();
80 * @copydoc Toolkit::Internal::Button::OnLabelSet
82 virtual void OnLabelSet( bool noPadding );
85 * @copydoc Toolkit::Internal::Button::OnDisabled
87 virtual void OnDisabled();
90 * @copydoc Toolkit::Internal::Button::PrepareForTranstionIn( Actor actor )
92 virtual void PrepareForTranstionIn( Actor actor );
95 * @copydoc Toolkit::Internal::Button::PrepareForTranstionOut( Actor actor )
97 virtual void PrepareForTranstionOut( Actor actor );
100 * @copydoc Toolkit::Internal::Button::OnTransitionInImage( Actor actor )
102 virtual void OnTransitionIn( Actor actor );
107 CheckBoxButton( const CheckBoxButton& );
110 CheckBoxButton& operator=( const CheckBoxButton& );
113 Actor mSelectedImage;
116 } // namespace Internal
118 // Helpers for public-api forwarding methods
120 inline Toolkit::Internal::CheckBoxButton& GetImplementation( Toolkit::CheckBoxButton& button )
122 DALI_ASSERT_ALWAYS( button );
124 Dali::RefObject& handle = button.GetImplementation();
126 return static_cast<Toolkit::Internal::CheckBoxButton&>( handle );
129 inline const Toolkit::Internal::CheckBoxButton& GetImplementation( const Toolkit::CheckBoxButton& button )
131 DALI_ASSERT_ALWAYS( button );
133 const Dali::RefObject& handle = button.GetImplementation();
135 return static_cast<const Toolkit::Internal::CheckBoxButton&>( handle );
138 } // namespace Toolkit
142 #endif // __DALI_TOOLKIT_INTERNAL_CHECK_BOX_BUTTON_H__