X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fvisuals%2Fwireframe%2Fwireframe-visual.h;h=d63cfa8cf2055abe24f833d2fe1bb59050474d71;hb=cdac11c27bab99068abd2ecabb1c54645b2f90a9;hp=c4ff5c4e367cc4308b7b1da8f70ca1f7d18ffd91;hpb=f4c1e7f52d49c3ce033b9ee4c3c7414b06a22d45;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/visuals/wireframe/wireframe-visual.h b/dali-toolkit/internal/visuals/wireframe/wireframe-visual.h index c4ff5c4..d63cfa8 100644 --- a/dali-toolkit/internal/visuals/wireframe/wireframe-visual.h +++ b/dali-toolkit/internal/visuals/wireframe/wireframe-visual.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_INTERNAL_WIREFRAME_VISUAL_H /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2018 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. @@ -47,9 +47,34 @@ public: * @brief Create a new wireframe visual. * * @param[in] factoryCache A pointer pointing to the VisualFactoryCache object + * @param[in] properties A Property::Map containing settings for this visual * @return A smart-pointer to the newly allocated visual. */ - static WireframeVisualPtr New( VisualFactoryCache& factoryCache ); + static WireframeVisualPtr New( VisualFactoryCache& factoryCache, const Property::Map& properties ); + + /** + * @brief Create a new wireframe visual with an encapsulated actual visual. + * + * For debugging purpose, the rendering of the encapsulated visual is replaced with wireframe + * + * @param[in] factoryCache A pointer pointing to the VisualFactoryCache object + * @param[in] actualVisual The encapsulated actual visual. + * @return A smart-pointer to the newly allocated visual. + */ + static WireframeVisualPtr New( VisualFactoryCache& factoryCache, Visual::BasePtr actualVisual ); + + /** + * @brief Create a new wireframe visual with an encapsulated actual visual. + * + * For debugging purpose, the rendering of the encapsulated visual is replaced with wireframe + * + * @param[in] factoryCache A pointer pointing to the VisualFactoryCache object + * @param[in] actualVisual The encapsulated actual visual. + * @param[in] properties A Property::Map containing settings for this visual + * @return A smart-pointer to the newly allocated visual. + */ + static WireframeVisualPtr New( VisualFactoryCache& factoryCache, Visual::BasePtr actualVisual, const Property::Map& properties ); + protected: @@ -57,33 +82,58 @@ protected: * @brief Constructor. * * @param[in] factoryCache A pointer pointing to the VisualFactoryCache object + * @param[in] actualVisual The encapsulated actual visual. */ - WireframeVisual( VisualFactoryCache& factoryCache ); + WireframeVisual( VisualFactoryCache& factoryCache, Visual::BasePtr actualVisual ); /** * @brief A reference counted object may only be deleted by calling Unreference(). */ virtual ~WireframeVisual(); +protected: // from Visual::Base + /** - * @copydoc Visual::Base::DoSetOnStage + * @copydoc Visual::Base::GetHeightForWidth() */ - virtual void DoSetOnStage( Actor& actor ); + virtual float GetHeightForWidth( float width ); + + /** + * @copydoc Visual::Base::GetNaturalSize() + */ + virtual void GetNaturalSize( Vector2& naturalSize ); /** - * @copydoc Visual::Base::CreatePropertyMap + * @copydoc Visual::Base::CreatePropertyMap() */ virtual void DoCreatePropertyMap( Property::Map& map ) const; /** - * @copydoc Visual::Base::DoSetProperty + * @copydoc Visual::Base::CreateInstancePropertyMap + */ + virtual void DoCreateInstancePropertyMap( Property::Map& map ) const; + + /** + * @copydoc Visual::Base::DoSetProperties() */ - virtual void DoSetProperty( Dali::Property::Index index, const Dali::Property::Value& propertyValue ); + virtual void DoSetProperties( const Property::Map& propertyMap ); + + /** + * @copydoc Visual::Base::DoSetOnStage + */ + virtual void DoSetOnStage( Actor& actor ); /** - * @copydoc Visual::Base::DoGetProperty + * @copydoc Visual::Base::OnSetTransform */ - virtual Dali::Property::Value DoGetProperty( Dali::Property::Index index ); + virtual void OnSetTransform(); + + /** + * @copydoc Visual::Base::GetVisualObject + * + * Overriding as this visual can sometimes act as a proxy to the actual visual, i.e. when using debug rendering. + */ + virtual Base& GetVisualObject() override; private: /** @@ -97,14 +147,16 @@ private: */ void InitializeRenderer(); -private: - // Undefined WireframeVisual( const WireframeVisual& visual); // Undefined WireframeVisual& operator=( const WireframeVisual& visual ); +private: + + Visual::BasePtr mActualVisual; + }; } // namespace Internal