X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Fpublic-api%2Fcontrols%2Fbuttons%2Fpush-button.h;h=fdcc65745e22c9ad0cdba771b2ff21494b176bdf;hp=603601d6a8d9d1ee67a95dfa6f8735ea6f0735cb;hb=4e284359dc32cfcb20c49068406fb341afed833b;hpb=938ea2d2a1a42930cf12c743d839aded892949ea diff --git a/dali-toolkit/public-api/controls/buttons/push-button.h b/dali-toolkit/public-api/controls/buttons/push-button.h index 603601d..fdcc657 100644 --- a/dali-toolkit/public-api/controls/buttons/push-button.h +++ b/dali-toolkit/public-api/controls/buttons/push-button.h @@ -1,8 +1,8 @@ -#ifndef __DALI_TOOLKIT_PUSH_BUTTON_H__ -#define __DALI_TOOLKIT_PUSH_BUTTON_H__ +#ifndef DALI_TOOLKIT_PUSH_BUTTON_H +#define DALI_TOOLKIT_PUSH_BUTTON_H /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 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. @@ -43,7 +43,7 @@ class PushButton; /** * @brief A PushButton changes its appearance when is pressed and returns to its original when is released. * - * By default a PushButton emits a Button::PressedSignal() signal when the button is pressed, a Button::ClickedSignal() signal when it's clicked + * By default, a PushButton emits a Button::PressedSignal() signal when the button is pressed, a Button::ClickedSignal() signal when it's clicked. * and a Button::ReleasedSignal() signal when it's released or having pressed it, the touch point leaves the boundary of the button. * * Usage example: - @@ -54,7 +54,7 @@ class PushButton; * { * PushButton button = PushButton::New(); * button.SetParentOrigin( ParentOrigin::CENTER ); - * button.SetLabelText( "Press" ); + * button.SetProperty( Button::Property::LABEL, "Press" ); * Stage::GetCurrent().Add( button ); * * // Connect to button signals emitted by the button @@ -82,15 +82,15 @@ class PushButton; * } * @endcode * - * See Button for more detail on signals and modifying appearance via properties. + * See Button for more details on signals and modifying appearance via properties. * @SINCE_1_0.0 */ -class DALI_IMPORT_API PushButton : public Button +class DALI_TOOLKIT_API PushButton : public Button { public: /** - * @brief The start and end property ranges for this control. + * @brief Enumeration for the start and end property ranges for this control. * @SINCE_1_0.0 */ enum PropertyRange @@ -100,16 +100,20 @@ public: }; /** - * @brief An enumeration of properties belonging to the PushButton class. + * @brief Enumeration for the instance of properties belonging to the PushButton class. * @SINCE_1_0.0 */ struct Property { + /** + * @brief Enumeration for the instance of properties belonging to the PushButton class. + * @SINCE_1_0.0 + */ enum { - UNSELECTED_ICON = PROPERTY_START_INDEX, ///< Property, name "unselectedIcon", type std::string @SINCE_1_0.0 - SELECTED_ICON, ///< Property, name "selectedIcon", type std::string @SINCE_1_0.0 - ICON_ALIGNMENT, ///< Property, name "iconAlignment", type std::string @SINCE_1_0.0 + UNSELECTED_ICON = PROPERTY_START_INDEX, ///< Property, name "unselectedIcon", type std::string @SINCE_1_0.0 @DEPRECATED_1_2.XX Button::Property::UNSELECTED_VISUAL + SELECTED_ICON, ///< Property, name "selectedIcon", type std::string @SINCE_1_0.0 @DEPRECATED_1_2.XX Button::Property::SELECTED_VISUAL + ICON_ALIGNMENT, ///< Property, name "iconAlignment", type std::string @SINCE_1_0.0 @DEPRECATED_1_2.XX Use Button::Property::LABEL_RELATIVE_ALIGNMENT LABEL_PADDING, ///< Property, name "labelPadding", type Vector4 @SINCE_1_0.0 ICON_PADDING, ///< Property, name "iconPadding", type Vector4 @SINCE_1_0.0 }; @@ -118,7 +122,7 @@ public: public: /** - * @brief Create an uninitialized PushButton; this can be initialized with PushButton::New(). + * @brief Creates an uninitialized PushButton; this can be initialized with PushButton::New(). * * Calling member functions with an uninitialized Dali::Object is not allowed. * @SINCE_1_0.0 @@ -128,17 +132,20 @@ public: /** * @brief Copy constructor. * @SINCE_1_0.0 + * @param[in] pushButton Handle to an object */ PushButton( const PushButton& pushButton ); /** * @brief Assignment operator. * @SINCE_1_0.0 + * @param[in] pushButton Handle to an object + * @return A reference to this */ PushButton& operator=( const PushButton& pushButton ); /** - * @brief Destructor + * @brief Destructor. * * This is non-virtual since derived Handle types must not contain data or virtual methods. * @SINCE_1_0.0 @@ -146,18 +153,18 @@ public: ~PushButton(); /** - * @brief Create an initialized PushButton. + * @brief Creates an initialized PushButton. * * @SINCE_1_0.0 - * @return A handle to a newly allocated Dali resource. + * @return A handle to a newly allocated Dali resource */ static PushButton New(); /** - * @brief Downcast a handle to PushButton handle. + * @brief Downcasts a handle to PushButton handle. * - * If handle points to a PushButton the downcast produces valid - * handle. If not the returned handle is left uninitialized. + * If handle points to a PushButton, the downcast produces valid handle. + * If not, the returned handle is left uninitialized. * * @SINCE_1_0.0 * @param[in] handle Handle to an object @@ -165,94 +172,6 @@ public: */ static PushButton DownCast( BaseHandle handle ); - - // Deprecated API - - using Button::SetButtonImage; - - /** - * @DEPRECATED_1_0.50. Instead, use Button::SetUnselectedImage. - * - * @brief Sets the unselected image with an Actor. - * - * @SINCE_1_0.0 - * @param[in] image The Actor to use. - */ - void SetButtonImage( Actor image ); - - using Button::SetBackgroundImage; - - /** - * @DEPRECATED_1_0.50. Instead, use Button::SetBackgroundImage. - * - * @brief Sets the background image with an Actor. - * - * @SINCE_1_0.0 - * @param[in] image The Actor to use. - */ - void SetBackgroundImage( Actor image ); - - using Button::SetSelectedImage; - - /** - * @DEPRECATED_1_0.50. Instead, use Button::SetSelectedImage( const std::string& filename ). - * - * @brief Sets the selected image with an Actor. - * - * @SINCE_1_0.0 - * @param[in] image The Actor to use. - */ - void SetSelectedImage( Actor image ); - - using Button::SetSelectedBackgroundImage; - - /** - * @DEPRECATED_1_0.50. Instead, use Button::SetSelectedBackgroundImage. - * - * @brief Sets the selected background image with an Actor. - * - * @SINCE_1_0.0 - * @param[in] image The Actor to use. - */ - void SetSelectedBackgroundImage( Actor image ); - - using Button::SetDisabledBackgroundImage; - - /** - * @DEPRECATED_1_0.50. Instead, use Button::SetDisabledBackgroundImage. - * - * @brief Sets the disabled background image with an Actor. - * - * @SINCE_1_0.0 - * @param[in] image The Actor to use. - */ - void SetDisabledBackgroundImage( Actor image ); - - using Button::SetDisabledImage; - - /** - * @DEPRECATED_1_0.50. Instead, use Button::SetDisabledImage. - * - * @brief Sets the disabled image with an Actor. - * - * @SINCE_1_0.0 - * @param[in] image The Actor to use. - */ - void SetDisabledImage( Actor image ); - - using Button::SetDisabledSelectedImage; - - /** - * @DEPRECATED_1_0.50. Instead, use Button::SetDisabledSelectedImage. - * - * @brief Sets the disabled selected image with an Actor. - * - * @SINCE_1_0.0 - * @param[in] image The Actor to use. - */ - void SetDisabledSelectedImage( Actor image ); - - public: // Not intended for application developers /// @cond internal @@ -260,7 +179,7 @@ public: // Not intended for application developers * @brief Creates a handle using the Toolkit::Internal implementation. * * @SINCE_1_0.0 - * @param[in] implementation The Control implementation. + * @param[in] implementation The Control implementation */ DALI_INTERNAL PushButton( Internal::PushButton& implementation ); @@ -268,7 +187,7 @@ public: // Not intended for application developers * @brief Allows the creation of this Control from an Internal::CustomActor pointer. * * @SINCE_1_0.0 - * @param[in] internal A pointer to the internal CustomActor. + * @param[in] internal A pointer to the internal CustomActor */ DALI_INTERNAL PushButton( Dali::Internal::CustomActor* internal ); /// @endcond @@ -281,4 +200,4 @@ public: // Not intended for application developers } // namespace Dali -#endif // __DALI_TOOLKIT_PUSH_BUTTON_H__ +#endif // DALI_TOOLKIT_PUSH_BUTTON_H