#include <dali/public-api/images/image-operations.h>
#include <dali/public-api/object/property-map.h>
-// INTERNAK INCLUDES
-#include <dali-toolkit/devel-api/controls/renderer-factory/control-renderer.h>
+// INTERNAL INCLUDES
+#include <dali-toolkit/devel-api/controls/visual-factory/visual.h>
namespace Dali
{
namespace Internal DALI_INTERNAL
{
-class RendererFactory;
+class VisualFactory;
}
/**
- * @brief RendererFactory is a singleton object that provides and shares renderers for controls
+ * @brief VisualFactory is a singleton object that provides and shares renderers for controls
*
* By setting environment variable 'DALI_DEBUG_RENDERING', all concrete renderer is replaced with the debug renderer which renders a quad wireframe.
*
* |--------------------------|------------------|
* | rendererType | STRING |
*/
-class DALI_IMPORT_API RendererFactory : public BaseHandle
+class DALI_IMPORT_API VisualFactory : public BaseHandle
{
public:
/**
- * @brief Create or retrieve RendererFactory singleton.
+ * @brief Create or retrieve VisualFactory singleton.
*
- * @return A handle to the RendererFactory control.
+ * @return A handle to the VisualFactory control.
*/
- static RendererFactory Get();
+ static VisualFactory Get();
/**
- * @brief Create a RendererFactory handle.
+ * @brief Create a VisualFactory handle.
*
* Calling member functions with an uninitialised handle is not allowed.
*/
- RendererFactory();
+ VisualFactory();
/**
* @brief Destructor
*
* This is non-virtual since derived Handle types must not contain data or virtual methods.
*/
- ~RendererFactory();
+ ~VisualFactory();
/**
* @brief This copy constructor is required for (smart) pointer semantics.
*
* @param[in] handle A reference to the copied handle.
*/
- RendererFactory( const RendererFactory& handle );
+ VisualFactory( const VisualFactory& handle );
/**
* @brief This assignment operator is required for (smart) pointer semantics.
* @param [in] handle A reference to the copied handle.
* @return A reference to this.
*/
- RendererFactory& operator=( const RendererFactory& handle );
+ VisualFactory& operator=( const VisualFactory& handle );
/**
* @brief Request the control renderer
* Depends on the content of the map, different kind of renderer would be returned.
* @return The pointer pointing to control renderer
*/
- ControlRenderer CreateControlRenderer( const Property::Map& propertyMap );
+ Visual CreateVisual( const Property::Map& propertyMap );
/**
* @brief Request the control renderer to render the image.
* @param[in] image The image to be rendered.
* @return The pointer pointing to the control renderer
*/
- ControlRenderer CreateControlRenderer( const Image& image );
+ Visual CreateVisual( const Image& image );
/**
* @brief Request the control renderer to render the given resource at the url.
* @param[in] size The width and height to fit the loaded image to.
* @return The pointer pointing to the control renderer
*/
- ControlRenderer CreateControlRenderer( const std::string& url, ImageDimensions size );
+ Visual CreateVisual( const std::string& url, ImageDimensions size );
private:
- explicit DALI_INTERNAL RendererFactory(Internal::RendererFactory *impl);
+ explicit DALI_INTERNAL VisualFactory(Internal::VisualFactory *impl);
};
/**
* @brief Template to allow discard old renderer, get new one and set it on stage if possible
*
- * @tparam ParameterType0 The type of first argument passed to the CreateControlRenderer()
- * @tparam ParameterType1 The type of second argument passed to the CreateControlRenderer()
+ * @tparam ParameterType0 The type of first argument passed to the CreateVisual()
+ * @tparam ParameterType1 The type of second argument passed to the CreateVisual()
* @SINCE_1_0.39
* @param[in] actor Actor for which the renderer will be replaced
* @param[in,out] renderer The renderer object to be replaced
* @param[in] param1 Second template based argument passed to the renderer factory
*/
template< class ParameterType0, class ParameterType1 >
-void InitializeControlRenderer( Actor& actor, ControlRenderer& renderer, ParameterType0& param0, ParameterType1& param1 )
+void InitializeVisual( Actor& actor, Visual& renderer, ParameterType0& param0, ParameterType1& param1 )
{
renderer.RemoveAndReset( actor );
- renderer = Toolkit::RendererFactory::Get().CreateControlRenderer( param0, param1 );
+ renderer = Toolkit::VisualFactory::Get().CreateVisual( param0, param1 );
if( renderer && actor && actor.OnStage() )
{
renderer.SetOnStage( actor );
/**
* @brief Template to allow discard old renderer, get new one and set it on stage if possible
*
- * @tparam ParameterType The type of argument passed to the CreateControlRenderer()
+ * @tparam ParameterType The type of argument passed to the CreateVisual()
* @SINCE_1_0.39
* @param[in] actor Actor for which the renderer will be replaced
* @param[in,out] renderer The renderer object to be replaced
* @param[in] param Template based argument passed to the renderer factory
*/
template< class ParameterType >
-void InitializeControlRenderer( Actor& actor, ControlRenderer& renderer, ParameterType& param )
+void InitializeVisual( Actor& actor, Visual& renderer, ParameterType& param )
{
renderer.RemoveAndReset( actor );
- renderer = Toolkit::RendererFactory::Get().CreateControlRenderer( param );
+ renderer = Toolkit::VisualFactory::Get().CreateVisual( param );
if( renderer && actor && actor.OnStage() )
{
renderer.SetOnStage( actor );