1 #ifndef __DALI_TOOLKIT_CHECK_BOX_BUTTON_H__
2 #define __DALI_TOOLKIT_CHECK_BOX_BUTTON_H__
5 * Copyright (c) 2015 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-toolkit/public-api/controls/buttons/button.h>
30 // Forward declarations
32 namespace Internal DALI_INTERNAL
37 * @addtogroup dali_toolkit_controls_buttons
42 * @brief CheckBoxButton provides a check box button which user can check or uncheck.
44 * By default a CheckBoxButton emits a Button::ClickedSignal() signal when the button changes its state to selected or unselected.
46 * The button's appearance could be modified by Button::SetUnselectedImage, Button::SetBackgroundImage,
47 * Button::SetSelectedImage, Button::SetSelectedBackgroundImage, Button::SetDisabledBackgroundImage,
48 * Button::SetDisabledImage, and Button::SetDisabledSelectedImage.
50 * When the button is not disabled, if it's not selected it only shows the \e background image. The \e selected image is shown over the
51 * \e background image when the box is selected (\e background image is not replaced by \e selected image).
53 * When the button is disabled, \e background image and \e selected image are replaced by \e disabled images.
57 class DALI_IMPORT_API CheckBoxButton : public Button
62 * @brief Create an uninitialized CheckBoxButton; this can be initialized with CheckBoxButton::New().
63 * Calling member functions with an uninitialized Dali::Object is not allowed.
69 * @brief Copy constructor.
72 CheckBoxButton( const CheckBoxButton& checkBox );
75 * @brief Assignment operator.
78 CheckBoxButton& operator=( const CheckBoxButton& checkBox );
83 * This is non-virtual since derived Handle types must not contain data or virtual methods.
89 * @brief Create an initialized CheckBoxButton.
91 * @return A handle to a newly allocated Dali resource.
93 static CheckBoxButton New();
96 * @brief Downcast a handle to CheckBoxButton handle.
98 * If handle points to a CheckBoxButton the
99 * downcast produces valid handle. If not the returned handle is left uninitialized.
101 * @param[in] handle Handle to an object
102 * @return handle to a CheckBoxButton or an uninitialized handle
104 static CheckBoxButton DownCast( BaseHandle handle );
106 public: // Not intended for application developers
109 * @brief Creates a handle using the Toolkit::Internal implementation.
111 * @param[in] implementation The Control implementation.
113 DALI_INTERNAL CheckBoxButton( Internal::CheckBoxButton& implementation );
116 * @brief Allows the creation of this Control from an Internal::CustomActor pointer.
118 * @param[in] internal A pointer to the internal CustomActor.
120 DALI_INTERNAL CheckBoxButton( Dali::Internal::CustomActor* internal );
126 } // namespace Toolkit
130 #endif // __DALI_TOOLKIT_CHECK_BOX_BUTTON_H__