X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fvisuals%2Fborder%2Fborder-visual.h;h=aa7a69b5dcd6a3194abf559e3afad006a61f02c3;hb=593ab514474062b4d3de55682e63627a79b2eb5a;hp=8a442506c110ac786703c2cc71b74a419d40ee16;hpb=c3f9162ab11786380e2ec9c55f217c2daf7722e8;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/visuals/border/border-visual.h b/dali-toolkit/internal/visuals/border/border-visual.h index 8a44250..aa7a69b 100644 --- a/dali-toolkit/internal/visuals/border/border-visual.h +++ b/dali-toolkit/internal/visuals/border/border-visual.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_INTERNAL_BORDER_VISUAL_H /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 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. @@ -20,6 +20,7 @@ // EXTERNAL INCLUDES #include +#include // INTERNAL INCLUDES #include @@ -33,6 +34,9 @@ namespace Toolkit namespace Internal { +class BorderVisual; +typedef IntrusivePtr< BorderVisual > BorderVisualPtr; + /** * The visual which renders a solid color to the control's quad border fixed to a specified size. * @@ -44,12 +48,22 @@ namespace Internal * | borderSize | FLOAT | * | antiAliasing | BOOLEAN | */ - class BorderVisual : public Visual::Base { public: /** + * @brief Create a new border 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 BorderVisualPtr New( VisualFactoryCache& factoryCache, const Property::Map& properties ); + +protected: + + /** * @brief Constructor. * * @param[in] factoryCache A pointer pointing to the VisualFactoryCache object @@ -61,42 +75,30 @@ public: */ virtual ~BorderVisual(); -protected: - /** - * @copydoc Visual::Base::DoInitialize + * @copydoc Visual::Base::DoSetProperties */ - virtual void DoInitialize( Actor& actor, const Property::Map& propertyMap ); + void DoSetProperties( const Property::Map& propertyMap ) override; /** - * @copydoc Visual::Base::DoSetOnStage + * @copydoc Visual::Base::DoSetOnScene */ - virtual void DoSetOnStage( Actor& actor ); + void DoSetOnScene( Actor& actor ) override; /** * @copydoc Visual::Base::CreatePropertyMap */ - virtual void DoCreatePropertyMap( Property::Map& map ) const; - -public: + void DoCreatePropertyMap( Property::Map& map ) const override; /** - * Set the color of the border. - * @param[in] color The border color. + * @copydoc Visual::Base::CreateInstancePropertyMap */ - void SetBorderColor( const Vector4& color); + void DoCreateInstancePropertyMap( Property::Map& map ) const override; /** - * Set the size of the border. - * @param[in] size The border size. + * @copydoc Visual::Base::OnSetTransform */ - void SetBorderSize( float size ); - - /** - * Enable/Disable the anti-aliasing. - * @param[in] enable Whether the anti-aliasing be enabled or not. - */ - void RequireAntiAliasing( bool antiAliasing ); + void OnSetTransform() override; private: @@ -117,6 +119,13 @@ private: */ Geometry CreateBorderGeometry(); + /** + * 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 ); + // Undefined BorderVisual( const BorderVisual& borderRenderer );