Image.hpp

Easily load an image and place it in a document.

class Image : public internal::WidgetFacet<Image>
#include <Image.hpp>

The Image widget will load an image from a specified URL. For example, you can use Image(“http://kripken.github.io/emscripten-site/_static/Emscripten_logo_full.png”) to load the emscripten logo from its website. These can be easily inserted into a web document using << and all JS callbacks (after loading) will be handled automatically.

You can also set the Alt-text with the Alt() function.

Public Types

using INFO_TYPE = ImageInfo

Public Functions

inline Image(const std::string &in_url, const std::string &in_id = "")

Create a new image, indicating the URL to load from.

inline Image(const Image &in)

Link to an existing Image widget.

inline Image(const Widget &in)
inline virtual ~Image()
inline Image &URL(const std::string &in_url)

Update the URL for this image.

inline Image &Alt(const std::string &in_alt)

Add Alt-text for this image.

Protected Functions

inline ImageInfo *Info()
inline const ImageInfo *Info() const
inline Image(ImageInfo *in_info)

Friends

friend class ImageInfo