Wt::WImage Class Reference

A widget that displays an image. More...

#include <WImage>

Inheritance diagram for Wt::WImage:

Inheritance graph
[legend]

List of all members.

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 WStringalternateText () 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.
WResourceresource () const
 Get the resource.

Public Attributes

EventSignal< void > loaded
 Event emitted when the image was loaded.


Detailed Description

A widget that displays an image.

WImage is an inline widget.

The image may be specified either as a URL, or may be dynamically generated by using a WResource.


Constructor & Destructor Documentation

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.


Member Function Documentation

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.


The documentation for this class was generated from the following files:
Generated on Mon Apr 14 15:15:01 2008 for Wt by doxygen 1.5.3