Tizen Native API
5.5
|
ImageView is a class for displaying an image resource. More...
Classes | |
struct | Property |
Enumeration for the instance of properties belonging to the ImageView class. More... | |
Public Types | |
enum | PropertyRange |
Enumeration for the start and end property ranges for this control. More... | |
Public Member Functions | |
ImageView () | |
Creates an uninitialized ImageView. | |
~ImageView () | |
Destructor. | |
ImageView (const ImageView &imageView) | |
Copy constructor. | |
ImageView & | operator= (const ImageView &imageView) |
Assignment operator. | |
void | SetImage (Image image) DALI_DEPRECATED_API |
Sets this ImageView from an Image instance. | |
void | SetImage (const std::string &url) |
Sets this ImageView from the given URL. | |
void | SetImage (const std::string &url, ImageDimensions size) |
Sets this ImageView from the given URL. | |
Image | GetImage () const DALI_DEPRECATED_API |
Gets the Image instance handle used by the ImageView. | |
Static Public Member Functions | |
static ImageView | New () |
Create an initialized ImageView. | |
static ImageView | New (Image image) DALI_DEPRECATED_API |
Creates an initialized ImageView from an Image instance. | |
static ImageView | New (const std::string &url) |
Creates an initialized ImageView from an URL to an image resource. | |
static ImageView | New (const std::string &url, ImageDimensions size) |
Creates an initialized ImageView from a URL to an image resource. | |
static ImageView | DownCast (BaseHandle handle) |
Downcasts a handle to ImageView handle. |
ImageView is a class for displaying an image resource.
An instance of ImageView can be created using a URL or an Image instance.
Some resources can be loaded before the ImageView is staged ( already cached ), in these cases if the connection to ResouceReadySignal is done after the resource is set then signal will be missed.
To protect against this, IsResourceReady() can be checked before connecting to ResourceReadySignal, or the signal connection can be done before setting the resource.
auto myImageView = ImageView::New( resourceUrl ); if ( myImageView.IsResourceReady() ) { // do something } else { myImageView.ResourceReadySignal.Connect( .... ) }
OR Connect to signal before setting resource
auto myImageView = ImageView::New(); myImageView.ResourceReadySignal.Connect( .... ) myImageView.SetProperty( ImageView::Property::IMAGE, resourceUrl );
Enumeration for the start and end property ranges for this control.
Reimplemented from Dali::Toolkit::Control.
Creates an uninitialized ImageView.
Destructor.
This is non-virtual since derived Handle types must not contain data or virtual methods.
Dali::Toolkit::ImageView::ImageView | ( | const ImageView & | imageView | ) |
static ImageView Dali::Toolkit::ImageView::DownCast | ( | BaseHandle | handle | ) | [static] |
Downcasts a handle to ImageView handle.
If handle points to a ImageView, the downcast produces valid handle. If not, the returned handle is left uninitialized.
[in] | handle | Handle to an object |
Reimplemented from Dali::Toolkit::Control.
Image Dali::Toolkit::ImageView::GetImage | ( | ) | const |
Gets the Image instance handle used by the ImageView.
A valid handle will be returned only if this instance was created with New(Image) or SetImage(Image) was called.
static ImageView Dali::Toolkit::ImageView::New | ( | ) | [static] |
Create an initialized ImageView.
Reimplemented from Dali::Toolkit::Control.
static ImageView Dali::Toolkit::ImageView::New | ( | Image | image | ) | [static] |
Creates an initialized ImageView from an Image instance.
If the handle is empty, ImageView will not display anything.
[in] | image | The Image instance to display |
static ImageView Dali::Toolkit::ImageView::New | ( | const std::string & | url | ) | [static] |
Creates an initialized ImageView from an URL to an image resource.
If the string is empty, ImageView will not display anything.
[in] | url | The url of the image resource to display |
static ImageView Dali::Toolkit::ImageView::New | ( | const std::string & | url, |
ImageDimensions | size | ||
) | [static] |
Creates an initialized ImageView from a URL to an image resource.
If the string is empty, ImageView will not display anything.
[in] | url | The url of the image resource to display |
[in] | size | The width and height to which to fit the loaded image |
void Dali::Toolkit::ImageView::SetImage | ( | Image | image | ) |
Sets this ImageView from an Image instance.
If the handle is empty, ImageView will display nothing
[in] | image | The Image instance to display. |
void Dali::Toolkit::ImageView::SetImage | ( | const std::string & | url | ) |
Sets this ImageView from the given URL.
If the URL is empty, ImageView will not display anything.
[in] | url | The URL to the image resource to display |
void Dali::Toolkit::ImageView::SetImage | ( | const std::string & | url, |
ImageDimensions | size | ||
) |
Sets this ImageView from the given URL.
If the URL is empty, ImageView will not display anything.
[in] | url | The URL to the image resource to display |
[in] | size | The width and height to fit the loaded image to |