#define DALI_TOOLKIT_VISUAL_FACTORY_IMPL_H
/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
#include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
#include <dali-toolkit/devel-api/visual-factory/visual-base.h>
#include <dali-toolkit/internal/visuals/visual-base-impl.h>
+#include <dali-toolkit/public-api/styling/style-manager.h>
+#include <dali-toolkit/devel-api/styling/style-manager-devel.h>
namespace Dali
{
{
class VisualFactoryCache;
-typedef IntrusivePtr<VisualFactoryCache> VisualFactoryCachePtr;
+class ImageVisualShaderFactory;
/**
* @copydoc Toolkit::VisualFactory
VisualFactory( bool debugEnabled );
/**
- * @copydoc Toolkit::RenderFactory::CreateVisual( const Property::Map& )
+ * @brief StyleChanged callback
+ *
+ * @param[in] styleManager Handle for style manager.
+ * @param[in] type Style change type.
+ */
+ void OnStyleChangedSignal( Toolkit::StyleManager styleManager, StyleChange::Type type );
+
+ /**
+ * @copydoc Toolkit::VisualFactory::CreateVisual( const Property::Map& )
*/
Toolkit::Visual::Base CreateVisual( const Property::Map& propertyMap );
/**
- * @copydoc Toolkit::RenderFactory::CreateVisual( const Image& )
+ * @copydoc Toolkit::VisualFactory::CreateVisual( const Image& )
*/
Toolkit::Visual::Base CreateVisual( const Image& image );
/**
- * @copydoc Toolkit::RenderFactory::CreateVisual( const std::string&, ImageDimensions )
+ * @copydoc Toolkit::VisualFactory::CreateVisual( const std::string&, ImageDimensions )
*/
Toolkit::Visual::Base CreateVisual( const std::string& image, ImageDimensions size );
+ /**
+ * @copydoc Toolkit::VisualFactory::SetPreMultiplyOnLoad()
+ */
+ void SetPreMultiplyOnLoad( bool preMultiply );
+
+ /**
+ * @copydoc Toolkit::VisualFactory::GetPreMultiplyOnLoad()
+ */
+ bool GetPreMultiplyOnLoad() const;
+
+ /**
+ * @return the reference to texture manager
+ */
+ Internal::TextureManager& GetTextureManager();
+
protected:
/**
virtual ~VisualFactory();
private:
-
/**
- * Undefined copy constructor.
+ * Get the factory cache, creating it if necessary.
*/
- VisualFactory(const VisualFactory&);
+ Internal::VisualFactoryCache& GetFactoryCache();
/**
- * Undefined assignment operator.
+ * Get the image visual shader factory, creating it if necessary.
*/
- VisualFactory& operator=(const VisualFactory& rhs);
+ ImageVisualShaderFactory& GetImageVisualShaderFactory();
-private:
+ VisualFactory(const VisualFactory&) = delete;
- VisualFactoryCachePtr mFactoryCache;
- bool mDebugEnabled;
+ VisualFactory& operator=(const VisualFactory& rhs) = delete;
+
+private:
+ std::unique_ptr< VisualFactoryCache > mFactoryCache;
+ std::unique_ptr< ImageVisualShaderFactory > mImageVisualShaderFactory;
+ SlotDelegate< VisualFactory > mSlotDelegate;
+ bool mDebugEnabled:1;
+ bool mPreMultiplyOnLoad:1; ///< Local store for this flag
};
/**