X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Fpublic-api%2Fcontrols%2Fimage-view%2Fimage-view.cpp;h=02d3e0d67613cfc67fcda57361f69d7e2e13eafc;hb=9795d65d103bdf0524aa92e96475019eff2705f3;hp=8075764eb5b6c540ed147959e22074bb8789d818;hpb=e80261307788b4656435c4dd964beff7c85e7e8c;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/public-api/controls/image-view/image-view.cpp b/dali-toolkit/public-api/controls/image-view/image-view.cpp index 8075764..02d3e0d 100644 --- a/dali-toolkit/public-api/controls/image-view/image-view.cpp +++ b/dali-toolkit/public-api/controls/image-view/image-view.cpp @@ -16,14 +16,16 @@ */ // CLASS HEADER - #include +// EXTERNAL INCLUDES +#include +#include +#include + // INTERNAL INCLUDES #include -// EXTERNAL INCLUDES - namespace Dali { @@ -59,6 +61,8 @@ ImageView ImageView::New() ImageView ImageView::New( Image image ) { + DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: New() is deprecated and will be removed from next release. use New( const std::string& ) instead.\n" ); + ImageView imageView = Internal::ImageView::New(); imageView.SetImage( image ); return imageView; @@ -67,22 +71,43 @@ ImageView ImageView::New( Image image ) ImageView ImageView::New( const std::string& url ) { ImageView imageView = Internal::ImageView::New(); - imageView.SetProperty( ImageView::Property::RESOURCE_URL, Dali::Property::Value( url ) ); + imageView.SetImage( url, ImageDimensions() ); + return imageView; +} + +ImageView ImageView::New( const std::string& url, ImageDimensions size ) +{ + ImageView imageView = Internal::ImageView::New(); + imageView.SetImage( url, size ); return imageView; } ImageView ImageView::DownCast( BaseHandle handle ) { - return Control::DownCast(handle); + return Control::DownCast( handle ); } void ImageView::SetImage( Image image ) { + DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: SetImage() is deprecated and will be removed from next release. Use SetImage( const std::string& ) instead.\n" ); + Dali::Toolkit::GetImpl( *this ).SetImage( image ); } +void ImageView::SetImage( const std::string& url ) +{ + Dali::Toolkit::GetImpl( *this ).SetImage( url, ImageDimensions() ); +} + +void ImageView::SetImage( const std::string& url, ImageDimensions size ) +{ + Dali::Toolkit::GetImpl( *this ).SetImage( url, size ); +} + Image ImageView::GetImage() const { + DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: GetImage() is deprecated and will be removed from next release.\n" ); + return Dali::Toolkit::GetImpl( *this ).GetImage(); }