#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.
// EXTERNAL INCLUDES
#include <dali/public-api/rendering/geometry.h>
+#include <dali/public-api/common/intrusive-ptr.h>
// INTERNAL INCLUDES
#include <dali-toolkit/internal/visuals/visual-base-impl.h>
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.
*
* | 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
*/
virtual ~BorderVisual();
-protected:
+ /**
+ * @copydoc Visual::Base::DoSetProperties
+ */
+ void DoSetProperties( const Property::Map& propertyMap ) override;
/**
- * @copydoc Visual::DoInitialize
+ * @copydoc Visual::Base::DoSetOnStage
*/
- virtual void DoInitialize( Actor& actor, const Property::Map& propertyMap );
+ void DoSetOnStage( Actor& actor ) override;
/**
- * @copydoc Visual::DoSetOnStage
+ * @copydoc Visual::Base::CreatePropertyMap
*/
- virtual void DoSetOnStage( Actor& actor );
+ void DoCreatePropertyMap( Property::Map& map ) const override;
/**
- * @copydoc Visual::CreatePropertyMap
+ * @copydoc Visual::Base::CreateInstancePropertyMap
*/
- virtual void DoCreatePropertyMap( Property::Map& map ) const;
+ void DoCreateInstancePropertyMap( Property::Map& map ) const override;
+
+ /**
+ * @copydoc Visual::Base::OnSetTransform
+ */
+ void OnSetTransform() override;
public:
*/
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 );