X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fpopup%2Fconfirmation-popup-impl.h;h=ecdfab9804c7e815e39bc67f8324ac53a6facb82;hp=4db8bd152e5c9ec06eae46236c31c6151e99b1f7;hb=9ddd5fea6278d06b8874988498c7c4c6508750ba;hpb=f2039d47f9bed8104575da80a2ecf0bb6e37ff8d diff --git a/dali-toolkit/internal/controls/popup/confirmation-popup-impl.h b/dali-toolkit/internal/controls/popup/confirmation-popup-impl.h index 4db8bd1..ecdfab9 100644 --- a/dali-toolkit/internal/controls/popup/confirmation-popup-impl.h +++ b/dali-toolkit/internal/controls/popup/confirmation-popup-impl.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_INTERNAL_CONFIRMATION_POPUP_H /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2021 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. @@ -19,23 +19,20 @@ */ // EXTERNAL INCLUDES +#include #include #include -#include // INTERNAL INCLUDES -#include "popup-impl.h" #include +#include "popup-impl.h" namespace Dali { - namespace Toolkit { - namespace Internal { - #define MAXIMUM_NUMBER_OF_CONTROLS 2 /** @@ -46,7 +43,6 @@ namespace Internal class ConfirmationPopup : public Dali::Toolkit::Internal::Popup { public: - /** * Create a new ConfirmationPopup. * @return A smart-pointer to the newly allocated ConfirmationPopup. @@ -54,7 +50,6 @@ public: static Dali::Toolkit::ConfirmationPopup New(); protected: - /** * Construct a new ConfirmationPopup. */ @@ -66,14 +61,13 @@ protected: virtual ~ConfirmationPopup(); public: - /** * Called when a property of an object of this type is set. * @param[in] object The object whose property is set. * @param[in] propertyIndex The property index. * @param[in] value The new property value. */ - static void SetProperty( BaseObject* object, Property::Index propertyIndex, const Property::Value& value ); + static void SetProperty(BaseObject* object, Property::Index propertyIndex, const Property::Value& value); /** * Called to retrieve a property of an object of this type. @@ -81,7 +75,7 @@ public: * @param[in] propertyIndex The property index. * @return The current value of the property. */ - static Property::Value GetProperty( BaseObject* object, Property::Index propertyIndex ); + static Property::Value GetProperty(BaseObject* object, Property::Index propertyIndex); /** * Connects a callback function with the object's signals. @@ -92,24 +86,22 @@ public: * @return True if the signal was connected. * @post If a signal was connected, ownership of functor was passed to CallbackBase. Otherwise the caller is responsible for deleting the unused functor. */ - static bool DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor ); + static bool DoConnectSignal(BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor); private: - /** * This type houses a list of dynamically created signals. */ - typedef std::vector< std::pair< std::string, SignalDelegate* > > SignalContainerType; + typedef std::vector > SignalContainerType; private: - /** * Sets the name of the signal to connect to within the specified actor. * * @param[in] controlNumber The index of the control. * @param[in] signalName The name of the signal to connect to. */ - void SetControlSignalName( const unsigned int controlNumber, const std::string& signalName ); + void SetControlSignalName(const unsigned int controlNumber, const std::string& signalName); /** * Gets the name of the signal to connect to within the specified actor. @@ -117,57 +109,52 @@ private: * @param[in] controlNumber The index of the control. * @return The name of the signal to connect to. */ - std::string GetControlSignalName( unsigned int controlNumber ) const; + std::string GetControlSignalName(unsigned int controlNumber) const; /** * @copydoc Control::GetControlSignal() */ - SignalDelegate* GetControlSignal( const std::string& signalName ); + SignalDelegate* GetControlSignal(const std::string& signalName); private: - // Undefined - ConfirmationPopup( const ConfirmationPopup& ); + ConfirmationPopup(const ConfirmationPopup&); // Undefined - ConfirmationPopup& operator=( const ConfirmationPopup& ); + ConfirmationPopup& operator=(const ConfirmationPopup&); private: - // Properties: - std::string mControlSignalNames[ MAXIMUM_NUMBER_OF_CONTROLS ]; ///< Stores the names of the signals to connect to per control. + std::string mControlSignalNames[MAXIMUM_NUMBER_OF_CONTROLS]; ///< Stores the names of the signals to connect to per control. // Internal variables: - SignalContainerType mControlSignals; ///< Stores the dynamically created signals. - + SignalContainerType mControlSignals; ///< Stores the dynamically created signals. }; } // namespace Internal - // Helpers for public-api forwarding methods -inline Toolkit::Internal::ConfirmationPopup& GetDerivedImplementation( Toolkit::ConfirmationPopup& popup ) +inline Toolkit::Internal::ConfirmationPopup& GetDerivedImplementation(Toolkit::ConfirmationPopup& popup) { - DALI_ASSERT_ALWAYS( popup ); + DALI_ASSERT_ALWAYS(popup); Dali::RefObject& handle = popup.GetImplementation(); - return static_cast( handle ); + return static_cast(handle); } -inline const Toolkit::Internal::ConfirmationPopup& GetDerivedImplementation( const Toolkit::ConfirmationPopup& popup ) +inline const Toolkit::Internal::ConfirmationPopup& GetDerivedImplementation(const Toolkit::ConfirmationPopup& popup) { - DALI_ASSERT_ALWAYS( popup ); + DALI_ASSERT_ALWAYS(popup); const Dali::RefObject& handle = popup.GetImplementation(); - return static_cast( handle ); + return static_cast(handle); } - } // namespace Toolkit } // namespace Dali