X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;ds=sidebyside;f=dali-toolkit%2Finternal%2Fvisuals%2Fimage%2Fbatch-image-visual.h;h=1f8119579d6d377ce47f449831b511bc10a23029;hb=6b6c1a325a1a66f17225e712f3b94054a771e7c8;hp=e5536e9ae150e7c6a8b738c9b8b0f13444e11978;hpb=d6fead18ff8cc7fca3feb1aa1789e47583796814;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/visuals/image/batch-image-visual.h b/dali-toolkit/internal/visuals/image/batch-image-visual.h index e5536e9..1f81195 100644 --- a/dali-toolkit/internal/visuals/image/batch-image-visual.h +++ b/dali-toolkit/internal/visuals/image/batch-image-visual.h @@ -18,13 +18,13 @@ * */ +// EXTERNAL INCLUDES +#include + // INTERNAL HEADER #include #include -// EXTERNAL INCLUDES -#include - namespace Dali { namespace Toolkit @@ -32,55 +32,53 @@ namespace Toolkit namespace Internal { +class BatchImageVisual; +typedef IntrusivePtr< BatchImageVisual > BatchImageVisualPtr; + class BatchImageVisual: public Visual::Base, public ConnectionTracker { public: /** - * @brief Constructor. + * @brief Create a new batch-image visual. * - * @param[in] factoryCache The VisualFactoryCache object - */ - BatchImageVisual( VisualFactoryCache& factoryCache ); - - /** - * @brief A reference counted object may only be deleted by calling Unreference(). + * @param[in] factoryCache A pointer pointing to the VisualFactoryCache object + * @param[in] url The URL of the image to use + * @param[in] properties A Property::Map containing settings for this visual + * @return A smart-pointer to the newly allocated visual. */ - ~BatchImageVisual(); + static BatchImageVisualPtr New( VisualFactoryCache& factoryCache, const std::string& url, const Property::Map& properties = Property::Map() ); public: // from Visual /** - * @copydoc Visual::Base::SetSize - */ - virtual void SetSize( const Vector2& size ); - - /** * @copydoc Visual::Base::GetNaturalSize */ - virtual void GetNaturalSize( Vector2& naturalSize ) const; + virtual void GetNaturalSize( Vector2& naturalSize ); /** * @copydoc Visual::Base::CreatePropertyMap */ virtual void DoCreatePropertyMap( Property::Map& map ) const; +protected: + /** - * @copydoc Visual::Base::DoSetProperty + * @brief Constructor. + * + * @param[in] factoryCache The VisualFactoryCache object */ - virtual void DoSetProperty( Dali::Property::Index index, const Dali::Property::Value& propertyValue ); + BatchImageVisual( VisualFactoryCache& factoryCache ); /** - * @copydoc Visual::Base::DoGetProperty + * @brief A reference counted object may only be deleted by calling Unreference(). */ - virtual Dali::Property::Value DoGetProperty( Dali::Property::Index index ); - -protected: + ~BatchImageVisual(); /** - * @copydoc Visua::Base::DoInitialize + * @copydoc Visua::Base::DoSetProperties */ - virtual void DoInitialize( Actor& actor, const Property::Map& propertyMap ); + virtual void DoSetProperties( const Property::Map& propertyMap ); /** * @copydoc Visual::Base::DoSetOnStage @@ -92,6 +90,11 @@ protected: */ virtual void DoSetOffStage( Actor& actor ); + /** + * @copydoc Visual::Base::OnSetTransform + */ + virtual void OnSetTransform(); + private: /** @@ -112,6 +115,13 @@ private: */ void CleanCache( const std::string& url ); + /** + * Helper method to set individual values by index key. + * @param[in] index The index key of the value + * @param[in] value The value + */ + void DoSetProperty( Property::Index index, const Property::Value& value ); + private: Vector4 mAtlasRect;