#include <WImage>

Public Member Functions | |
| WImage (WContainerWidget *parent=0) | |
| Create an empty image widget. | |
| WImage (const std::string &imageRef, WContainerWidget *parent=0) | |
| Create an image widget with given image URL. | |
| WImage (const std::string &imageRef, const WString &altText, WContainerWidget *parent=0) | |
| Create an image widget with given image URL and alternate text. | |
| WImage (WResource *resource, const WString &altText, WContainerWidget *parent=0) | |
| Create an image widget with given image resource and alternate text. | |
| const WString & | alternateText () const |
| Get the alternate text. | |
| void | setAlternateText (const WString &text) |
| Set the alternate text. | |
| const std::string | imageRef () const |
| Get the image URL. | |
| void | setImageRef (const std::string &ref) |
| Set the image URL. | |
| void | setResource (WResource *resource) |
| Set the resource. | |
| WResource * | resource () const |
| Get the resource. | |
Public Attributes | |
| EventSignal< void > | loaded |
| Event emitted when the image was loaded. | |
WImage is an inline widget.
The image may be specified either as a URL, or may be dynamically generated by using a WResource.
| Wt::WImage::WImage | ( | WResource * | resource, | |
| const WString & | altText, | |||
| WContainerWidget * | parent = 0 | |||
| ) |
Create an image widget with given image resource and alternate text.
Use this constructor if you want to present a dynamically generated image.
| const std::string Wt::WImage::imageRef | ( | ) | const |
Get the image URL.
When the image is specified as a resource, this returns the current resource URL.
| void Wt::WImage::setImageRef | ( | const std::string & | ref | ) |
Set the image URL.
Not available when the image is specified as a resource.
| void Wt::WImage::setResource | ( | WResource * | resource | ) |
Set the resource.
Set a resource for a dynamically generated image.
1.5.3