X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fvisuals%2Fwireframe%2Fwireframe-visual.h;h=9edeca8e256285f116052054fa592b0fb2c3f906;hb=ae40f5742410f8308e066fd926a88abfcf9d1c39;hp=b14452acb53db528c4ec6304c43f968b6b1e6545;hpb=1894ecb2c5bdcb91549d9da9d8301d0a753c5492;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 b14452a..9edeca8 100644 --- a/dali-toolkit/internal/visuals/wireframe/wireframe-visual.h +++ b/dali-toolkit/internal/visuals/wireframe/wireframe-visual.h @@ -18,6 +18,9 @@ * */ +// EXTERNAL INCLUDES +#include + // INTERNAL INCLUDES #include @@ -30,38 +33,100 @@ namespace Toolkit namespace Internal { +class WireframeVisual; +typedef IntrusivePtr< WireframeVisual > WireframeVisualPtr; + /** - * The visual which renders a wireframe outline to the control's quad. - * + * @brief Renders a wireframe outline to the control's quad. */ class WireframeVisual: public Visual::Base { 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, 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: + + /** * @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: +protected: // from Visual::Base /** - * @copydoc Visual::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::CreatePropertyMap + * @copydoc Visual::Base::CreatePropertyMap() */ virtual void DoCreatePropertyMap( Property::Map& map ) const; + /** + * @copydoc Visual::Base::CreateInstancePropertyMap + */ + virtual void DoCreateInstancePropertyMap( Property::Map& map ) const; + + /** + * @copydoc Visual::Base::DoSetProperties() + */ + virtual void DoSetProperties( const Property::Map& propertyMap ); + + /** + * @copydoc Visual::Base::DoSetOnStage + */ + virtual void DoSetOnStage( Actor& actor ); + + /** + * @copydoc Visual::Base::OnSetTransform + */ + virtual void OnSetTransform(); private: /** @@ -75,14 +140,16 @@ private: */ void InitializeRenderer(); -private: - // Undefined WireframeVisual( const WireframeVisual& visual); // Undefined WireframeVisual& operator=( const WireframeVisual& visual ); +private: + + Visual::BasePtr mActualVisual; + }; } // namespace Internal