X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Fdevel-api%2Fcontrols%2Fcontrol-wrapper-impl.h;h=6bd10262ec8a83d75ff2a277814f2e7be0d162ba;hp=85bc26ce1c99c2c089e9c0553ab3bbdc0c441d87;hb=1d82abb8a1a514ce0af63004706135fb7883f89b;hpb=30b39930a88d3d44cfea9a969c742d662666b149 diff --git a/dali-toolkit/devel-api/controls/control-wrapper-impl.h b/dali-toolkit/devel-api/controls/control-wrapper-impl.h old mode 100755 new mode 100644 index 85bc26c..6bd1026 --- a/dali-toolkit/devel-api/controls/control-wrapper-impl.h +++ b/dali-toolkit/devel-api/controls/control-wrapper-impl.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_INTERNAL_CONTROL_WRAPPER_H /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 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,15 +19,13 @@ */ // INTERNAL INCLUDES -#include #include +#include namespace Dali { - namespace Toolkit { - class TransitionData; namespace Visual @@ -37,18 +35,16 @@ class Base; namespace Internal { - class ControlWrapper; -typedef IntrusivePtr< ControlWrapper > ControlWrapperPtr; +typedef IntrusivePtr ControlWrapperPtr; /** * @copydoc Toolkit::ControlWrapper */ -class DALI_IMPORT_API ControlWrapper : public Control +class DALI_TOOLKIT_API ControlWrapper : public Control { public: - // Flags for the constructor enum CustomControlBehaviour { @@ -60,14 +56,14 @@ public: LAST_CONTROL_BEHAVIOUR_FLAG }; - static const int CONTROL_BEHAVIOUR_FLAG_COUNT = Log< LAST_CONTROL_BEHAVIOUR_FLAG - 1 >::value + 1; ///< Total count of flags + static const int CONTROL_BEHAVIOUR_FLAG_COUNT = Log::value + 1; ///< Total count of flags /** * @brief Control constructor * * @param[in] behaviourFlags Behavioural flags from CustomControlBehaviour enum */ - ControlWrapper( CustomControlBehaviour behaviourFlags ); + ControlWrapper(CustomControlBehaviour behaviourFlags); /** * Create a new ControlWrapper. @@ -77,10 +73,9 @@ public: * * @return A public handle to the newly allocated ControlWrapper. */ - static Dali::Toolkit::ControlWrapper New( const std::string& typeName, ControlWrapper* controlWrapper ); + static Dali::Toolkit::ControlWrapper New(const std::string& typeName, ControlWrapper* controlWrapper); public: // From CustomActorImpl - // Size negotiation helpers /** @@ -91,64 +86,73 @@ public: // From CustomActorImpl /** * @copydoc Dali::CustomActorImpl::GetHeightForWidthBase() */ - float GetHeightForWidthBase( float width ); + float GetHeightForWidthBase(float width); /** * @copydoc Dali::CustomActorImpl::GetWidthForHeightBase() */ - float GetWidthForHeightBase( float height ); + float GetWidthForHeightBase(float height); /** * @copydoc Dali::CustomActorImpl::CalculateChildSizeBase() */ - float CalculateChildSizeBase( const Dali::Actor& child, Dimension::Type dimension ); + float CalculateChildSizeBase(const Dali::Actor& child, Dimension::Type dimension); /** * @copydoc Dali::CustomActorImpl::RelayoutDependentOnChildrenBase() */ - bool RelayoutDependentOnChildrenBase( Dimension::Type dimension = Dimension::ALL_DIMENSIONS ); + bool RelayoutDependentOnChildrenBase(Dimension::Type dimension = Dimension::ALL_DIMENSIONS); public: // From Control + /** + * @ref Dali::Toolkit::DevelControl::RegisterVisual() + */ + void RegisterVisual(Property::Index index, Toolkit::Visual::Base& visual); /** * @ref Dali::Toolkit::DevelControl::RegisterVisual() */ - void RegisterVisual( Property::Index index, Toolkit::Visual::Base& visual ); + void RegisterVisual(Property::Index index, Toolkit::Visual::Base& visual, int depthIndex); /** * @ref Dali::Toolkit::DevelControl::RegisterVisual() */ - void RegisterVisual( Property::Index index, Toolkit::Visual::Base& visual, bool enabled ); + void RegisterVisual(Property::Index index, Toolkit::Visual::Base& visual, bool enabled); + + /** + * @ref Dali::Toolkit::DevelControl::RegisterVisual() + */ + void RegisterVisual(Property::Index index, Toolkit::Visual::Base& visual, bool enabled, int depthIndex); /** * @ref Dali::Toolkit::DevelControl::UnregisterVisual() */ - void UnregisterVisual( Property::Index index ); + void UnregisterVisual(Property::Index index); /** * @ref Dali::Toolkit::DevelControl::GetVisual() */ - Toolkit::Visual::Base GetVisual( Property::Index index ) const; + Toolkit::Visual::Base GetVisual(Property::Index index) const; /** * @ref Dali::Toolkit::DevelControl::EnableVisual() */ - void EnableVisual( Property::Index index, bool enable ); + void EnableVisual(Property::Index index, bool enable); /** * @ref Dali::Toolkit::DevelControl::IsVisualEnabled() */ - bool IsVisualEnabled( Property::Index index ) const; + bool IsVisualEnabled(Property::Index index) const; /** * @ref Dali::Toolkit::DevelControl::CreateTransition() */ - Dali::Animation CreateTransition( const Toolkit::TransitionData& transitionData ); + Dali::Animation CreateTransition(const Toolkit::TransitionData& transitionData); /** * @copydoc Dali::Toolkit::Internal::Control::EmitKeyInputFocusSignal() */ - void EmitKeyInputFocusSignal( bool focusGained ); + void EmitKeyInputFocusSignal(bool focusGained); /** * @brief Apply the current style @@ -158,8 +162,14 @@ public: // From Control */ void ApplyThemeStyle(); -protected: +public: + /** + * Enable access to non-native type info from native side + * @return The type info that was registered on this type + */ + Dali::TypeInfo GetTypeInfo(); +protected: /** * Protected Destructor * A reference counted object may only be deleted by calling Unreference() @@ -167,13 +177,12 @@ protected: virtual ~ControlWrapper(); private: - /// @cond internal /// Undefined. - DALI_INTERNAL ControlWrapper( const ControlWrapper& ); + DALI_INTERNAL ControlWrapper(const ControlWrapper&); /// Undefined. - DALI_INTERNAL ControlWrapper& operator=( const ControlWrapper& rhs ); + DALI_INTERNAL ControlWrapper& operator=(const ControlWrapper& rhs); /// @endcond }; @@ -181,22 +190,22 @@ private: // Helpers for public-api forwarding methods -inline Toolkit::Internal::ControlWrapper& GetControlWrapperImpl( Toolkit::ControlWrapper& publicObject ) +inline Toolkit::Internal::ControlWrapper& GetControlWrapperImpl(Toolkit::ControlWrapper& publicObject) { - DALI_ASSERT_ALWAYS( publicObject ); + DALI_ASSERT_ALWAYS(publicObject); Dali::RefObject& handle = publicObject.GetImplementation(); - return static_cast( handle ); + return static_cast(handle); } -inline const Toolkit::Internal::ControlWrapper& GetControlWrapperImpl( const Toolkit::ControlWrapper& publicObject ) +inline const Toolkit::Internal::ControlWrapper& GetControlWrapperImpl(const Toolkit::ControlWrapper& publicObject) { - DALI_ASSERT_ALWAYS( publicObject ); + DALI_ASSERT_ALWAYS(publicObject); const Dali::RefObject& handle = publicObject.GetImplementation(); - return static_cast( handle ); + return static_cast(handle); } } // namespace Toolkit