X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fvisuals%2Fvisual-base-impl.h;h=cb0c7be01f9fccd4708bf1cae2d79a75f2db5b6f;hb=d0b03f52573948c53cdca89ec5e3be201737c3bb;hp=3334842684e354779b3ad0dccd7744137e7b8595;hpb=07bdc775bf08ac2f53c8f6a3a8856077a299959b;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/visuals/visual-base-impl.h b/dali-toolkit/internal/visuals/visual-base-impl.h index 3334842..cb0c7be 100644 --- a/dali-toolkit/internal/visuals/visual-base-impl.h +++ b/dali-toolkit/internal/visuals/visual-base-impl.h @@ -19,6 +19,7 @@ */ // EXTERNAL INCLUDES +#include #include #include #include @@ -65,24 +66,25 @@ class Base : public BaseObject public: /** - * Initialisation of the visual, this API should only called by the VisualFactory: - * request the geometry and shader from the cache, if not available, create and save to the cache for sharing; - * record the property values. - * - * @param[in] actor The Actor the visual is applied to if, empty if the visual has not been applied to any Actor + * Setting the properties of the visual, this API should only called by the VisualFactory * @param[in] propertyMap The properties for the requested Visual object. */ - void Initialize( Actor& actor, const Property::Map& propertyMap ); + void SetProperties( const Property::Map& propertyMap ); /** - * @copydoc Toolkit::Visual::Base::SetSize + * @copydoc Toolkit::Visual::Base::SetName + */ + void SetName( const std::string& name ); + + /** + * @copydoc Toolkit::Visual::Base::GetName */ - virtual void SetSize( const Vector2& size ); + const std::string& GetName(); /** - * @copydoc Toolkit::Visual::Base::GetSize + * @copydoc Toolkit::Visual::Base::SetSize */ - const Vector2& GetSize() const; + void SetTransformAndSize( const Property::Map& transform, Size controlSize ); /** * @copydoc Toolkit::Visual::Base::GetHeightForWidth @@ -92,7 +94,7 @@ public: /** * @copydoc Toolkit::Visual::Base::GetNaturalSize */ - virtual void GetNaturalSize( Vector2& naturalSize ) const; + virtual void GetNaturalSize( Vector2& naturalSize ); /** * @copydoc Toolkit::Visual::Base::SetDepthIndex @@ -173,12 +175,17 @@ protected: virtual void DoCreatePropertyMap( Property::Map& map ) const = 0; /** - * @brief Called by Initialize() allowing sub classes to respond to the Initialize event + * @brief Called by SetProperties() allowing sub classes to set their properties * - * @param[in] actor The Actor the visual is applied to if, empty if the visual has not been applied to any Actor * @param[in] propertyMap The properties for the requested Visual object. */ - virtual void DoInitialize( Actor& actor, const Property::Map& propertyMap ) {} + virtual void DoSetProperties( const Property::Map& propertyMap ) = 0; + + /** + * @brief Called when transform or control size changes + * ( Of use to SVG and Text visuals ) + */ + virtual void OnSetTransform() = 0; protected: @@ -246,6 +253,8 @@ protected: VisualFactoryCache& mFactoryCache; }; +typedef IntrusivePtr BasePtr; + } // namspace Visual } // namespace Internal