X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Fpublic-api%2Fcontrols%2Fbuttons%2Fcheck-box-button.h;h=975221305fb7b7a69183f02386420b60e5d26ea1;hb=refs%2Fchanges%2F99%2F38499%2F2;hp=1a4267d8fbc1d1ef8a17f2ad2d9e3cf301a39b4e;hpb=e2eda444afbe82e9591fe198eef339227f90a616;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/public-api/controls/buttons/check-box-button.h b/dali-toolkit/public-api/controls/buttons/check-box-button.h index 1a4267d..9752213 100644 --- a/dali-toolkit/public-api/controls/buttons/check-box-button.h +++ b/dali-toolkit/public-api/controls/buttons/check-box-button.h @@ -1,26 +1,27 @@ #ifndef __DALI_TOOLKIT_CHECK_BOX_BUTTON_H__ #define __DALI_TOOLKIT_CHECK_BOX_BUTTON_H__ -// -// Copyright (c) 2014 Samsung Electronics Co., Ltd. -// -// Licensed under the Flora License, Version 1.0 (the License); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://floralicense.org/license/ -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an AS IS BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// +/* + * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // INTERNAL INCLUDES #include -namespace Dali DALI_IMPORT_API +namespace Dali { namespace Toolkit @@ -36,30 +37,22 @@ class CheckBoxButton; /** * CheckBoxButton provides a check box button which user can check or uncheck. * - * By default a CheckBoxButton emits a Button::ClickedSignal() signal when the button changes its state to checked or unchecked. + * By default a CheckBoxButton emits a Button::ClickedSignal() signal when the button changes its state to selected or unselected. * * The button's appearance could be modified by setting images or actors with CheckBoxButton::SetBackgroundImage, - * CheckBoxButton::SetCheckedImage, CheckBoxButton::SetDimmedBackgroundImage and CheckBoxButton::SetDimmedCheckedImage. + * CheckBoxButton::SetSelectedImage, CheckBoxButton::SetDisabledBackgroundImage and CheckBoxButton::SetDisabledSelectedImage. * - * When the button is not dimmed, if it's not checked it only shows the \e background image. The \e checked image is shown over the - * \e background image when the box is checked (\e background image is not replaced by \e checked image). + * 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 + * \e background image when the box is selected (\e background image is not replaced by \e selected image). * - * When the button is dimmed, \e background image and \e checked image are replaced by \e dimmed images. + * When the button is disabled, \e background image and \e selected image are replaced by \e disabled images. * * CheckBoxButton doesn't have a text. However, a Dali::Toolkit::TableView with a Dali::TextActor or a Dali::Toolkit::TextView * and a CheckBoxButton could be used instead. */ -class CheckBoxButton : public Button +class DALI_IMPORT_API CheckBoxButton : public Button { public: - //Action Names - static const char* const ACTION_CHECK_BOX_BUTTON_CLICK; - - // Properties - static const std::string USE_FADE_ANIMATION_PROPERTY_NAME; - static const std::string USE_CHECK_ANIMATION_PROPERTY_NAME; - -public: /** * Create an uninitialized CheckBoxButton; this can be initialized with CheckBoxButton::New() @@ -78,10 +71,11 @@ public: CheckBoxButton& operator=( const CheckBoxButton& checkBox ); /** - * Virtual destructor. - * Dali::Object derived classes typically do not contain member data. + * @brief Destructor + * + * This is non-virtual since derived Handle types must not contain data or virtual methods. */ - virtual ~CheckBoxButton(); + ~CheckBoxButton(); /** * Create an initialized CheckBoxButton. @@ -98,21 +92,6 @@ public: static CheckBoxButton DownCast( BaseHandle handle ); /** - * Sets the button as checked or unchecked. - * - * Emits a Button::ClickedSignal() signal if the checkbox is not dimmed and the new state, - * given in the \e checked param, is different than the previous one. - * - * @param[in] checked state. - */ - void SetChecked( bool checked ); - - /** - * @return \e true if the button is checked. - */ - bool IsChecked() const; - - /** * Sets the background image. * * @param[in] image The background image. @@ -131,58 +110,58 @@ public: Actor GetBackgroundImage() const; /** - * Sets the checked image. + * Sets the selected image. * - * @param[in] image The checked image. + * @param[in] image The selected image. */ - void SetCheckedImage( Image image ); + void SetSelectedImage( Image image ); /** - * @copydoc SetCheckedImage( Image image ) + * @copydoc SetSelectedImage( Image image ) */ - void SetCheckedImage( Actor image ); + void SetSelectedImage( Actor image ); /** - * Gets the checked image. - * @return An actor with the checked image. + * Gets the selected image. + * @return An actor with the selected image. */ - Actor GetCheckedImage() const; + Actor GetSelectedImage() const; /** - * Sets the dimmed background image. + * Sets the disabled background image. * - * @param[in] image The dimmed background image. + * @param[in] image The disabled background image. */ - void SetDimmedBackgroundImage( Image image ); + void SetDisabledBackgroundImage( Image image ); /** - * @copydoc SetDimmedBackgroundImage( Image image ) + * @copydoc SetDisabledBackgroundImage( Image image ) */ - void SetDimmedBackgroundImage( Actor image ); + void SetDisabledBackgroundImage( Actor image ); /** - * Gets the dimmed background image. - * @return An actor with the dimmed background image. + * Gets the disabled background image. + * @return An actor with the disabled background image. */ - Actor GetDimmedBackgroundImage() const; + Actor GetDisabledBackgroundImage() const; /** - * Sets the dimmed checked image. + * Sets the disabled selected image. * - * @param[in] image The dimmed checked image. + * @param[in] image The disabled selected image. */ - void SetDimmedCheckedImage( Image image ); + void SetDisabledSelectedImage( Image image ); /** - * @copydoc SetDimmedCheckedImage( Image image ) + * @copydoc SetDisabledSelectedImage( Image image ) */ - void SetDimmedCheckedImage( Actor image ); + void SetDisabledSelectedImage( Actor image ); /** - * Gets the dimmed checked image. - * @return An actor with the dimmed checked image. + * Gets the disabled selected image. + * @return An actor with the disabled selected image. */ - Actor GetDimmedCheckedImage() const; + Actor GetDisabledSelectedImage() const; public: // Not intended for application developers @@ -190,13 +169,13 @@ public: // Not intended for application developers * Creates a handle using the Toolkit::Internal implementation. * @param[in] implementation The Control implementation. */ - CheckBoxButton( Internal::CheckBoxButton& implementation ); + DALI_INTERNAL CheckBoxButton( Internal::CheckBoxButton& implementation ); /** * Allows the creation of this Control from an Internal::CustomActor pointer. * @param[in] internal A pointer to the internal CustomActor. */ - CheckBoxButton( Dali::Internal::CustomActor* internal ); + DALI_INTERNAL CheckBoxButton( Dali::Internal::CustomActor* internal ); }; } // namespace Toolkit