END_TEST;
}
+
+int UtcDaliImageViewResourceUrlP(void)
+{
+ ToolkitTestApplication application;
+
+ ImageView imageView = ImageView::New();
+ DALI_TEST_CHECK( imageView.GetProperty( ImageView::Property::RESOURCE_URL ).Get< std::string >().empty() );
+
+ imageView.SetProperty( ImageView::Property::RESOURCE_URL, "TestString" );
+ DALI_TEST_EQUALS( imageView.GetProperty( ImageView::Property::RESOURCE_URL ).Get< std::string >(), "TestString", TEST_LOCATION );
+
+ END_TEST;
+}
// Setup properties, signals and actions using the type-registry.
DALI_TYPE_REGISTRATION_BEGIN( Toolkit::ImageView, Toolkit::Control, Create );
+DALI_PROPERTY_REGISTRATION( Toolkit, ImageView, "resourceUrl", STRING, RESOURCE_URL )
DALI_PROPERTY_REGISTRATION( Toolkit, ImageView, "image", MAP, IMAGE )
DALI_TYPE_REGISTRATION_END()
{
switch ( index )
{
+ case Toolkit::ImageView::Property::RESOURCE_URL:
+ {
+ std::string imageUrl;
+ if( value.Get( imageUrl ) )
+ {
+ GetImpl( imageView ).SetImage( imageUrl, ImageDimensions() );
+ }
+ break;
+ }
+
case Toolkit::ImageView::Property::IMAGE:
{
std::string imageUrl;
{
switch ( propertyIndex )
{
+ case Toolkit::ImageView::Property::RESOURCE_URL:
+ {
+ ImageView& impl = GetImpl( imageview );
+ if ( !impl.mUrl.empty() )
+ {
+ value = impl.mUrl;
+ }
+ break;
+ }
+
case Toolkit::ImageView::Property::IMAGE:
{
ImageView& impl = GetImpl( imageview );
{
enum
{
- IMAGE = PROPERTY_START_INDEX, ///< name "image", @see SetImage(), type string if it is a url, map otherwise
+ RESOURCE_URL = PROPERTY_START_INDEX, ///< name "resourceUrl", @deprecated DALi 1.1.16 Use IMAGE instead. type string
+ IMAGE, ///< name "image", @see SetImage(), type string if it is a url, map otherwise
};
};