*/
// EXTERNAL INCLUDES
-#include <dali/devel-api/rendering/renderer.h>
+#include <dali/public-api/object/property-map.h>
// INTERNAL INCLUDES
+#include <dali-toolkit/internal/controls/renderers/image/image-renderer.h>
#include <dali-toolkit/public-api/controls/control-impl.h>
#include <dali-toolkit/public-api/controls/image-view/image-view.h>
*/
virtual ~ImageView();
+
+
public:
/**
* Create a new ImageView.
static Toolkit::ImageView New();
/**
- * @copydoc Dali::Toolkit::SetImage( Image image )
+ * @copydoc Dali::Toolkit::SetImage
*/
void SetImage( Image image );
/**
- * @copydoc Dali::Toolkit::Image GetImage() const
+ * @brief Sets this ImageView from an Dali::Property::Map
+ *
+ * If the handle is empty, ImageView will display nothing
+ * @param[in] map The Dali::Property::Map to use for to display.
*/
- Image GetImage() const;
+ void SetImage( Dali::Property::Map map );
+
+ /**
+ * @copydoc Dali::Toolkit::SetImage
+ */
+ void SetImage( const std::string& imageUrl, ImageDimensions size );
// Properties
/**
*/
static Property::Value GetProperty( BaseObject* object, Property::Index propertyIndex );
-private: // From Control
-
/**
- * @copydoc Toolkit::Control::OnRelayout()
+ * @brief Set the depth index of this image renderer
+ *
+ * Renderer with higher depth indices are rendered in front of other renderers with smaller values
+ *
+ * @param[in] depthIndex The depth index of this renderer
*/
- virtual void OnRelayout( const Vector2& size, RelayoutContainer& container );
+ void SetDepthIndex( int depthIndex );
+
+private: // From Control
/**
* @copydoc Toolkit::Control::OnStageConnect()
virtual void OnStageConnection( int depth );
/**
+ * @copydoc Toolkit::Control::OnStageDisconnection()
+ */
+ virtual void OnStageDisconnection();
+
+ /**
* @copydoc Toolkit::Control::GetNaturalSize
*/
virtual Vector3 GetNaturalSize();
void AttachImage();
private:
+ // Undefined
+ ImageView( const ImageView& );
+ ImageView& operator=( const ImageView& );
+
+private:
+ Toolkit::ControlRenderer mRenderer;
+ ImageDimensions mImageSize;
- Sampler mSampler;
- Material mMaterial;
- Geometry mMesh;
- Renderer mRenderer;
- Image mImage;
- std::string mImageUrl;
+ std::string mUrl; ///< the url for the image if the image came from a URL, empty otherwise
+ Image mImage; ///< the Image if the image came from a Image, null otherwise
+ Property::Map mPropertyMap; ///< the Property::Map if the image came from a Property::Map, empty otherwise
};
} // namespace Internal